Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
serkanh wants to merge 1 commit into aws-samples:main
base: main
Choose a base branch
Loading
from serkanh:aws-provider-v4-s3-upgrade

Conversation

@serkanh
Copy link

@serkanh serkanh commented Mar 8, 2022
edited
Loading

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
Copy link

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

Copy link

dthomasag commented Apr 6, 2022
edited
Loading

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /