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

vault_approle_auth_backend_role: Fix perpetual diff when upgrading from policies to token_policies #744

Merged
merged 2 commits into from
May 7, 2020

Conversation

catsby
Copy link
Contributor

@catsby catsby commented May 7, 2020

When upgrading a vault_approle_auth_backend_role that had policies and period specified but now uses token_policies and token_period, users could experience a perpetual diff as shown in #533. This specifically effected users on Vault 1.4 and the Vault Terraform provider version 2.7+

In this PR we change from always reading policies and period to only conditionally read them if the user has policies or period (respectively) in their configuration. Also adds regression test that demonstrates #533

Fixes #533

@pcman312 pcman312 added the bug label May 7, 2020
@kalafut kalafut merged commit 24d4ec1 into hashicorp:master May 7, 2020
@catsby catsby mentioned this pull request May 7, 2020
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
…om `policies` to `token_policies` (hashicorp#744)

* add regression test for hashicorp#533

* conditionally set policies and period
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.

Bug with vault_approle_auth_backend_role token_policies
3 participants