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

Support aws_s3_bucket in partitions without S3 Object Lock option available #24809

Closed
Simple-Analysis opened this issue May 17, 2022 · 5 comments · Fixed by #25098
Closed

Support aws_s3_bucket in partitions without S3 Object Lock option available #24809

Simple-Analysis opened this issue May 17, 2022 · 5 comments · Fixed by #25098
Assignees
Labels
bug Addresses a defect in current functionality. partition/aws-iso Pertains to the aws-iso partition. partition/aws-iso-b Pertains to the aws-iso-b partition. partition/aws-us-gov Pertains to the aws-us-gov partition. service/s3 Issues and PRs that pertain to the s3 service.
Milestone

Comments

@Simple-Analysis
Copy link

Simple-Analysis commented May 17, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.13.0
aws-provider hashicorp/aws v4.10.0

Affected Resource(s)

  • aws_s3_bucket

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_s3_bucket" "test" {
   bucket = "tf-test-bucket"
}

Debug Output

...
Error: error creating S3 Bucket (tf-test-bucket): InvalidBucketState: Object Lock headers are not supported for target bucket endpoint.
      status code: 409,
...

Expected Behavior

In partitions that do not support S3 Object Lock, the S3 Bucket will be created when object_lock_enabled parameter is not declared.

Actual Behavior

The aws_s3_bucket resource is not created because the S3 Object Lock is expected to be queried.

Steps to Reproduce

  1. terraform apply

Important Factoids

The S3 Bucket is being provisioned on a partition that does not have S3 Object Lock available.

The only workaround seems to be creating the S3 Bucket and using the data source for resources that are dependent on the exported attributes.

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. labels May 17, 2022
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels May 17, 2022
@scotthesterberg
Copy link

Is there any news on this, it seems to have gotten stale, but a fix would be quite helpful.

@Simple-Analysis
Copy link
Author

Simple-Analysis commented Jun 27, 2022

Is there any news on this, it seems to have gotten stale, but a fix would be quite helpful.

We are still running into the issue in our environment. I was hoping the pull request would be sufficient but I wasn't quite sure what to expect.

Unfortunately we can't move to any newer versions (> 4.0.0) because of this issue and the Load Balancer updates for other partitions. So our provider versions are really scattered until the change is made.

@Simple-Analysis
Copy link
Author

Possibly related to refactor effort #23106

@YakDriver YakDriver added partition/aws-us-gov Pertains to the aws-us-gov partition. partition/aws-iso Pertains to the aws-iso partition. partition/aws-iso-b Pertains to the aws-iso-b partition. labels Jul 25, 2022
@YakDriver YakDriver self-assigned this Jul 25, 2022
@github-actions github-actions bot added this to the v4.24.0 milestone Jul 25, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This functionality has been released in v4.24.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. partition/aws-iso Pertains to the aws-iso partition. partition/aws-iso-b Pertains to the aws-iso-b partition. partition/aws-us-gov Pertains to the aws-us-gov partition. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants