Open andre1704 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
The AWS documentation around enabling versioning for S3 Outposts mentions using aws s3control put-bucket-versioning
in order to enable versioning on Outposts buckets. It doesn't look like there's currently a resource that uses the underlying s3control.PutBucketVersioning
function, so we'll need to add a new resource in order to achieve this. I'll add labels indicating as much.
/assign
Terraform Core Version
5.13.1
AWS Provider Version
1.5.5
Affected Resource(s)
aws_s3_bucket_versioning
Expected Behavior
For the bucket on the s3 outpost, a resource for versioning should be created and versioning would be enabled. I expect that after providing the bucket's name or access point of the s3 bucket on the outpost, this resource could be created.
Actual Behavior
When as a parameter for the resource aws_s3_bucket_versioning I set arn of the access point to the bucket I get an error:
Error: expected length of the bucket to be in the range (1 - 63), got arn:aws:s3-outposts:us-west-2:xxxxxxxxxxxx:outpost/op-xxxxxxxxxxxxxxxx/bucket/test0001
Whereas when I tried to set the parameter as an arn to the bucket I got
Error: expected length of bucket to be in the range (1 - 63), got arn:aws:s3-outposts:us-west-2:xxxxxxxxxxxx:outpost/op-xxxxxxxxxxxxxxxx/accesspoint/ap-test0001
When I tried just to use the bucket name I got an error:
Error: creating S3 bucket versioning for test0001: BucketRegionError: incorrect region, the bucket is not in 'us-west-2' region at endpoint '', bucket is in 'us-east-1' region
the third error I was expected because a bucket is on s3 outpost, but for the previous two the resource aws_s3_bucket_versioning should handle the situation when you use s3 outpost.
** For outpost id and account id I redacted them
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None