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 state migrator in secrets/auth mounts for disable_remount parameter #2037

Merged
merged 4 commits into from
Oct 9, 2023

Conversation

vinay-gopalan
Copy link
Contributor

@vinay-gopalan vinay-gopalan commented Oct 3, 2023

Description

This PR adds a state upgrader for the disable_remount parameter that was added to all secrets and auth mounts when enabling mount migration was introduced into the TFVP in #1594. A default of false is set for new resources, but for resources created using earlier versions of the provider, this field was never properly populated, leading to inconsistent plans and breakages in TF workflows.

This PR appropriately populates the field to false if it is nil in the TF state.

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=TestSecretsAuthDisableRemountUpgradeV0'
=== RUN   TestSecretsAuthDisableRemountUpgradeV0
=== RUN   TestSecretsAuthDisableRemountUpgradeV0/basic
--- PASS: TestSecretsAuthDisableRemountUpgradeV0 (0.00s)
    --- PASS: TestSecretsAuthDisableRemountUpgradeV0/basic (0.00s)
PASS

@github-actions github-actions bot added the size/M label Oct 3, 2023
@vinay-gopalan vinay-gopalan added this to the 3.21.0 milestone Oct 9, 2023
@vinay-gopalan vinay-gopalan changed the title Add state upgrader in secrets/auth mounts for disable_remount parameter Add state migrator in secrets/auth mounts for disable_remount parameter Oct 9, 2023
@vinay-gopalan vinay-gopalan merged commit d325639 into main Oct 9, 2023
11 checks passed
@vinay-gopalan vinay-gopalan deleted the VAULT-18965/disable-remount-state-upgrader branch October 9, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants