[Version 2 Release] provider: Return error if AWS account ID cannot be determined with skip_requesting_account_id = false #7674
Labels
provider
Pertains to the provider itself, rather than any interaction with AWS.
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
Milestone
Description
Tracking issue for: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#skip_requesting_account_id-argument-now-required-to-skip-account-id-lookup-errors
If the provider is unable to determine the AWS account ID from a provider assume role configuration or the STS GetCallerIdentity call used to verify the credentials (if
skip_credentials_validation = false
), it will attempt to lookup the AWS account ID via EC2 metadata, IAM GetUser, IAM ListRoles, and STS GetCallerIdentity. Previously, the provider would silently allow the failure of all the above methods.The provider will now return an error to ensure operators understand the implications of the missing AWS account ID in the provider.
If necessary, the AWS account ID lookup logic can be skipped via:
Remediation
Previously, this pull request would have handled this change: #5795
We are now migrating to a shared AWS Go SDK Client instantiation library between the Terraform AWS Provider and Terraform S3 Backend: #7653
The log message conversion to an error now needs to occur upstream and the library dependency updated with the change.
The text was updated successfully, but these errors were encountered: