-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[AWS SDK for Go Migration] Meta Data Sources (Region) Service #39389
base: main
Are you sure you want to change the base?
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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 @hskiba 👋
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 CONTRIBUTOR 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! 😃
64c13a6
to
07827d3
Compare
This resolves problems using region lookup for the newly-launched Malaysia region
ap-southeast-5
(see #36224).This migrates the region data source to AWS SDK v2. In v2, the
endpoints
package is no longer available. Now, regions need to be queried in the account using the configured client. I chose to use the ec2 client given the current data source supports lookup using the EC2 endpoint. The change in behavior is that if a region is valid but is not available to the account, e.g.,cn-north-1
when in the standard partition, the region lookup by name will fail. A number of tests that were successful before because they were static lookups embedded in the SDK are no longer successful when running outside of their partition. I adjusted these tests (TestAccMetaServicePrincipal
) to be skipped if not being run from the test case region's partition.Relations
Relates #36188.
Closes #39224.
Relates #38989.
References
Output from Acceptance Testing