diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 00f42c16..4963e575 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,7 @@ repos: rev: v1.46.0 hooks: - id: terraform_fmt + - id: terraform_validate - id: terraform_docs - id: terraform_tflint args: diff --git a/README.md b/README.md index e877d01b..e28da2d6 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ module "s3_bucket" { | Name | Version | |------|---------| -| terraform | >= 0.12.6 | +| terraform | >= 0.12.26 | | aws | >= 3.0 | ## Providers @@ -101,11 +101,11 @@ No Modules. | Name | |------| -| [aws_elb_service_account](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/elb_service_account) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) | -| [aws_s3_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_policy) | -| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_public_access_block) | -| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket) | +| [aws_elb_service_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elb_service_account) | +| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | +| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | +| [aws_s3_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | +| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | ## Inputs diff --git a/examples/complete/README.md b/examples/complete/README.md index d0fb1eb9..9d43a590 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -29,15 +29,15 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.6, < 0.14 | -| aws | >= 3.0, < 4.0 | +| terraform | >= 0.12.26 | +| aws | >= 3.0 | | random | ~> 2 | ## Providers | Name | Version | |------|---------| -| aws | >= 3.0, < 4.0 | +| aws | >= 3.0 | | random | ~> 2 | ## Modules @@ -52,11 +52,11 @@ Note that this example may create resources which cost money. Run `terraform des | Name | |------| -| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/data-sources/canonical_user_id) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/data-sources/iam_policy_document) | -| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/resources/iam_role) | -| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/4.0/docs/resources/kms_key) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2/docs/resources/pet) | +| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | +| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | +| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | +| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | +| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | ## Inputs diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index 06cd171a..c0a15fba 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -1,8 +1,8 @@ terraform { - required_version = ">= 0.12.6, < 0.14" + required_version = ">= 0.12.26" required_providers { - aws = ">= 3.0, < 4.0" + aws = ">= 3.0" random = "~> 2" } } diff --git a/examples/notification/README.md b/examples/notification/README.md index 1dd246f4..44df215a 100644 --- a/examples/notification/README.md +++ b/examples/notification/README.md @@ -19,7 +19,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.6 | +| terraform | >= 0.12.26 | | aws | >= 3.0 | | null | >= 2 | | random | >= 2 | @@ -47,12 +47,12 @@ Note that this example may create resources which cost money. Run `terraform des | Name | |------| -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) | -| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue_policy) | -| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue) | -| [null_data_source](https://registry.terraform.io/providers/hashicorp/null/2/docs/data-sources/data_source) | -| [null_resource](https://registry.terraform.io/providers/hashicorp/null/2/docs/resources/resource) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2/docs/resources/pet) | +| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | +| [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | +| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | +| [null_data_source](https://registry.terraform.io/providers/hashicorp/null/latest/docs/data-sources/data_source) | +| [null_resource](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | +| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | ## Inputs diff --git a/examples/notification/versions.tf b/examples/notification/versions.tf index 75422136..2f545e55 100644 --- a/examples/notification/versions.tf +++ b/examples/notification/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12.6" + required_version = ">= 0.12.26" required_providers { aws = ">= 3.0" diff --git a/examples/s3-replication/README.md b/examples/s3-replication/README.md index 72979807..3e4ab191 100644 --- a/examples/s3-replication/README.md +++ b/examples/s3-replication/README.md @@ -21,7 +21,7 @@ Note that this example may create resources which cost money. Run `terraform des | Name | Version | |------|---------| -| terraform | >= 0.12.6 | +| terraform | >= 0.12.26 | | aws | >= 3.0 | | random | >= 2.0 | @@ -44,12 +44,12 @@ Note that this example may create resources which cost money. Run `terraform des | Name | |------| -| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/caller_identity) | -| [aws_iam_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_policy_attachment) | -| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_policy) | -| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/iam_role) | -| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/kms_key) | -| [random_pet](https://registry.terraform.io/providers/hashicorp/random/2.0/docs/resources/pet) | +| [aws_caller_identity](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | +| [aws_iam_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | +| [aws_iam_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment) | +| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | +| [aws_kms_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | +| [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | ## Inputs diff --git a/examples/s3-replication/versions.tf b/examples/s3-replication/versions.tf index 555675f1..2cd6694d 100644 --- a/examples/s3-replication/versions.tf +++ b/examples/s3-replication/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12.6" + required_version = ">= 0.12.26" required_providers { aws = ">= 3.0" diff --git a/modules/notification/README.md b/modules/notification/README.md index 93a5a2f1..43b1922d 100644 --- a/modules/notification/README.md +++ b/modules/notification/README.md @@ -25,12 +25,12 @@ No Modules. | Name | |------| -| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/arn) | -| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/iam_policy_document) | -| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/lambda_permission) | -| [aws_s3_bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_notification) | -| [aws_sns_topic_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sns_topic_policy) | -| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/sqs_queue_policy) | +| [aws_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | +| [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | +| [aws_lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | +| [aws_s3_bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | +| [aws_sns_topic_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_policy) | +| [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | ## Inputs diff --git a/outputs.tf b/outputs.tf index 27ee7e86..c909f59b 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,39 +1,39 @@ output "this_s3_bucket_id" { description = "The name of the bucket." - value = element(concat(aws_s3_bucket_policy.this.*.id, aws_s3_bucket.this.*.id, list("")), 0) + value = element(concat(aws_s3_bucket_policy.this.*.id, aws_s3_bucket.this.*.id, [""]), 0) } output "this_s3_bucket_arn" { description = "The ARN of the bucket. Will be of format arn:aws:s3:::bucketname." - value = element(concat(aws_s3_bucket.this.*.arn, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.arn, [""]), 0) } output "this_s3_bucket_bucket_domain_name" { description = "The bucket domain name. Will be of format bucketname.s3.amazonaws.com." - value = element(concat(aws_s3_bucket.this.*.bucket_domain_name, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.bucket_domain_name, [""]), 0) } output "this_s3_bucket_bucket_regional_domain_name" { 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." - value = element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.bucket_regional_domain_name, [""]), 0) } output "this_s3_bucket_hosted_zone_id" { description = "The Route 53 Hosted Zone ID for this bucket's region." - value = element(concat(aws_s3_bucket.this.*.hosted_zone_id, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.hosted_zone_id, [""]), 0) } output "this_s3_bucket_region" { description = "The AWS region this bucket resides in." - value = element(concat(aws_s3_bucket.this.*.region, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.region, [""]), 0) } output "this_s3_bucket_website_endpoint" { description = "The website endpoint, if the bucket is configured with a website. If not, this will be an empty string." - value = element(concat(aws_s3_bucket.this.*.website_endpoint, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.website_endpoint, [""]), 0) } output "this_s3_bucket_website_domain" { 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. " - value = element(concat(aws_s3_bucket.this.*.website_domain, list("")), 0) + value = element(concat(aws_s3_bucket.this.*.website_domain, [""]), 0) } diff --git a/versions.tf b/versions.tf index 9b878f67..84e7b654 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.12.6" + required_version = ">= 0.12.26" required_providers { aws = ">= 3.0"