Skip to content

Commit 624cbcc

Browse files
authored
fix: Update syntax for Terraform 0.15 (terraform-aws-modules#71)
1 parent 8085fb1 commit 624cbcc

File tree

11 files changed

+48
-47
lines changed

11 files changed

+48
-47
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ repos:
33
rev: v1.46.0
44
hooks:
55
- id: terraform_fmt
6+
- id: terraform_validate
67
- id: terraform_docs
78
- id: terraform_tflint
89
args:

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module "s3_bucket" {
8484

8585
| Name | Version |
8686
|------|---------|
87-
| terraform | >= 0.12.6 |
87+
| terraform | >= 0.12.26 |
8888
| aws | >= 3.0 |
8989

9090
## Providers
@@ -101,11 +101,11 @@ No Modules.
101101

102102
| Name |
103103
|------|
104-
| [aws_elb_service_account](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/elb_service_account) |
105-
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) |
106-
| [aws_s3_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_policy) |
107-
| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_public_access_block) |
108-
| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket) |
104+
| [aws_elb_service_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elb_service_account) |
105+
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) |
106+
| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) |
107+
| [aws_s3_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) |
108+
| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) |
109109

110110
## Inputs
111111

examples/complete/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Note that this example may create resources which cost money. Run `terraform des
2929

3030
| Name | Version |
3131
|------|---------|
32-
| terraform | >= 0.12.6, < 0.14 |
33-
| aws | >= 3.0, < 4.0 |
32+
| terraform | >= 0.12.26 |
33+
| aws | >= 3.0 |
3434
| random | ~> 2 |
3535

3636
## Providers
3737

3838
| Name | Version |
3939
|------|---------|
40-
| aws | >= 3.0, < 4.0 |
40+
| aws | >= 3.0 |
4141
| random | ~> 2 |
4242

4343
## Modules
@@ -52,11 +52,11 @@ Note that this example may create resources which cost money. Run `terraform des
5252

5353
| Name |
5454
|------|
55-
| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/data-sources/canonical_user_id) |
56-
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/data-sources/iam_policy_document) |
57-
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/resources/iam_role) |
58-
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/resources/kms_key) |
59-
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2/docs/resources/pet) |
55+
| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) |
56+
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) |
57+
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) |
58+
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) |
59+
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) |
6060

6161
## Inputs
6262

examples/complete/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
terraform {
2-
required_version = ">= 0.12.6, < 0.14"
2+
required_version = ">= 0.12.26"
33

44
required_providers {
5-
aws = ">= 3.0, < 4.0"
5+
aws = ">= 3.0"
66
random = "~> 2"
77
}
88
}

examples/notification/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| terraform | >= 0.12.6 |
22+
| terraform | >= 0.12.26 |
2323
| aws | >= 3.0 |
2424
| null | >= 2 |
2525
| random | >= 2 |
@@ -47,12 +47,12 @@ Note that this example may create resources which cost money. Run `terraform des
4747

4848
| Name |
4949
|------|
50-
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) |
51-
| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue_policy) |
52-
| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue) |
53-
| [null_data_source](https://registry.terraform.io/providers/hashicorp/null/2/docs/data-sources/data_source) |
54-
| [null_resource](https://registry.terraform.io/providers/hashicorp/null/2/docs/resources/resource) |
55-
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2/docs/resources/pet) |
50+
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) |
51+
| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) |
52+
| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) |
53+
| [null_data_source](https://registry.terraform.io/providers/hashicorp/null/latest/docs/data-sources/data_source) |
54+
| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) |
55+
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) |
5656

5757
## Inputs
5858

examples/notification/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.12.6"
2+
required_version = ">= 0.12.26"
33

44
required_providers {
55
aws = ">= 3.0"

examples/s3-replication/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Note that this example may create resources which cost money. Run `terraform des
2121

2222
| Name | Version |
2323
|------|---------|
24-
| terraform | >= 0.12.6 |
24+
| terraform | >= 0.12.26 |
2525
| aws | >= 3.0 |
2626
| random | >= 2.0 |
2727

@@ -44,12 +44,12 @@ Note that this example may create resources which cost money. Run `terraform des
4444

4545
| Name |
4646
|------|
47-
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/caller_identity) |
48-
| [aws_iam_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_policy_attachment) |
49-
| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_policy) |
50-
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_role) |
51-
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/kms_key) |
52-
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2.0/docs/resources/pet) |
47+
| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) |
48+
| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) |
49+
| [aws_iam_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) |
50+
| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) |
51+
| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) |
52+
| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) |
5353

5454
## Inputs
5555

examples/s3-replication/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.12.6"
2+
required_version = ">= 0.12.26"
33

44
required_providers {
55
aws = ">= 3.0"

modules/notification/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ No Modules.
2525

2626
| Name |
2727
|------|
28-
| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/arn) |
29-
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) |
30-
| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/lambda_permission) |
31-
| [aws_s3_bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_notification) |
32-
| [aws_sns_topic_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sns_topic_policy) |
33-
| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue_policy) |
28+
| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) |
29+
| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) |
30+
| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) |
31+
| [aws_s3_bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) |
32+
| [aws_sns_topic_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_policy) |
33+
| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) |
3434

3535
## Inputs
3636

outputs.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
output "this_s3_bucket_id" {
22
description = "The name of the bucket."
3-
value = element(concat(aws_s3_bucket_policy.this.*.id, aws_s3_bucket.this.*.id, list("")), 0)
3+
value = element(concat(aws_s3_bucket_policy.this.*.id, aws_s3_bucket.this.*.id, [""]), 0)
44
}
55

66
output "this_s3_bucket_arn" {
77
description = "The ARN of the bucket. Will be of format arn:aws:s3:::bucketname."
8-
value = element(concat(aws_s3_bucket.this.*.arn, list("")), 0)
8+
value = element(concat(aws_s3_bucket.this.*.arn, [""]), 0)
99
}
1010

1111
output "this_s3_bucket_bucket_domain_name" {
1212
description = "The bucket domain name. Will be of format bucketname.s3.amazonaws.com."
13-
value = element(concat(aws_s3_bucket.this.*.bucket_domain_name, list("")), 0)
13+
value = element(concat(aws_s3_bucket.this.*.bucket_domain_name, [""]), 0)
1414
}
1515

1616
output "this_s3_bucket_bucket_regional_domain_name" {
1717
description = "The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL."
18-
value = element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, list("")), 0)
18+
value = element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, [""]), 0)
1919
}
2020

2121
output "this_s3_bucket_hosted_zone_id" {
2222
description = "The Route 53 Hosted Zone ID for this bucket's region."
23-
value = element(concat(aws_s3_bucket.this.*.hosted_zone_id, list("")), 0)
23+
value = element(concat(aws_s3_bucket.this.*.hosted_zone_id, [""]), 0)
2424
}
2525

2626
output "this_s3_bucket_region" {
2727
description = "The AWS region this bucket resides in."
28-
value = element(concat(aws_s3_bucket.this.*.region, list("")), 0)
28+
value = element(concat(aws_s3_bucket.this.*.region, [""]), 0)
2929
}
3030

3131
output "this_s3_bucket_website_endpoint" {
3232
description = "The website endpoint, if the bucket is configured with a website. If not, this will be an empty string."
33-
value = element(concat(aws_s3_bucket.this.*.website_endpoint, list("")), 0)
33+
value = element(concat(aws_s3_bucket.this.*.website_endpoint, [""]), 0)
3434
}
3535

3636
output "this_s3_bucket_website_domain" {
3737
description = "The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records. "
38-
value = element(concat(aws_s3_bucket.this.*.website_domain, list("")), 0)
38+
value = element(concat(aws_s3_bucket.this.*.website_domain, [""]), 0)
3939
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.12.6"
2+
required_version = ">= 0.12.26"
33

44
required_providers {
55
aws = ">= 3.0"

0 commit comments

Comments
 (0)