-
Notifications
You must be signed in to change notification settings - Fork 58
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
[BUG] NoCredentialProviders for assuming role in provider #207
Comments
[Triage] Are you using aws terraform provider or terraform-provider-opensearch to deploy the cluster? |
@gaiksaya Seeing the same issue. We are indeed creating the OpenSearch cluster with the AWS provider. Why is that important? Anything special to consider to make it work? Example:
When trying to do something inside the AWS OpenSearch with the OpenSearch provider like creating an Could it be that you use a depracated AWS SDK in your implementation of the provider and the assuming isn't working (anymore)? Another thing I came across, not sure though whether it is related (but feels like it), ... Example: When trying to do something inside the AWS OpenSearch with the OpenSearch provider like creating an But maybe there is some magic happening in AWS OpenSearch like AWS is doing on their EKS clusters (earlier) where the IAM role that created the EKS cluster initially was always granted |
Hey @robert-becker-hs and @spr-mweber3 here is some discussion from past issue #61 (comment). Also an example https://github.com/rblcoder/terraform-opensearch-samples/blob/main/aws_opensearch_assume_role/main.tf on how to use |
@prudhvigodithi I have the same issue as already described by @robert-becker-hs and @spr-mweber3, and nothing seems to be effective in fixing it. I went through issue #61, but I didn't find anything helpful. In short, I can make it work if I use aws_profile, but unfortunately, it doesn't seem to work if I provide aws_assume_role_arn, regardless of the permissions assigned to this role. Could this issue be maybe related to the fact that I am running Terraform as an SSO-authenticated user? |
Hey @fmlisco can you try to use
An example added here https://github.com/rblcoder/terraform-opensearch-samples/blob/main/aws_opensearch_assume_role/main.tf#L10C1-L18C2. If Thank you |
I found the solution and would like to share it here in hopes that it can help someone.
|
Thanks @fmlisco once you added this setting can you please share your |
Should be fixed with #218 You can test it with my fork: https://registry.terraform.io/providers/gnuletik/opensearch/latest/docs |
Any update on this and when #218 going to be merged and released |
What is the bug?
Using the
aws_assume_role_arn
option in the provider config ends with throwing aNoCredentialProviders
error during Terraform apply stage.I have an active Open Search cluster in AWS, all IAM roles exist.
Terraform
Result
How can one reproduce the bug?
Try using the role assumption for any OpenSearch change and the above error shows up.
What is the expected behaviour?
The OpenSearch role was created successfully using the assumed role.
What is your host/environment?
MacOS 14.5 (M1 Mac)
Do you have any additional context?
If I am not using the
aws_assume_role_arn
property and run Terraform, the apply times out after 5 minutes. I checked that I am able to assume the rolemodule.es.master_role_arn
. I also checked similar open issues and tried out several other config settings but without success. Downgrading the module to lower minor version also yielded no resultsThe text was updated successfully, but these errors were encountered: