尝试在 vscode 中初始化 terraform aws 文件时出现错误

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

ghassan@Ghassan:/Users/ghas/$ terraform init

正在初始化后端...

正在初始化提供商插件...

  • 正在查找最新版本的 hashcorp/aws... ╷ │ 错误:无法安装提供程序 │ │ 安装hashicorp/aws v5.44.0时出错:无法查询registry.terraform.io/hashicorp/aws的提供者注册表:检索失败 │ 提供商的身份验证校验和:从releases.hashicorp.com 返回的404 Not Found

我尝试浏览“releases.hashicorp.com” 错误:HashiCorp,该内容当前不存在 在您所在地区可用。

我尝试在 vscode 中初始化 terraform aws 文件

amazon-web-services terraform initialization
1个回答
0
投票

将来,如果您能提供一个工作示例和尽可能多的信息来重现该问题,那就太好了!目前,我尝试重现您的问题并且它对我有用。我想问题可能出在你的配置上。我的工作示例(在 VSCode 上工作)如下。如果您有任何疑问,请随时告诉我

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.44"
    }
  }

结果:

$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/aws versions matching "5.44.0"...
- Installing hashicorp/aws v5.44.0...
- Installed hashicorp/aws v5.44.0 (signed by HashiCorp)
© www.soinside.com 2019 - 2024. All rights reserved.