From bedc975e4aa71296b2a18839cf31a59049c98853 Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Thu, 7 Oct 2021 15:36:53 -0700 Subject: [PATCH] Docs edits Signed-off-by: Ian Maddaus --- docs/resources/aws_cloudwatch_dashboard.md | 33 ++++++++++----------- docs/resources/aws_cloudwatch_dashboards.md | 20 ++++++++----- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/docs/resources/aws_cloudwatch_dashboard.md b/docs/resources/aws_cloudwatch_dashboard.md index 86e8c038f..49dcc51a3 100644 --- a/docs/resources/aws_cloudwatch_dashboard.md +++ b/docs/resources/aws_cloudwatch_dashboard.md @@ -5,13 +5,13 @@ 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 @@ -19,29 +19,28 @@ Ensure that the dashboard exists. `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 @@ -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`. \ No newline at end of file +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`. diff --git a/docs/resources/aws_cloudwatch_dashboards.md b/docs/resources/aws_cloudwatch_dashboards.md index 68415837d..b96f82719 100644 --- a/docs/resources/aws_cloudwatch_dashboards.md +++ b/docs/resources/aws_cloudwatch_dashboards.md @@ -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 @@ -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