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 support for settng use_microsoft_graph_api in r/azure_secret_backend #1335

Merged
merged 7 commits into from
Feb 4, 2022

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Feb 3, 2022

Add support for setting use_microsoft_graph_api in r/azure_secret_backend

  • Factor out common request data from create and update functions
  • Extend test coverage

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

Closes #1304

Release note for CHANGELOG:


Output from acceptance testing:

$ make testacc TESTARGS='-count=1 -test.run ^TestAzureSecretBackend$$'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -v -count=1 -test.run ^TestAzureSecretBackend$ -timeout 30m ./...
ok      github.com/hashicorp/terraform-provider-vault/util      0.320s [no tests to run]

[...]

=== RUN   TestAzureSecretBackend
--- PASS: TestAzureSecretBackend (4.24s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     5.935s

@github-actions github-actions bot added size/L and removed size/M labels Feb 3, 2022
@benashz benashz requested a review from vinay-gopalan February 3, 2022 22:21
@github-actions github-actions bot added size/M and removed size/L labels Feb 3, 2022
@@ -227,3 +221,25 @@ func azureSecretBackendExists(d *schema.ResourceData, meta interface{}) (bool, e
func azureSecretBackendPath(path string) string {
return strings.Trim(path, "/") + "/config"
}

func azureSecretBackendRequestData(d *schema.ResourceData) map[string]interface{} {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! I like the simple, common util 😄

Copy link
Contributor

@vinay-gopalan vinay-gopalan left a comment

Choose a reason for hiding this comment

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

A question about error handling, but looks great otherwise!

- let schema.ResourceData.Set() do the value type assertion.
@github-actions github-actions bot added size/L and removed size/M labels Feb 4, 2022
@benashz benashz requested a review from vinay-gopalan February 4, 2022 19:55
@benashz benashz merged commit 4faf607 into main Feb 4, 2022
@benashz benashz deleted the VAULT-4780/az-sbe-add-ms-graph-api branch February 4, 2022 20:18
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.

azure_secret_backend support for MS Graph API
2 participants