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

auth/gcp: adds custom_endpoint parameter to backend config #1482

Merged
merged 10 commits into from
Jun 8, 2022

Conversation

austingebauer
Copy link
Contributor

@austingebauer austingebauer commented Jun 3, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes: N/A

Release note for CHANGELOG:

* `resource/vault_gcp_auth_backend`: Adds support for the `custom_endpoint` parameter on backend config (#1482)

Output from acceptance testing:

$ make testacc TESTARGS='-count=1 -run=TestGCPAuth'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -v -count=1 -run=TestGCPAuth -timeout 30m ./...
=== RUN   TestGCPAuthBackend_pathRegex
=== RUN   TestGCPAuthBackend_pathRegex/no_nesting
=== RUN   TestGCPAuthBackend_pathRegex/nested
=== RUN   TestGCPAuthBackend_pathRegex/nested_with_double_'role'
--- PASS: TestGCPAuthBackend_pathRegex (0.00s)
    --- PASS: TestGCPAuthBackend_pathRegex/no_nesting (0.00s)
    --- PASS: TestGCPAuthBackend_pathRegex/nested (0.00s)
    --- PASS: TestGCPAuthBackend_pathRegex/nested_with_double_'role' (0.00s)
=== RUN   TestGCPAuthBackendRole_basic
=== RUN   TestGCPAuthBackendRole_basic/simple_backend_path
=== RUN   TestGCPAuthBackendRole_basic/nested_backend_path
--- PASS: TestGCPAuthBackendRole_basic (4.85s)
    --- PASS: TestGCPAuthBackendRole_basic/simple_backend_path (2.60s)
    --- PASS: TestGCPAuthBackendRole_basic/nested_backend_path (2.24s)
=== RUN   TestGCPAuthBackendRole_gce
--- PASS: TestGCPAuthBackendRole_gce (1.13s)
=== RUN   TestGCPAuthBackend_basic
--- PASS: TestGCPAuthBackend_basic (1.89s)
=== RUN   TestGCPAuthBackend_import
--- PASS: TestGCPAuthBackend_import (1.32s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     10.082s

@github-actions github-actions bot added size/L and removed size/M labels Jun 3, 2022
Copy link
Contributor

@benashz benashz left a comment

Choose a reason for hiding this comment

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

Looking good. I have a few suggestions related to config lifecycle handling.

vault/resource_gcp_auth_backend.go Outdated Show resolved Hide resolved
vault/resource_gcp_auth_backend.go Outdated Show resolved Hide resolved
vault/resource_gcp_auth_backend_test.go Show resolved Hide resolved
vault/resource_gcp_auth_backend_test.go Outdated Show resolved Hide resolved
vault/resource_gcp_auth_backend_test.go Outdated Show resolved Hide resolved
@austingebauer
Copy link
Contributor Author

Thanks for the feedback, @benashz! I've applied your suggestions and ran the tests again. Lmk your thoughts.

Copy link
Contributor

@benashz benashz left a comment

Choose a reason for hiding this comment

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

Looks great! Just a few minor suggestions/nits then +1

vault/resource_gcp_auth_backend.go Outdated Show resolved Hide resolved
vault/resource_gcp_auth_backend_test.go Show resolved Hide resolved
vault/resource_gcp_auth_backend_test.go Show resolved Hide resolved
@austingebauer austingebauer merged commit 76c7ed2 into release/vault-next Jun 8, 2022
@austingebauer austingebauer deleted the resource/auth_gcp_custom_endpoints branch June 8, 2022 17:31
@benashz benashz added this to the 3.8.0 milestone Jun 14, 2022
marcboudreau pushed a commit to marcboudreau/terraform-provider-vault that referenced this pull request Nov 6, 2022
…#1482)

* auth/gcp: adds custom_endpoint parameter to backend config

* change custom_endpoint to a resource block

* updates docs with example and 1.11+ mention

* Update vault/resource_gcp_auth_backend_test.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_gcp_auth_backend.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_gcp_auth_backend_test.go

Co-authored-by: Ben Ash <[email protected]>

* Update vault/resource_gcp_auth_backend_test.go

Co-authored-by: Ben Ash <[email protected]>

* return custom endpoint schema from function

* Update vault/resource_gcp_auth_backend.go

Co-authored-by: Ben Ash <[email protected]>

* terraform format test config

Co-authored-by: Ben Ash <[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.

2 participants