【问题标题】:Terraform- provider configuration not found未找到 Terraform- 提供程序配置
【发布时间】:2021-05-29 03:52:39
【问题描述】:

如何解决以下错误

Error: Provider configuration not present

To work with module.my_ec2.aws_instance.web[0] (orphan) its original provider
configuration at module.my_ec2.provider["registry.terraform.io/hashicorp/aws"]
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_ec2.aws_instance.web[0] (orphan), after which you can remove the
provider configuration again.

Releasing state lock. This may take a few moments...

【问题讨论】:

  • 您是否尝试按照错误消息的提示重新添加提供程序配置?如果是这样,当你尝试它时发生了什么?或者,如果您无法这样做,是什么阻止了您这样做?目前真的不可能回答这个问题,因为你没有给出任何关于你在这种情况下所做的事情的背景。

标签: terraform


【解决方案1】:

尝试添加如下内容:

provider "aws" {
  version = "3.10.0"
  region  = "eu-west-1"
  profile = "default"
}

然后运行terraform init 并尝试再次运行计划。

【讨论】:

    猜你喜欢
    • 2021-02-03
    • 2023-04-02
    • 2021-08-04
    • 2018-12-14
    • 2020-12-17
    • 2019-09-27
    • 2013-08-23
    • 2014-10-14
    • 1970-01-01
    相关资源
    最近更新 更多