-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Fix bucket_regional_domain_name for us-east-1 region #25724
Fix bucket_regional_domain_name for us-east-1 region #25724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @mattbork 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
EndpointFor needs the S3UsEast1RegionalEndpoint option set or else it returns the legacy (global) endpoint for S3 buckets in the us-east-1 region.
Replace broken link to AWS forum thread with relevant section from the AWS S3 User Guide. Update link to S3 endpoint reference that was moved.
5307c19
to
367b8e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @mattbork. We're going to release this as part of v5.0, because it is potentially a breaking change. While the bucket_regional_domain_name
seems to work when consumed by other services, there may be unintended effects.
In us-west-2
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (51.11s)
--- PASS: TestAccS3BucketDataSource_basic (70.62s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (70.99s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (87.60s)
--- PASS: TestAccS3Bucket_Manage_objectLock_deprecatedEnabled (87.80s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning_deprecatedEnabled (88.73s)
--- PASS: TestAccS3Bucket_Security_logging (88.50s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning (90.90s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (103.88s)
--- PASS: TestAccS3Bucket_Manage_objectLock_migrate (104.03s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (115.35s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (116.67s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (116.64s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRemove (127.06s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (133.90s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (139.12s)
--- PASS: TestAccS3Bucket_Manage_objectLock (144.60s)
--- PASS: TestAccS3Bucket_Duplicate_UsEast1 (41.20s)
--- PASS: TestAccS3Bucket_Duplicate_basic (38.58s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (88.78s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (89.22s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (185.79s)
--- PASS: TestAccS3Bucket_disappears (71.44s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (85.90s)
--- PASS: TestAccS3Bucket_Web_routingRules (141.71s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (208.60s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (112.36s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (150.33s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (162.71s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (97.75s)
--- PASS: TestAccS3Bucket_Basic_generatedName (110.13s)
--- PASS: TestAccS3Bucket_Tags_basic (116.99s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (96.34s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (108.23s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (171.01s)
--- PASS: TestAccS3Bucket_Basic_emptyString (103.94s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMFADeleteDisabled (103.76s)
--- PASS: TestAccS3Bucket_Basic_basic (108.39s)
--- PASS: TestAccS3Bucket_Web_redirect (224.09s)
--- PASS: TestAccS3Bucket_Web_simple (227.19s)
--- PASS: TestAccS3Bucket_Basic_acceleration (173.35s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (126.29s)
--- PASS: TestAccS3Bucket_Security_corsDelete (69.78s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (80.98s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (86.71s)
--- PASS: TestAccS3Bucket_Manage_MFADeleteDisabled (84.08s)
--- PASS: TestAccS3Bucket_Security_corsSingleMethodAndEmptyOrigin (72.08s)
--- PASS: TestAccS3BucketDataSource_website (60.12s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (66.29s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (124.51s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (293.97s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (243.93s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (385.30s)
--- PASS: TestAccS3Bucket_Manage_versioning (95.05s)
--- PASS: TestAccS3Bucket_Replication_basic (186.52s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (184.07s)
In us-east-1
--- PASS: TestAccS3Bucket_Replication_expectVersioningValidationError (70.58s)
--- PASS: TestAccS3BucketDataSource_basic (97.43s)
--- PASS: TestAccS3Bucket_Security_corsDelete (98.43s)
--- PASS: TestAccS3Bucket_Security_corsEmptyOrigin (111.34s)
--- PASS: TestAccS3Bucket_Security_corsSingleMethodAndEmptyOrigin (111.36s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenAES256IsUsed (115.17s)
--- PASS: TestAccS3Bucket_Security_enableDefaultEncryptionWhenTypical (115.56s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning_deprecatedEnabled (122.89s)
--- PASS: TestAccS3Bucket_Replication_schemaV2SameRegion (123.33s)
--- PASS: TestAccS3Bucket_Security_logging (123.86s)
--- SKIP: TestAccS3Bucket_Duplicate_UsEast1AltAccount (0.02s)
--- PASS: TestAccS3Bucket_Replication_withoutStorageClass (142.54s)
--- PASS: TestAccS3Bucket_Replication_withoutPrefix (147.22s)
--- PASS: TestAccS3Bucket_Web_routingRules (169.18s)
--- PASS: TestAccS3Bucket_Security_disableDefaultEncryptionWhenDefaultEncryptionIsEnabled (170.51s)
--- PASS: TestAccS3Bucket_Security_corsUpdate (174.26s)
--- PASS: TestAccS3Bucket_Manage_versioningAndMFADeleteDisabled (83.70s)
--- PASS: TestAccS3Bucket_Manage_MFADeleteDisabled (83.65s)
--- PASS: TestAccS3Bucket_Replication_twoDestination (108.62s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsNonEmptyFilter (107.06s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAddAccessControlTranslation (207.97s)
--- PASS: TestAccS3Bucket_Manage_versioningDisabled (84.39s)
--- PASS: TestAccS3Bucket_Manage_objectLockWithVersioning (85.67s)
--- PASS: TestAccS3Bucket_Replication_multipleDestinationsEmptyFilter (105.49s)
--- PASS: TestAccS3Bucket_Web_redirect (219.14s)
--- PASS: TestAccS3Bucket_Manage_objectLock_deprecatedEnabled (77.93s)
--- SKIP: TestAccS3Bucket_Duplicate_basic (0.00s)
--- PASS: TestAccS3Bucket_Web_simple (223.95s)
--- PASS: TestAccS3Bucket_Manage_objectLock_migrate (94.99s)
--- PASS: TestAccS3Bucket_Replication_ruleDestinationAccessControlTranslation (173.14s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleAbortIncompleteMultipartUploadDaysNoExpiration (70.09s)
--- PASS: TestAccS3Bucket_Duplicate_UsEast1 (32.47s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRuleExpirationEmptyBlock (53.65s)
--- PASS: TestAccS3Bucket_disappears (38.21s)
--- PASS: TestAccS3Bucket_Manage_versioning (142.27s)
--- PASS: TestAccS3Bucket_Manage_lifecycleRemove (97.20s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithObjectLockEnabled (57.51s)
--- PASS: TestAccS3Bucket_Tags_basic (67.61s)
--- PASS: TestAccS3Bucket_Manage_objectLock (114.28s)
--- PASS: TestAccS3Bucket_Replication_RTC_valid (285.35s)
--- PASS: TestAccS3Bucket_Replication_basic (178.45s)
--- PASS: TestAccS3Bucket_Manage_lifecycleExpireMarkerOnly (93.77s)
--- PASS: TestAccS3Bucket_Tags_ignoreTags (88.20s)
--- PASS: TestAccS3Bucket_Basic_keyEnabled (57.46s)
--- PASS: TestAccS3Bucket_Basic_generatedName (49.64s)
--- PASS: TestAccS3Bucket_Basic_forceDestroyWithEmptyPrefixes (43.08s)
--- PASS: TestAccS3Bucket_Basic_forceDestroy (42.51s)
--- PASS: TestAccS3Bucket_Manage_lifecycleBasic (91.15s)
--- PASS: TestAccS3Bucket_Basic_namePrefix (39.00s)
--- PASS: TestAccS3Bucket_Basic_requestPayer (79.34s)
--- PASS: TestAccS3Bucket_Basic_basic (38.50s)
--- PASS: TestAccS3BucketDataSource_website (33.06s)
--- PASS: TestAccS3Bucket_Basic_emptyString (38.07s)
--- PASS: TestAccS3Bucket_Replication_schemaV2 (312.50s)
--- PASS: TestAccS3Bucket_Basic_acceleration (70.94s)
--- PASS: TestAccS3Bucket_Tags_withNoSystemTags (128.66s)
--- PASS: TestAccS3Bucket_Tags_withSystemTags (153.89s)
This functionality has been released in v5.0.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! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
S3 buckets in the us-east-1 region currently always have their
bucket_regional_domain_name
attribute equal to their (global)bucket_domain_name
attribute. This is becauseBucketRegionalDomainName
does not set theS3UsEast1RegionalEndpoint
option when callingEndpointFor
. This behavior does not directly cause issues with CloudFront DNS routing (the motivation for addingbucket_regional_domain_name
) because a legacy global endpoint will go to the us-east-1 region by default. However, it's still counter-intuitive and differs from, for example, theRegionalDomainName
attribute in CloudFormation.I fixed this, updated the relevant acceptance test, and also updated broken links in the documentation for
bucket_regional_domain_name
.Community Note
Closes #15102.
Output from acceptance testing: