Skip to content

Commit

Permalink
Docs edits
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Maddaus <Ian.Maddaus@progress.com>
  • Loading branch information
IanMadd committed Oct 7, 2021
1 parent 9591dfd commit bedc975
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
33 changes: 16 additions & 17 deletions docs/resources/aws_cloudwatch_dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,42 @@ platform: aws

# aws_cloudwatch_dashboard

Use the `aws_cloudwatch_dashboard` InSpec audit resource to test properties of the plural AWS CloudWatch Dashboard.
Use the `aws_cloudwatch_dashboard` InSpec audit resource to test properties of the plural AWS CloudWatch dashboard.

## Syntax

Ensure that the dashboard exists.

describe aws_cloudwatch_dashboard(dashboard_name: 'DashboardName') do
describe aws_cloudwatch_dashboard(dashboard_name: 'DASHBOARD_NAME') do
it { should exist }
end

## Parameters

`dashboard_name` _(required)_

| Property | Description |
| --- | --- |
| dashboard_name | The name of a dashboard. |
The name of a dashboard.

For additional information, see the [AWS documentation on AWS CloudWatch Dashboard.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html).

## Properties

| Property | Description | Field |
| --- | --- | --- |
| dashboard_arn | The Amazon Resource Name (ARN) of the dashboard. | dashboard_arn |
| dashboard_body | The detailed information about the dashboard, including what widgets are included and their location on the dashboard.| dashboard_body |
| dashboard_name | The name of the dashboard. | dashboard_name |

| Property | Description |
| --- | --- |
| dashboard_arn | The Amazon Resource Name (ARN) of the dashboard. |
| dashboard_body | The detailed information about the dashboard, including what widgets are included and their location on the dashboard.|
| dashboard_name | The name of the dashboard. |
## Examples

### Ensure a dashboard arn is available.
describe aws_cloudwatch_dashboard(dashboard_name: 'DashboardName') do
### Ensure a dashboard ARN is available.

describe aws_cloudwatch_dashboard(dashboard_name: 'DASHBOARD_NAME') do
its('dashboard_arn') { should eq 'ARN' }
end

### Ensure a dashboard body is available.
describe aws_cloudwatch_dashboard(dashboard_name: 'DashboardName') do

describe aws_cloudwatch_dashboard(dashboard_name: 'DASHBOARD_NAME') do
its('dashboard_body') { should eq 'BODY' }
end

Expand All @@ -55,16 +54,16 @@ The controls will pass if the `get` method returns at least one result.

Use `should` to test that the entity exists.

describe aws_cloudwatch_dashboard(dashboard_name: 'DashboardName') do
describe aws_cloudwatch_dashboard(dashboard_name: 'DASHBOARD_NAME') do
it { should exist }
end

Use `should_not` to test the entity does not exist.

describe aws_cloudwatch_dashboard(dashboard_name: 'dummy') do
describe aws_cloudwatch_dashboard(dashboard_name: 'DASHBOARD_NAME') do
it { should_not exist }
end

## AWS Permissions

Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `CloudWatch:Client:GetDashboardOutput action with `Effect` set to `Allow`.
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `CloudWatch:Client:GetDashboardOutput action with `Effect` set to `Allow`.
20 changes: 12 additions & 8 deletions docs/resources/aws_cloudwatch_dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform: aws

# aws_cloudwatch_dashboards

Use the `aws_cloudwatch_dashboards` InSpec audit resource to test properties of the plural AWS CloudWatch Dashboard.
Use the `aws_cloudwatch_dashboards` InSpec audit resource to test properties of the plural AWS CloudWatch dashboard.

## Syntax

Expand All @@ -17,27 +17,31 @@ Ensure that the dashboard exists.

## Parameters

For additional information, see the [AWS documentation on AWS CloudWatch Dashboard.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html).
This resource does not require any parameters.

For additional information, see the [AWS documentation on AWS CloudWatch dashboard.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html).

## Properties

| Property | Description | Field |
| Property | Description | Field |
| --- | --- | --- |
| dashboard_name | The name of the dashboard. | dashboard_name |
| dashboard_arn | The Amazon Resource Name (ARN) of the dashboard. | dashboard_arn |
| dashboard_names | The name of the dashboard. | dashboard_name |
| dashboard_arns | The Amazon Resource Name (ARN) of the dashboard. | dashboard_arn |
| last_modified | The time stamp of when the dashboard was last modified, either by an API call or through the console. | last_modified |
| size | The size of the dashboard, in bytes. | size |
| sizes | The size of the dashboard, in bytes. | size |

## Examples

### Ensure a dashboard arn is available.
### Ensure a dashboard ARN is available.

describe aws_cloudwatch_dashboards do
its('dashboard_arns') { should include 'ARN' }
end

### Ensure a dashboard name is available.

describe aws_cloudwatch_dashboards do
its('dashboard_names') { should include 'DashboardName' }
its('dashboard_names') { should include 'DASHBOARD_NAME' }
end

## Matchers
Expand Down

0 comments on commit bedc975

Please sign in to comment.