I have a data source defined as:
data "snowflake_role" "this" {
provider = snowflake.acc
name = "role_name"
}
I would like to change the provider alias. I changed it to:
data "snowflake_role" "this" {
provider = snowflake.sec
name = "role_name"
}
but terraform validate
failed with
│ Error: Provider configuration not present
│
│ To work with data.snowflake_role.this its original
│ provider configuration at
│ provider[“registry.terraform.io/snowflake-labs/snowflake
”].sec is required,
│ but it has been removed. This occurs when a provider configuration is
│ removed while objects created by that provider still exist in the state.
│ Re-add the provider configuration to destroy
│ data.snowflake_role.this, after which you can remove
│ the provider configuration again.
This is kind of annoying. Is there a way to change the provider alias without destroying the resource?