Closed jrobison-sb closed 1 month ago
Hey @jrobison-sb. Thanks for reaching out to us.
Thank you for the detailed description! I will validate the behavior in the morning, but an idea I have now (and it seems to change the execution slightly) is to have CI_ROLE and CI_USER both wrapped in double quotes in the import statement. The docs for import also suggest this: https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_account_role#import.
The reason lies in these two lines: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/d837341c2d18b6fbb4657ad3a1837190a8ee77d8/pkg/resources/grant_account_role.go#L124 and https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/d837341c2d18b6fbb4657ad3a1837190a8ee77d8/pkg/resources/grant_account_role.go#L140
Can you please check if this makes the import succeed?
@sfc-gh-asawicki
Slashy escape quotes unblocked me on this. Thanks for your help.
Terraform CLI Version
v1.9.1
Terraform Provider Version
v0.96.0
Terraform Configuration
Old resource from version 0.92 of this provider
New resource from version 0.96 of this provider
Category
category:resource
Object type(s)
resource:grant_account_role
Expected Behavior
I should be able to
terraform state rm
the old resource andterraform import
the new resource as generally described here.Actual Behavior
Steps to Reproduce
Attempt to migrate from an old
snowflake_role_grants
resource to a newsnowflake_grant_account_role
resource by way ofterraform state rm ... && terraform import ...
.How much impact is this issue causing?
Medium
Logs
No response
Additional Information
Would you like to implement a fix?