You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typesuppressFieldValuestruct{}
func (msuppressFieldValue) Description(_ context.Context) string {
return"Suppresses the value within the plan"
}
func (msuppressFieldValue) MarkdownDescription(_ context.Context) string {
return"Suppresses the value within the plan"
}
func (msuppressFieldValue) PlanModifyString(
_ context.Context,
req planmodifier.StringRequest,
resp*planmodifier.StringResponse,
) {
resp.PlanValue=types.StringValue("<<SUPPRESSED>>")
}
Proposal
We could have an optional value that, if set, overrides the diff of the attribute within the plan?
Any attribute that had a known value in the Final Planned State must have an identical value in the new state.
If we plan a suppressed/different value then it is required by the Terraform provider to return this exact value in state as well.
If the attribute you're describing is a configuration value, you also are not able to plan a value that does not exactly match configuration or the prior state value:
Any attribute that was non-null in the configuration must either preserve the exact configuration value or return the corresponding attribute value from the prior state.
Module version
Use-cases
To keep our plans less verbose, we'd like to be able to obscure/shorten the diff for some of our attributes on our resources.
Attempted Solutions
Proposal
We could have an optional value that, if set, overrides the diff of the attribute within the plan?
or just do something like: DiffSuppressFunc from sdkv2
References
The text was updated successfully, but these errors were encountered: