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

Always set attribute 'data' if read is disabled #456

Merged
merged 2 commits into from
Jul 3, 2019

Conversation

ctrox
Copy link
Contributor

@ctrox ctrox commented Jul 2, 2019

Because data is computed this sets it explicitly to nil so terraform does not detect a change on every plan.

fixes #388

@ghost ghost added the size/XS label Jul 2, 2019
@lawliet89
Copy link
Contributor

Given that data_json is in the state, why not compute data from what is in the state for data_json?

@ghost ghost added size/S and removed size/XS labels Jul 3, 2019
@ctrox
Copy link
Contributor Author

ctrox commented Jul 3, 2019

Given that data_json is in the state, why not compute data from what is in the state for data_json?

Yeah that would make more sense. I added a commit to populate data regardless of what disable_read is set to.

@lawliet89
Copy link
Contributor

lawliet89 commented Jul 3, 2019

One more suggestion: could you set Sensitive: true for data (should be a one liner change)? Should fix #454

@ctrox
Copy link
Contributor Author

ctrox commented Jul 3, 2019

One more suggestion: could you set Sensitive: true for data (should be a one liner change)? Should fix #454

I actually saw that while testing but forgot about it again 👍

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

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

Fabulous! Thank you!

@tyrannosaurus-becks tyrannosaurus-becks merged commit c8f7423 into hashicorp:master Jul 3, 2019
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
Always set attribute 'data' if read is disabled
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.

vault_generic_secret detects diff even if disable_read is set (since v1.7.0)
3 participants