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
I should be able to terraform state rm the old resource and terraform import the new resource as generally described here.
Actual Behavior
TF_LOG=DEBUG terraform import module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user "CI_ROLE|USER|CI_USER"
# Debug output snipped for brevity, but I can see this somewhere in the middle of it...
2024-10-10T14:40:28.464-0400 [DEBUG] provider.terraform-provider-snowflake_v0.96.0: 2024/10/10 14:40:28 [DEBUG] sql-conn-query: [query SHOW GRANTS OF ROLE "CI_ROLE" err <nil> duration 210.559375ms args {}] (LOC12345)
2024-10-10T14:40:28.465-0400 [DEBUG] provider.terraform-provider-snowflake_v0.96.0: 2024/10/10 14:40:28 Failed to parse identifier [], err = "incompatible identifier: "; falling back to fully qualified name conversion
2024-10-10T14:40:28.465-0400 [DEBUG] provider.terraform-provider-snowflake_v0.96.0: 2024/10/10 14:40:28 Failed to parse identifier [], err = "incompatible identifier: "; falling back to fully qualified name conversion
2024-10-10T14:40:28.465-0400 [DEBUG] provider.terraform-provider-snowflake_v0.96.0: 2024/10/10 14:40:28 [DEBUG] role grant (CI_ROLE|USER|CI_USER) not found
2024-10-10T14:40:28.465-0400 [WARN] Provider "registry.terraform.io/snowflake-labs/snowflake" produced an unexpected new value for module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user during refresh.
- Root object was present, but now absent
2024-10-10T14:40:28.465-0400 [ERROR] vertex "import module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user result" error: Cannot import non-existent remote object
2024-10-10T14:40:28.465-0400 [ERROR] vertex "module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user (import id \"CI_ROLE|USER|CI_USER\")" error: Cannot import non-existent remote object
2024-10-10T14:40:28.465-0400 [ERROR] vertex "module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user (expand)" error: Cannot import non-existent remote object
# Error message all the way at the end:
│ Error: Cannot import non-existent remote object
│
│ While attempting to import an existing object to "module.snowflake_ci.snowflake_grant_account_role.grant_role_ci_to_ci_user", the provider
│ detected that no object exists with the given id. Only pre-existing objects can be imported; check that the id is correct and that it is
│ associated with the provider's configured region or endpoint, or use "terraform apply" to create a new remote object for this resource.
Steps to Reproduce
Attempt to migrate from an old snowflake_role_grants resource to a new snowflake_grant_account_role resource by way of terraform state rm ... && terraform import ....
jrobison-sb
changed the title
[Bug]: Unable to migrate snowflake_role_grants to grant_role_ci_to_ci_user
[Bug]: Unable to migrate snowflake_role_grants to snowflake_grant_account_role
Oct 10, 2024
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?
The text was updated successfully, but these errors were encountered: