我正在重构一些 Terraform 模块并得到:
Error: Provider configuration not present
To work with
module.my_module.some_resource.resource_name its
original provider configuration at
module.my_module.provider.some_provider.provider_name 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
module.my_module.some_resource.resource_name, after
which you can remove the provider configuration again.
似乎我需要从 tfstate 文件中删除该资源,然后使用新的 tf 配置重新添加它。
当我重构一些单体代码时,有数百条这样的Error: Provider configuration not present
消息。
删除和重新添加的任何快捷方式?