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

Support tilde '~' in shared credentials path for providers #11268

Closed
joshlove opened this issue Jan 18, 2017 · 3 comments · Fixed by #11277
Closed

Support tilde '~' in shared credentials path for providers #11268

joshlove opened this issue Jan 18, 2017 · 3 comments · Fixed by #11277

Comments

@joshlove
Copy link

joshlove commented Jan 18, 2017

Terraform Version

v.0.8.2

Affected Resource(s)

  • aws provider

Terraform Configuration Files

provider "aws" {
  region                   = "us-west-2"
  shared_credentials_file  = "~/.aws/creds"
  profile                  = "customprofile"
}

Expected Behavior

Evaluate to my $HOME, and then use the aws creds file from there. This would be nice in a team environment so we don't have usernames hardcoded.

Workaround is a wrapper script for this, but this would be nice as an enhancement.

@grubernaut
Copy link
Contributor

Hi @joshlove, thanks for the issue!

I've submitted #11277, which should allow you to use the pathexpand() interpolation function inside your provider config, and elsewhere.

provider "aws" {
  region                   = "us-west-2"
  shared_credentials_file  = "${pathexpand(~/.aws/creds)}"
  profile                  = "customprofile"
}

@joshlove
Copy link
Author

Appreciate your work on this, thanks!

@ghost
Copy link

ghost commented Apr 17, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants