Terraform module that provision an S3 bucket to store the `terraform.tfstate` file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption.
This change avoids creating a policy object when prevent_unencrypted_uploads is set to false
why
With version 1.1.0, terraform apply fails with:
│ Error: Error putting S3 policy: MalformedPolicy: Policies must be valid JSON and the first byte must be '{'
│ status code: 400, request id: WZ7PGJ00QKNE2ZEJ, host id: qv+X4PBFIFqU6KIfIlyySSBBWRp0c4SgNFyu4Z71NJPI4x2x8uSopCZDdJ8nV96cxd+HMgG5gC4=
│
│ with module.s3-backend.module.terraform_state_backend.aws_s3_bucket_policy.default[0],
│ on .terraform/modules/s3-backend.terraform_state_backend/main.tf line 155, in resource "aws_s3_bucket_policy" "default":
│ 155: resource "aws_s3_bucket_policy" "default" {
│
what
This change avoids creating a policy object when
prevent_unencrypted_uploads
is set tofalse
why
With version 1.1.0, terraform apply fails with:
This change fixes this issue
references