Skip to content

Commit

Permalink
Merge pull request #1489 from gokendra1/d-improve-awscc_controltower_…
Browse files Browse the repository at this point in the history
…enabled_control

docs: add example for: awscc_controltower_enabled_control
  • Loading branch information
marcosentino authored Apr 9, 2024
2 parents f5ca5d8 + b0d5841 commit b985492
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/resources/controltower_enabled_control.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_controltower_enabled_control Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,19 @@ description: |-

Enables a control on a specified target.

### Example for enabling the controls in AWS Control Tower.
Enables the control 'AWS-GR_AUDIT_BUCKET_RETENTION_POLICY'

```terraform
# The following resource enables the control 'AWS-GR_AUDIT_BUCKET_RETENTION_POLICY'
resource "awscc_controltower_enabled_control" "example" {
control_identifier = "arn:aws:controltower:us-east-1::control/AWS-GR_AUDIT_BUCKET_RETENTION_POLICY"
target_identifier = "arn:aws:organizations::<<your-account-id>:ou/<<your-org-id>>/<<your-ou-id>>"
}
# Please change the Organization ID to your Organization ID, and the Organizational Unit ID to your desired OU where the controls need to be implemented.
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -30,4 +41,4 @@ Import is supported using the following syntax:

```shell
$ terraform import awscc_controltower_enabled_control.example <resource ID>
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@



# The following resource enables the control 'AWS-GR_AUDIT_BUCKET_RETENTION_POLICY'

resource "awscc_controltower_enabled_control" "example" {
control_identifier = "arn:aws:controltower:us-east-1::control/AWS-GR_AUDIT_BUCKET_RETENTION_POLICY"
target_identifier = "arn:aws:organizations::<<your-account-id>:ou/<<your-org-id>>/<<your-ou-id>>"
}

# Please change the Organization ID to your Organization ID, and the Organizational Unit ID to your desired OU where the controls need to be implemented.
26 changes: 26 additions & 0 deletions templates/resources/controltower_enabled_control.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

### Example for enabling the controls in AWS Control Tower.
Enables the control 'AWS-GR_AUDIT_BUCKET_RETENTION_POLICY'

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

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

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}

0 comments on commit b985492

Please sign in to comment.