Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates s3 resource to reflect aws provider upgrade to v4.0. #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serkanh
Copy link

@serkanh serkanh commented Mar 8, 2022

Issue #, if available:
Updates s3 resource to reflect aws provider upgrade to v4.0. based on https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-4-upgrade\#acl-argument
Without this upgrade Terraform plan will result in the following error:

➜  Terraform_DEPLOY_AHA git:(main) ✗ terraform plan
╷
│ Error: Value for unconfigurable attribute
│ 
│   with aws_s3_bucket.AHA-S3Bucket-PrimaryRegion,
│   on Terraform_DEPLOY_AHA.tf line 201, in resource "aws_s3_bucket" "AHA-S3Bucket-PrimaryRegion":
│  201:     acl        = "private"
│ 
│ Can't configure a value for "acl": its value will be decided automatically based on the result of applying this configuration.
╵
╷
│ Error: Value for unconfigurable attribute
│ 
│   with aws_s3_bucket.AHA-S3Bucket-SecondaryRegion,
│   on Terraform_DEPLOY_AHA.tf line 211, in resource "aws_s3_bucket" "AHA-S3Bucket-SecondaryRegion":
│  211:     acl        = "private"
│ 
│ Can't configure a value for "acl": its value will be decided automatically based on the result of applying this configuration.
╵
➜  Terraform_DEPLOY_AHA git:(aws-provider-v4-s3-upgrade) ✗ terraform --version
Terraform v1.1.6
on darwin_amd64
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v4.4.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@serkanh serkanh changed the title updated s3 resource to reflect aws provider upgrade to v4.0. Updates s3 resource to reflect aws provider upgrade to v4.0. Mar 8, 2022
@dthomasag
Copy link

Can someone provide an update on the status of this PR? I just ran into this as well.

@dthomasag
Copy link

dthomasag commented Apr 6, 2022

By the way, it looks like the provider isn't locked to a version or range, so this could be an issue with each major update. It might be good to lock the AWS provider to a version to prevent this in the future.

FYI, there may be more changes necessary to update the S3 resources for 4.0.
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-4-upgrade#s3-bucket-refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants