Skip to content

Commit

Permalink
Merge pull request #899 from wellsiau-aws/d-improve-access-analyzer
Browse files Browse the repository at this point in the history
docs: add example for awscc_accessanalyzer_analyzer
  • Loading branch information
ewbankkit authored Apr 13, 2023
2 parents d3eb7dc + 9effdac commit 345f57f
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
29 changes: 27 additions & 2 deletions docs/resources/accessanalyzer_analyzer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_accessanalyzer_analyzer Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,33 @@ description: |-

The AWS::AccessAnalyzer::Analyzer type specifies an analyzer of the user's account

## Example Usage

### Single Account Analyzer

To use awscc_accessanalyzer_analyzer on single AWS account:

```terraform
resource "awscc_accessanalyzer_analyzer" "this" {
analyzer_name = "example"
type = ACCOUNT
}
```

### Organization Analyzer

To enable awscc_accessanalyzer_analyzer at the organization level, modify example below to match your AWS organization configuration.

```terraform
resource "aws_organizations_organization" "this" {
aws_service_access_principals = ["access-analyzer.amazonaws.com"]
}
resource "awscc_accessanalyzer_analyzer" "this" {
analyzer_name = "example"
type = "ORGANIZATION"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -68,4 +93,4 @@ Import is supported using the following syntax:

```shell
$ terraform import awscc_accessanalyzer_analyzer.example <resource ID>
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "awscc_accessanalyzer_analyzer" "this" {
analyzer_name = "example"
type = ACCOUNT
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "aws_organizations_organization" "this" {
aws_service_access_principals = ["access-analyzer.amazonaws.com"]
}

resource "awscc_accessanalyzer_analyzer" "this" {
analyzer_name = "example"
type = "ORGANIZATION"
}
35 changes: 35 additions & 0 deletions templates/resources/accessanalyzer_analyzer.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

### Single Account Analyzer

To use {{.Name}} on single AWS account:

{{ tffile (printf "examples/resources/%s/account_analyzer.tf" .Name)}}

### Organization Analyzer

To enable {{.Name}} at the organization level, modify example below to match your AWS organization configuration.

{{ tffile (printf "examples/resources/%s/organization_analyzer.tf" .Name)}}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}

0 comments on commit 345f57f

Please sign in to comment.