-
Notifications
You must be signed in to change notification settings - Fork 1
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
Any workaround for not having a [default] profile in ~/.aws/credentials ? #6
Comments
Same here! Please fix :) |
I decided it would be more efficient just to parse out the aws config files and set the proper env vars in the Rakefile. If you add this code to the top of the validate_environment task, it should get you working:
|
Apologies for the delay in responding to this, I apparently have an issue receiving notifications on new issues. I think you can get around this by using AWS_PROFILE=you_profile_name on the command line to select a profile. |
Thanks for contributing your work. There's really not a lot available that allows someone to get a kickstart on their TF wrappers, and what you've built here looks like a great start.
We have 3 environments. In my
~/.aws/credentials
file, I do not have a[default]
section defined.Running
DEPLOY_ENV=dev PROJECT_NAME=simple-sg bundle exec rake plan
would result in:After debugging a bit, I found that it was getting stuck in the
terraform remote config
command. It appears as though the args in that task needs aargs << "-backend-config='profile=#{deploy_env}'"
inserted. However, adding that didn't seem to help. Even running the command interactively I was getting the same result, and then I found this PR for TF: hashicorp/terraform#5270. While merged, it's not present in the latest version of TF.At this point, I'm wondering if I've done something wrong, or if you perhaps have a
[default]
section defined in your credentials file that gets you around that problem?The text was updated successfully, but these errors were encountered: