-
Notifications
You must be signed in to change notification settings - Fork 35
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
AWS_PROFILE support #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. It looks good.
Please fix the build. It seems that something got mixed up and the compilation fails.
Also please squash your commits into a single one with a descriptive commit message. Thanks!
"profile": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
DefaultFunc: func() (interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this should come from AWS_PROFILE
environment variable that please use the schema.MultiEnvDefaultFunc([]string{"AWS_PROFILE"}, "default")
default value provider so that environment variable is picked up by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set AWS_PROFILE environment variable it drives Terraform itself nuts + I think it's just nicer to set the provider as:
provider "credstash" {
table = "some-table"
region = "some-region"
profile = "some-profile"
}
@tmichel thanks for the quick workaround.
|
Cleaned up the code (gofmt) and pushed to master: 2433b14. Thanks again! |
First of all, thanks for this amazing terraform provider!
In our use case, we have different credstash instances spread over different accounts, I had to add profiles support and I think that other people can benefit from that.
It should solve #3