Skip to content

Add sts_region for AWS auth backend - #931

Merged
jasonodonnell merged 6 commits into
masterfrom
sts
Dec 14, 2020
Merged

Add sts_region for AWS auth backend#931
jasonodonnell merged 6 commits into
masterfrom
sts

Conversation

@jasonodonnell

Copy link
Copy Markdown
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

@tvoran tvoran left a comment

Copy link
Copy Markdown
Member

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.

Comment thread vault/resource_aws_auth_backend_client.go Outdated
Comment thread vault/resource_aws_auth_backend_client.go Outdated
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
@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 <tvoran@users.noreply.github.com>

* Fix test

* Remove sts_region check

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
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