[Bug]: provider assume_role configuration doesn't work with "known after apply" roles #39359
Labels
authentication
Pertains to authentication; to the provider itself of otherwise.
bug
Addresses a defect in current functionality.
provider
Pertains to the provider itself, rather than any interaction with AWS.
Terraform Core Version
1.5.7
AWS Provider Version
5.67.0
Affected Resource(s)
This affects the provider configuration, when using
assume_role
Expected Behavior
When specifying a role output by a resource, terraform should still be able to plan and deploy, assuming that the resource can be created before any AWS resource.
Actual Behavior
This stopped working in version 5.67.0, I suspect is related to pr 39255.
It seems that this will be partially fixed in the release 5.68.0 (not yet released at the time of writing this) and the error becomes a warning, but it still states that it will be an error in the future.
Relevant Error/Panic Output Snippet
With locally compiled HEAD (what's going to be version 5.68.0
Terraform Configuration Files
Running
terraform plan
with the following configuration failsThis is just to illustrate that a role created by the same terraform configuration breaks the provider configuration, I don't expect a random pet name to be a valid role name :)
Steps to Reproduce
Run
terraform init && terraform plan
, it should fail withDebug Output
No response
Panic Output
No response
Important Factoids
When run with a locally compiled head (f9b51ad), it outputs a warning instead:
References
I suspect that this change introduced the problem: https://github.com/hashicorp/terraform-provider-aws/pull/39255/files
Also that this fix changes the error to a warning: #39328
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: