-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Terratest Unable to Use Terraform Provider with Assume Role #1500
Comments
Hey, can you share an example of a Do you have any specific permissions assigned to the role you are using for running |
provider "aws" { |
It looks like we have a matching setup. Can you confirm what permissions are bound to the AWS credentials you are using when running terratest? (before assume)
|
I have running terratest in runner and runner have permission to assume the role (arn:aws:iam::123456790:role/test-STG) and also I have added the trust relationship on role (arn:aws:iam::123456790:role/test-STG) |
Can you check if my example test works for you? You just need to update the IAM role that terraform should assume here. |
Describe the bug
I am facing an issue when attempting to use a Terraform provider with an assume_role configuration in Terratest. The same Terraform provider configuration works when running directly from the CLI (e.g., terraform init and terraform plan). However, when executing the same configuration via Terratest, the provider is unable to assume the role and throws an error.
To Reproduce
Expected behavior
The Terratest script should successfully execute terraform init and terraform plan while using the AWS provider configured with the assume_role block.
Nice to have
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: