Error: <...> failed to resolve service endpoint, an AWS region is required, but was not found
Relevant Error/Panic Output Snippet
Error: configuring Terraform AWS Provider: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, failed to resolve service endpoint, an AWS region is required, but was not found
terraform apply -auto-approve -target=local_file.shared_config
terraform plan -target=aws_iam_user.dummy
Debug Output
Error: configuring Terraform AWS Provider: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, failed to resolve service endpoint, an AWS region is required, but was not found
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.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.4.4
AWS Provider Version
4.61.0
Affected Resource(s)
provider itself (
provider "aws"
configuration block)Expected Behavior
region
is set via a shared config file parameterregion
ifprofile
is used, as described in https://registry.terraform.io/providers/hashicorp/aws/latest/docs#regionActual Behavior
Error: <...> failed to resolve service endpoint, an AWS region is required, but was not found
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Debug Output
Panic Output
No response
Important Factoids
No response
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs#region
Would you like to implement a fix?
No