-
Notifications
You must be signed in to change notification settings - Fork 59
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] Environment variable AWS_PROFILE, AWS_ACCESS_KEY_ID and AWS_ACCES_KEY not respected with aws_assume_role_arn #99
Comments
The same holds for using the |
@prudhvigodithi to take a look on this. |
@massimob76 @ekirmayer can you please add your thoughts ? |
@prudhvigodithi @andrejvanderzee that should be fixed by #87 |
Hi @prudhvigodithi I just tried release 2.1.0 and unfortunately am still getting this error: [INFO] Failed to put role mapping: NoCredentialProviders: no valid providers in chain. Deprecated. This is my current provider setup.
|
Thanks @estebane-frb for the feedback, adding @massimob76 @rblcoder to please take a look and help @estebane-frb to fix the issue. |
I am able to specify AWS profile both using
as well as
and
|
can't get it to work, i'm getting the following error : │ Error: HTTP 403 Forbidden: Permission denied. Please ensure that the correct credentials are being used to access the cluster. I can make it work using access_keys or basic auth but it doesn't meet our security requirements, which are, using IAM identity center. Any idea what's wrong here ? Either it is isn't using the profile, or there's a missing link somewhere behind that (i'm thinking of the application layer of IAM identity center) |
@falcocoris could you please share the terraform Opensearch provider configuration you are using? |
and my aws config file is like this :
There are some duplicates here as I was trying to force using an explicit profile etc, anyways, nothing worked. |
@falcocoris Using SSO works when OpenSearch allows access to the role ARN created by IAM Identity Center
https://docs.aws.amazon.com/singlesignon/latest/userguide/referencingpermissionsets.html |
that's exactly what i was missing, thx ! Do you think it's worth mentioning in the provider configuration section ? It's got nothing to do with the provider in the end, but wondering if it's relevent |
Thanks @rblcoder. Also @falcocoris this is more related to how the AWS OpenSearch is created with proper working SSO settings, adding it in terraform provider docs seems to me like its deviating the scope of the terraform provider. The provider is is cloud-agnostic it targets to work for OpenSearch for any given endpoint. Also I feel that SSO configuration with AWS OpenSearch should be part of AWS docs, WDYT @falcocoris @rblcoder @bbarani ? Also @falcocoris if you still think its better to add a one liner about this SSO setup (when used AWS OpenSearch), please feel free to raise a PR. Thanks |
@falcocoris, adding it to the OpenSearch Terraform provider documentation would deviate from its scope as it is something we are configuring in AWS. Do contribute a line on SSO configuration for AWS OpenSearch by submitting a PR, if you believe it should be there. |
What is the bug?
The provider does not take into account
AWS_PROFILE
environment variable when usingaws_assume_role_arn
. Instead, we must explicitly set it in the provider config like this:How can one reproduce the bug?
Remove
aws_profile
from the configuration above and do aexport AWS_PROFILE=management
. That will result in:What is the expected behavior?
Override the
aws_profile
setting in the provider configuration, if any.What is your host/environment?
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: