Skip to content

Commit 80c883e

Browse files
authored
Merge pull request #2804 from quixoticmonk/docs/examples_latest_releases
docs: added examples for resources in latest releases
2 parents c6f061e + 4acd87a commit 80c883e

36 files changed

+1447
-15
lines changed

docs/resources/bedrock_automated_reasoning_policy.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "awscc_bedrock_automated_reasoning_policy Resource - terraform-provider-awscc"
43
subcategory: ""
54
description: |-
@@ -10,7 +9,57 @@ description: |-
109

1110
Definition of AWS::Bedrock::AutomatedReasoningPolicy Resource Type
1211

12+
## Example Usage
1313

14+
Note that the schema doesn't have a source document which creates a policy sheel which needs the rules document uploaded.
15+
16+
```terraform
17+
resource "awscc_bedrock_automated_reasoning_policy" "example" {
18+
name = "example-automated-reasoning-policy"
19+
description = "Example automated reasoning policy for access control validation"
20+
21+
policy_definition = {
22+
version = "1.0"
23+
24+
types = [
25+
{
26+
name = "UserRole"
27+
description = "Valid user roles"
28+
values = [
29+
{
30+
value = "admin"
31+
description = "Administrator"
32+
},
33+
{
34+
value = "user"
35+
description = "Regular user"
36+
}
37+
]
38+
}
39+
]
40+
41+
variables = [
42+
{
43+
name = "user_role"
44+
type = "UserRole"
45+
description = "The user's role"
46+
}
47+
]
48+
49+
rules = [
50+
{
51+
id = "A1DMINACCESS"
52+
expression = "true"
53+
}
54+
]
55+
}
56+
57+
tags = [{
58+
key = "Modified By"
59+
value = "AWSCC"
60+
}]
61+
}
62+
```
1463

1564
<!-- schema generated by tfplugindocs -->
1665
## Schema
@@ -133,4 +182,4 @@ The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/c
133182

134183
```shell
135184
$ terraform import awscc_bedrock_automated_reasoning_policy.example "policy_arn"
136-
```
185+
```

docs/resources/bedrock_automated_reasoning_policy_version.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "awscc_bedrock_automated_reasoning_policy_version Resource - terraform-provider-awscc"
43
subcategory: ""
54
description: |-
@@ -10,7 +9,68 @@ description: |-
109

1110
Definition of AWS::Bedrock::AutomatedReasoningPolicyVersion Resource Type
1211

12+
## Example Usage
1313

14+
Note that the schema doesn't have a source document which creates a policy sheel which needs the rules document uploaded.
15+
16+
```terraform
17+
resource "awscc_bedrock_automated_reasoning_policy" "example" {
18+
name = "example-automated-reasoning-policy"
19+
description = "Example automated reasoning policy for access control validation"
20+
21+
policy_definition = {
22+
version = "1.0"
23+
24+
types = [
25+
{
26+
name = "UserRole"
27+
description = "Valid user roles"
28+
values = [
29+
{
30+
value = "admin"
31+
description = "Administrator"
32+
},
33+
{
34+
value = "user"
35+
description = "Regular user"
36+
}
37+
]
38+
}
39+
]
40+
41+
variables = [
42+
{
43+
name = "user_role"
44+
type = "UserRole"
45+
description = "The user's role"
46+
}
47+
]
48+
49+
rules = [
50+
{
51+
id = "A1DMINACCESS"
52+
expression = "true"
53+
}
54+
]
55+
}
56+
57+
tags = [{
58+
key = "Modified By"
59+
value = "AWSCC"
60+
}]
61+
}
62+
63+
resource "awscc_bedrock_automated_reasoning_policy_version" "example" {
64+
policy_arn = awscc_bedrock_automated_reasoning_policy.example.policy_arn
65+
66+
last_updated_definition_hash = awscc_bedrock_automated_reasoning_policy.example.definition_hash
67+
68+
tags = [{
69+
key = "Modified By"
70+
value = "AWSCC"
71+
}]
72+
}
73+
```
1474

1575
<!-- schema generated by tfplugindocs -->
1676
## Schema
@@ -85,4 +145,4 @@ The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/c
85145

86146
```shell
87147
$ terraform import awscc_bedrock_automated_reasoning_policy_version.example "policy_arn|version"
88-
```
148+
```

docs/resources/billing_billing_view.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "awscc_billing_billing_view Resource - terraform-provider-awscc"
43
subcategory: ""
54
description: |-
@@ -10,7 +9,27 @@ description: |-
109

1110
A billing view is a container of cost & usage metadata.
1211

12+
## Example Usage
1313

14+
```terraform
15+
resource "awscc_billing_billing_view" "example" {
16+
name = "example-billing-view"
17+
description = "Example billing view for cost analysis"
18+
source_views = ["arn:aws:billing::123456789012:billingview/source-view"] # Set this to the right arn and linked account
19+
20+
data_filter_expression = {
21+
dimensions = {
22+
key = "LINKED_ACCOUNT"
23+
values = ["123456789012"]
24+
}
25+
}
26+
27+
tags = [{
28+
key = "Modified By"
29+
value = "AWSCC"
30+
}]
31+
}
32+
```
1433

1534
<!-- schema generated by tfplugindocs -->
1635
## Schema
@@ -109,4 +128,4 @@ The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/c
109128

110129
```shell
111130
$ terraform import awscc_billing_billing_view.example "arn"
112-
```
131+
```

docs/resources/iot_encryption_configuration.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "awscc_iot_encryption_configuration Resource - terraform-provider-awscc"
43
subcategory: ""
54
description: |-
@@ -10,7 +9,89 @@ description: |-
109

1110
Resource Type definition for AWS::IoT::EncryptionConfiguration
1211

12+
## Example Usage
1313

14+
~> This example is generated by LLM using Amazon Bedrock and validated using terraform validate, apply and destroy. While we strive for accuracy and quality, please note that the information provided may not be entirely error-free or up-to-date. We recommend independently verifying the content.
15+
16+
```terraform
17+
# Create KMS key for IoT encryption
18+
resource "awscc_kms_key" "iot_encryption" {
19+
description = "KMS key for IoT encryption configuration"
20+
key_policy = jsonencode({
21+
Version = "2012-10-17"
22+
Statement = [
23+
{
24+
Sid = "Enable IAM User Permissions"
25+
Effect = "Allow"
26+
Principal = {
27+
AWS = "*"
28+
}
29+
Action = "kms:*"
30+
Resource = "*"
31+
},
32+
{
33+
Sid = "Allow IoT service"
34+
Effect = "Allow"
35+
Principal = {
36+
Service = "iot.amazonaws.com"
37+
}
38+
Action = [
39+
"kms:Decrypt",
40+
"kms:DescribeKey",
41+
"kms:Encrypt",
42+
"kms:GenerateDataKey*",
43+
"kms:ReEncrypt*"
44+
]
45+
Resource = "*"
46+
}
47+
]
48+
})
49+
}
50+
51+
# Create IAM role for IoT encryption
52+
resource "awscc_iam_role" "iot_encryption" {
53+
role_name = "example-iot-encryption-role"
54+
assume_role_policy_document = jsonencode({
55+
Version = "2012-10-17"
56+
Statement = [
57+
{
58+
Effect = "Allow"
59+
Principal = {
60+
Service = "iot.amazonaws.com"
61+
}
62+
Action = "sts:AssumeRole"
63+
}
64+
]
65+
})
66+
policies = [
67+
{
68+
policy_name = "IoTEncryptionPolicy"
69+
policy_document = jsonencode({
70+
Version = "2012-10-17"
71+
Statement = [
72+
{
73+
Effect = "Allow"
74+
Action = [
75+
"kms:Decrypt",
76+
"kms:DescribeKey",
77+
"kms:Encrypt",
78+
"kms:GenerateDataKey*",
79+
"kms:ReEncrypt*"
80+
]
81+
Resource = "*"
82+
}
83+
]
84+
})
85+
}
86+
]
87+
}
88+
89+
resource "awscc_iot_encryption_configuration" "example" {
90+
encryption_type = "CUSTOMER_MANAGED_KMS_KEY"
91+
kms_key_arn = awscc_kms_key.iot_encryption.arn
92+
kms_access_role_arn = awscc_iam_role.iot_encryption.arn
93+
}
94+
```
1495

1596
<!-- schema generated by tfplugindocs -->
1697
## Schema

docs/resources/s3tables_table_bucket_policy.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "awscc_s3tables_table_bucket_policy Resource - terraform-provider-awscc"
43
subcategory: ""
54
description: |-
@@ -10,7 +9,40 @@ description: |-
109

1110
Applies an IAM resource policy to a table bucket.
1211

12+
## Example Usage
1313

14+
```terraform
15+
data "aws_caller_identity" "current" {}
16+
17+
resource "awscc_s3tables_table_bucket" "example" {
18+
table_bucket_name = "example-table-bucket-${data.aws_caller_identity.current.account_id}"
19+
}
20+
21+
data "aws_iam_policy_document" "table_bucket_policy" {
22+
statement {
23+
sid = "AllowTableAccess"
24+
effect = "Allow"
25+
26+
principals {
27+
type = "AWS"
28+
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"]
29+
}
30+
31+
actions = [
32+
"s3tables:GetTable",
33+
"s3tables:ListTables"
34+
]
35+
36+
resources = ["${awscc_s3tables_table_bucket.example.table_bucket_arn}/*"]
37+
}
38+
}
39+
40+
# S3 Tables table bucket policy
41+
resource "awscc_s3tables_table_bucket_policy" "example" {
42+
table_bucket_arn = awscc_s3tables_table_bucket.example.table_bucket_arn
43+
resource_policy = data.aws_iam_policy_document.table_bucket_policy.json
44+
}
45+
```
1446

1547
<!-- schema generated by tfplugindocs -->
1648
## Schema

0 commit comments

Comments
 (0)