Skip to content
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

Document env var option for creds in README #9

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

mikerj1
Copy link

@mikerj1 mikerj1 commented Dec 7, 2018

No description provided.

@ventz
Copy link
Contributor

ventz commented Dec 7, 2018

@mikerj1 I believe something will break if Terraform is not aware of the "provider".

That is, I believe you need to link the credentials file. Which having the ENV variables will allow the 3rd-party tools/modules/cli to work, it is not guaranteed to work going forward with terraform.

###############################################################################
# CUSTOM CONFIGURATION    #
# see: 'Change this line' #
###########################
provider "aws" {
    # *** Change ONLY THIS LINE: ***
    shared_credentials_file  = "/Users/user/.aws/credentials"
    region = "${var.aws_region}"
}

@mikerj1
Copy link
Author

mikerj1 commented Dec 8, 2018

Is there way to point to an aws cred profile? I have many profiles and haven't figured out how to point to a specific profile in the way aws cli provides, which is --profile . As of right now exporting ENV variables does work with this repo, but if that isn't guaranteed, then I agree that this should not be added.

@ventz
Copy link
Contributor

ventz commented Dec 10, 2018

@mikerj1 Yea - so that file by default will use the "default aws" cred file, but you can change it to any.

So lets say you had:
/Users/$yourusername/.aws/project124

You can change:

###############################################################################
# CUSTOM CONFIGURATION    #
# see: 'Change this line' #
###########################
provider "aws" {
    # *** Change ONLY THIS LINE: ***
    shared_credentials_file  = "/Users/user/.aws/credentials"
    region = "${var.aws_region}"
}

To point to it with the shared_credentials_file line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants