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
Perhaps this functionality already exists in the new framework under a different pattern. In which case, maybe all that is needed is a link to some documentation.
I'm currently working with an api (for better or worse) that will return masked values given a clear text value. For example, given api_key: foobar the response will contain api_key: ******. This lends issues when applying due to state inconsistencies as the framework returns something along the lines of .configuration.api_key: was cty.StringVal("foobar"), but now cty.StringVal("******"). I see that sdkv2 had the ability to handle such cases by customizing diffs. It would be useful if similar functional was exposed in the new framework.
Attempted Solutions
I attempted to completely omit the response values from state which kind of works. One of the consequences of doing so means that imports will be updated in-place on the next apply.
Proposal
Expose the ability to ignore inconsistent state on the schema.Attribute interface. Maybe this could surface as an option like Computed, Required, etc. (IgnoreInconsistent) or perhaps this functionality acts more closely to the CustomizeDiff functionality where it's a function attached to schema.Attribute similar to the planmodifiers.
References
N/A
The text was updated successfully, but these errors were encountered:
Sorry you ran into trouble here. There is information in the documentation relating to migrating a Terraform provider from SDKv2 to the plugin Framework, that covers switching from using a CustomizeDiff in SDKv2 to using Plan Modification in the Framework. Hopefully this will prove useful. If you have specific questions could I ask you to create a new topic on the Terraform Providers Discuss Forum, providing as much detail as is needed to reproduce any issues that you are running into. Thanks!
I'm going to close this as it doesn't seem that there is an issue with the Framework at this point.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Module version
Use-cases
Perhaps this functionality already exists in the new framework under a different pattern. In which case, maybe all that is needed is a link to some documentation.
I'm currently working with an api (for better or worse) that will return masked values given a clear text value. For example, given
api_key: foobar
the response will containapi_key: ******
. This lends issues when applying due to state inconsistencies as the framework returns something along the lines of.configuration.api_key: was cty.StringVal("foobar"), but now cty.StringVal("******").
I see that sdkv2 had the ability to handle such cases by customizing diffs. It would be useful if similar functional was exposed in the new framework.Attempted Solutions
I attempted to completely omit the response values from state which kind of works. One of the consequences of doing so means that imports will be
updated in-place
on the next apply.Proposal
Expose the ability to ignore inconsistent state on the
schema.Attribute
interface. Maybe this could surface as an option likeComputed
,Required
, etc. (IgnoreInconsistent
) or perhaps this functionality acts more closely to theCustomizeDiff
functionality where it's a function attached toschema.Attribute
similar to the planmodifiers.References
N/A
The text was updated successfully, but these errors were encountered: