Closed dlouseiro closed 1 month ago
Hey @dlouseiro. Thanks for reaching out to us.
These values are stored in the state file but as part of the |
- separated id: PICNIC_DE_DEV|PUBLIC|AUTHORIZED_ROLE|PICNIC_DE_DEV|PUBLIC|MASK_DATE
(tag database, tag schema, tag name, policy database, policy schema, policy name).
Closing the issue due to inactivity. Please create a new one if the issue persists in the newest version of the provider.
Terraform CLI Version
1.5.7
Terraform Provider Version
0.92.0
Terraform Configuration
Category
category:import
Object type(s)
No response
Expected Behavior
For a recently imported tag masking policy association to be stored as it is in the database.
Example state representation of one instance:
Actual Behavior
Tag masking policy association is stored in the state without a
tag_id
andmasking_policy_id
.Example state representation:
Steps to Reproduce
Assuming that the masking policy was already created via terraform:
terraform state rm 'snowflake_tag_masking_policy_association.authorized_role_mask_date["de-dev"]'
terraform import 'snowflake_tag_masking_policy_association.authorized_role_mask_date["de-dev"]' 'PICNIC_DE_DEV|PUBLIC|AUTHORIZED_ROLE|PICNIC_DE_DEV|PUBLIC|MASK_DATE'
terraform apply
Result:
How much impact is this issue causing?
Medium
Logs
No response
Additional Information
This was quite problematic for me when migrating from version
0.66
to version0.92
of the provider as the definition of this resource changed so I had to remove the old version from the state and reimport all masking policy tag associations.Although, the fact that this resource is not properly registered in the state demands replacement, which is not an ideal scenario as I wouldn't want to change this association.
Would you like to implement a fix?