-
Notifications
You must be signed in to change notification settings - Fork 549
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
Add region passing for non commercial regions #841
Add region passing for non commercial regions #841
Conversation
This allows us to use non-inferrable regions
This allows the tf config to specify the region. It creates redundancy, however, it should allow people to use a different region without special permissions of any sort. If no region is given, it should default to us-east-1.
return fmt.Sprintf(` | ||
resource "vault_aws_secret_backend" "aws" { | ||
path = "%s" | ||
description = "Obtain AWS credentials." | ||
access_key = "%s" | ||
secret_key = "%s" | ||
region = "%s" |
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.
Looks like a formatting error here.
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.
I could have sworn that I added something to goland to run gofmt on files on save...
This allows us to set the region ONLY if it was specified in the data section of the user's Terraform config.
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.
These changes look right to me. If I'm understanding it correctly, when region isn't set, this will act similar to what's currently deployed. You can resolve bugs related with that by setting region
.
* Add support for passing region information to vault backend This allows us to use non-inferrable regions * Remove unnecessary data passing when obtaining region * Remove root privilege check, add region as part of data source This allows the tf config to specify the region. It creates redundancy, however, it should allow people to use a different region without special permissions of any sort. If no region is given, it should default to us-east-1. * Rely on go zero values for modifying aws.Config This allows us to set the region ONLY if it was specified in the data section of the user's Terraform config.
This allows us to use non-inferrable regions with terraform and the vault provider.
Community Note
Relates OR Closes #679
Release note for CHANGELOG:
Add support for passing region information stored in vault backend to AWS Config
Output from acceptance testing:
(Note: You need numerous environment variables to be set for these acceptance tests to run.
The following env vars must be set based on information provided by your AWS instance. In order to truly test these changes, you'll need to get Access Keys from the us-gov-west-1 cloud, as those credentials were the ones that didn't work which prompted this change (You can also use cn-northwest-1 to test this if you'd like).