Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add example for awscc_accessanalyzer_analyzer #899

Merged
merged 4 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}