Skip to content
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

Can't initialize backend since provider > 2.20 #9617

Closed
scalp42 opened this issue Aug 4, 2019 · 8 comments
Closed

Can't initialize backend since provider > 2.20 #9617

scalp42 opened this issue Aug 4, 2019 · 8 comments
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. upstream Addresses functionality related to the cloud provider.
Milestone

Comments

@scalp42
Copy link
Contributor

scalp42 commented Aug 4, 2019

Not sure if related to #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!

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 4, 2019
@scalp42 scalp42 changed the title Can't initialize backend since Terraform 0.12 upgrade Can't initialize backend since provider > 2.20 Aug 4, 2019
@scalp42
Copy link
Contributor Author

scalp42 commented Aug 4, 2019

Just downgraded to 2.20 and it works again.

@ewbankkit
Copy link
Contributor

@scalp42 It looks like this is caused by a bug in the AWS SDK - aws/aws-sdk-go#2727 - that has just been merged and should be released in their next version.
The bug was introduced via aws/aws-sdk-go#2694, released in AWS SDK v1.21.0, merged into this provider via #9333 and released in provider v2.21.0.

@ewbankkit
Copy link
Contributor

The fix has just been released in AWS SDK v1.22.0.
Requires:

@scalp42
Copy link
Contributor Author

scalp42 commented Aug 7, 2019

thanks for sharing @ewbankkit we'll watch for the next release of aws provider, cc @evandam

@bflad bflad added bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. upstream Addresses functionality related to the cloud provider. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 7, 2019
@bflad bflad added this to the v2.23.0 milestone Aug 7, 2019
@bflad
Copy link
Contributor

bflad commented Aug 7, 2019

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.

@ghost
Copy link

ghost commented Aug 7, 2019

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!

@scalp42
Copy link
Contributor Author

scalp42 commented Sep 5, 2019

I opened #9999 as there are more issues but not sure if they're related.

@ghost
Copy link

ghost commented Nov 1, 2019

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!

@ghost ghost locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

No branches or pull requests

3 participants