Terraform 错误:提供商配置无效

问题描述 投票:0回答:1

我需要一些帮助来弄清楚这里出了什么问题。

这是我的文件:

terraform {

  required_version = ">= 0.13"
  required_providers {

    google = {
      source  = "hashicorp/google"
      version = "~> 3.63"
    }
  }
  backend "http" {
    # configured on CLI
  }

}

但是当我尝试执行计划时,我收到此错误消息:

│ Error: Invalid provider configuration
│ 
│ Provider "registry.terraform.io/hashicorp/google-beta" requires explicit
│ configuration. Add a provider block to the root module and configure the
│ provider's required arguments as described in the provider documentation.
│ 
╵
╷
│ Error: Invalid provider configuration
│ 
│ Provider "registry.terraform.io/hashicorp/google" requires explicit
│ configuration. Add a provider block to the root module and configure the
│ provider's required arguments as described in the provider documentation.

error message

你知道为什么会这样吗?

同一个文件一直有效,直到我今天再次尝试运行它。 所以这对我来说没有意义,我在互联网上找不到任何关于这个问题的信息。

谢谢你的帮助。

terraform terraform-provider-gcp httpbackend
1个回答
0
投票

配置提供者所需的参数

您必须添加 Google Cloud Platform Provider

provider
到您的代码中。

© www.soinside.com 2019 - 2024. All rights reserved.