-
Notifications
You must be signed in to change notification settings - Fork 60
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] #61
Comments
[Untriage] |
Hi @prudhvigodithi: I can confirm the reported issue. I just tested version 2.0.0-beta.1 of the provider and got the same errors without changing the provider configuration used with v1.0.0.
Provider config
I checked the updated provider usage documentation and tested the described default for Assume role configuration
I tried different values for |
Hey thanks @reneeckstein, its good at least not blocking and allowing to move forward, can you please contribute to fix the bug with your suggestion ? |
Set profile to default when using assume role and user doesnt pass Role name Update aws sdk to version opensearch-project#64
Set profile to default when using assume role and user doesnt pass Role name Update aws sdk to version opensearch-project#64 Signed-off-by: Kirmayer Elad <[email protected]>
Hm I'm getting this error even when I include aws_assume_role_external_id |
* Fix require ExternalId when not needed #61 Set profile to default when using assume role and user doesnt pass Role name Update aws sdk to version #64 Signed-off-by: Kirmayer Elad <[email protected]> * Update the golandci-lint. https://github.com/golangci/golangci-lint-action#compatibility Signed-off-by: Kirmayer Elad <[email protected]> --------- Signed-off-by: Kirmayer Elad <[email protected]>
Closing this issue and PR related to issue is merged #76. |
@shalom-alloy @estebane-frb @prudhvigodithi I'm getting the same error using provider v2.0.0. Would you pls test on your side and if you experience the same issue, reopen the bug. |
Just tested it again with v2.0.0 and still experiencing the same issue. I don't have access to reopen this bug. @shalom-alloy are you or @prudhvigodithi able to reopen it? |
Reopening the bug, adding @ekirmayer, can you please add some insights with the PR merged #76 |
@viktord @estebane-frb @prudhvigodithi the change included two parts:
I've tested the new provider (2.0.0) on a 2.7 cluster. Here is my code. As you can see, i dont set the external id as i dont need it.
Let me know if this doesnt work and i will try to run it on a 2.5 cluster |
Hi @ekirmayer I just tried the above and I still have the same error. I wonder - should the aws_profile be required? In my case I am using a role assumed by my pipeline server so there won't be a profile. Or for example in cases where I use AWS_* environment variables. I tried setting it to "default" but I still got the same error. |
@estebane-frb the way the provider is defined at the moment, as i understand it, is that you have to pass a profile. This is why i've set it to at-least take the default. I do believe that this is not a must and can be change. |
Same here, I've tested it without |
Same here, I guess setting a profile or assuming the default one should not be necessary |
Hi @ekirmayer finished testing the assume role again with your asks but unfortunately we are still getting the same error. I also have a side question - does the provider currently support non-standard partitions like China and GovCloud OpenSearch partitions? (aws-cn, aws-us-gov) respectively. |
@estebane-frb can you send me a gist of code example for our provider and maybe a sample for Opensearch Cluster? |
I think the default profile should be the problem. So if you don't specify a profile it assumes that you are using the 'default' profile. There is a small PR #87 that should fix it (sorry I didn't notice this thread here before) |
Is this fixed in release 2.1.0? |
Since the PR was merged #87 and released in 2.1.0, can we close this issue? or can you folks please confirm if the issue was resolved? |
What is the bug?
Getting errors when trying to use aws_assume_role_arn.
Error: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors
If I add directly the role of terraform(aws_profile) to the security_managers opensearch role, it works like a charm - but when trying to assume one of the roles that are already in there - I get that error message.
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 behavior?
Role will get assumed and it's permissions applied when access opensearch.
What is your host/environment?
AWS opensearch domain - Opensearch 2.5 cluster with fine grained access control applied.
Do you have any additional context?
AWS environment, opensearch domain version 2.5 with fine grained control enabled, trying to add role mapping vis the opensearch provider(version 1.0.0).
It works as long as I don't try to assume a role(using aws_profile), assuming a role throws the error mentioned above.
The relevant provider config in terraform looks like that(removing sensitive data):
provider "opensearch" {
url = "https://${aws_elasticsearch_domain.this.endpoint}"
aws_region = data.aws_region.current.name
sign_aws_requests = true
healthcheck = false
opensearch_version = "OpenSearch_2.5"
aws_assume_role_arn = "arn:aws:iam::xxxxxxxxxxxxxx:role/yyyyyyyyyyyyyyy"
}
The text was updated successfully, but these errors were encountered: