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

Add sts_region for AWS auth backend #931

Merged
merged 6 commits into from
Dec 14, 2020
Merged

Add sts_region for AWS auth backend #931

merged 6 commits into from
Dec 14, 2020

Conversation

jasonodonnell
Copy link
Contributor

This adds sts_region to the AWS auth backend client to allows users to configure the default STS region when sts_endpoint is used.

Closes #689.

* `vault_aws_auth_backend_client`: Added `sts_region` parameter

Output from acceptance testing:

$ make testacc TESTARGS='-run TestAccAWSAuthBackendClientStsRegionNoEndpoint'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccAWSAuthBackendClientStsRegionNoEndpoint -timeout 120m
?   	github.com/hashicorp/terraform-provider-vault	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/cmd/coverage	[no test files]
?   	github.com/hashicorp/terraform-provider-vault/cmd/generate	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/codegen	0.377s [no tests to run]
?   	github.com/hashicorp/terraform-provider-vault/generated	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode	2.039s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode	1.508s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet	1.234s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role	1.772s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template	0.659s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation	0.968s [no tests to run]
?   	github.com/hashicorp/terraform-provider-vault/schema	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-vault/util	0.605s [no tests to run]
=== RUN   TestAccAWSAuthBackendClientStsRegionNoEndpoint
--- PASS: TestAccAWSAuthBackendClientStsRegionNoEndpoint (0.15s)
PASS
ok  	github.com/hashicorp/terraform-provider-vault/vault	1.948s

@jasonodonnell jasonodonnell added this to the 2.17.0 milestone Dec 11, 2020
@ghost ghost added the size/S label Dec 11, 2020
@ghost ghost added documentation labels Dec 11, 2020
tvoran
tvoran previously requested changes Dec 11, 2020
Copy link
Member

@tvoran tvoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the case where sts_endpoint is set and sts_region is not should be checked, and tests updated accordingly.

vault/resource_aws_auth_backend_client.go Outdated Show resolved Hide resolved
vault/resource_aws_auth_backend_client.go Outdated Show resolved Hide resolved
@tvoran tvoran dismissed their stale review December 14, 2020 03:46

After chatting offline, I'm ok with either way. I can see how the original approach could be more upgrade-friendly.

@jasonodonnell jasonodonnell merged commit 25b3a7f into master Dec 14, 2020
@kalafut kalafut deleted the sts branch December 15, 2020 15:48
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
* Add sts_region for AWS auth backend

* Add sts_region doc

* Add sts_region to read

* Update vault/resource_aws_auth_backend_client.go

Co-authored-by: Theron Voran <[email protected]>

* Fix test

* Remove sts_region check

Co-authored-by: Theron Voran <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No sts_region in vault_aws_auth_backend_client
2 participants