Not sure if related to https://github.com/terraform-providers/terraform-provider-aws/pull/9428
but trying to initalize backend:
AWS_SDK_LOAD_CONFIG=1 AWS_REGION=us-west-2 terraform init
Initializing modules...
Initializing the backend...
Error: Error creating AWS session: CredentialRequiresARNError: credential type source_profile requires role_arn, profile bridge
It was working fine on Terraform 0.11:
$> cat ~/.aws/config
[profile dev]
role_arn = arn:aws:iam::xxxxx:role/admin
role_session_name = anthony-dev
source_profile = bridge
region = us-west-2
$> cat main.tf
provider "aws" {
alias = "dev-us-west-2"
region = "us-west-2"
profile = "dev"
allowed_account_ids = ["xxxxx"]
}
Any idea? Thanks in advance!
Just downgraded to 2.20 and it works again.
@scalp42 It looks like this is caused by a bug in the AWS SDK - https://github.com/aws/aws-sdk-go/issues/2727 - that has just been merged and should be released in their next version.
The bug was introduced via https://github.com/aws/aws-sdk-go/pull/2694, released in AWS SDK v1.21.0, merged into this provider via https://github.com/terraform-providers/terraform-provider-aws/pull/9333 and released in provider v2.21.0.
The fix has just been released in AWS SDK v1.22.0.
Requires:
thanks for sharing @ewbankkit we'll watch for the next release of aws provider, cc @evandam
I merged in #9555 earlier today, which should have the upstream AWS Go SDK fix. 🤞 This will release with version 2.23.0 of the Terraform AWS Provider in the next day or two.
Please note that the Terraform S3 Backend code lives upstream in Terraform Core (https://github.com/hashicorp/terraform/tree/master/backend/remote-state/s3) so a separate GitHub issue and SDK bump will be required there.
This has been released in version 2.23.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 for triage. Thanks!
I opened https://github.com/terraform-providers/terraform-provider-aws/issues/9999 as there are more issues but not sure if they're related.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
I merged in #9555 earlier today, which should have the upstream AWS Go SDK fix. 🤞 This will release with version 2.23.0 of the Terraform AWS Provider in the next day or two.
Please note that the Terraform S3 Backend code lives upstream in Terraform Core (https://github.com/hashicorp/terraform/tree/master/backend/remote-state/s3) so a separate GitHub issue and SDK bump will be required there.