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

Fix PKI Issuer overwrites on updates #2186

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

vinay-gopalan
Copy link
Contributor

@vinay-gopalan vinay-gopalan commented Mar 12, 2024

Description

Previously, the resource was not employing a JSON Merge Patch when making update requests to the Vault server. This was causing all data to be overwritten for the issuer. This fix follows the Vault documentation and makes a PATCH request to the issuer API when sending update info. Vault docs

Relates OR Closes #1990 #2061

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccPKISecretBackendIssuer_basic'
=== RUN   TestAccPKISecretBackendIssuer_basic
    resource_pki_secret_backend_issuer_test.go:29: Vault server version "1.17.0-beta1+ent"
--- PASS: TestAccPKISecretBackendIssuer_basic (3.82s)
PASS

@vinay-gopalan vinay-gopalan added this to the 4.0.0 milestone Mar 12, 2024
@github-actions github-actions bot added size/S and removed size/XS labels Mar 12, 2024
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.

LGTM!

vault/resource_pki_secret_backend_issuer.go Show resolved Hide resolved
@vinay-gopalan vinay-gopalan merged commit 48d0994 into main Mar 12, 2024
12 checks passed
@vinay-gopalan vinay-gopalan deleted the VAULT-19272/fix-issuer-updates branch March 12, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants