简体   繁体   English

运行 terraform init 后无法看到 Terraform 提供程序文件

[英]Unable to see the Terraform provider file after running terraform init

I am stuck in a path where when I run terraform init.当我运行 terraform init 时,我被困在一条路径上。 the provider is not getting downloaded and it gives me no error.提供程序没有被下载,它没有给我任何错误。 I am using the main.tf file and in it, I have provider "azurerm" syntax only.我正在使用 main.tf 文件,其中只有提供程序“azurerm”语法。 So when I run the terraform init I get the below output only and I see nowhere the terraform provider file getting initialized or getting downloaded.因此,当我运行 terraform init 时,我只得到以下 output,我看不到 terraform 提供程序文件被初始化或被下载。 Logged in and authenticated to Azure login page too.也登录并验证了 Azure 登录页面。

Terraform Code> terraform init Terraform代码> terraform初始化

Initializing the backend...正在初始化后端...

Initializing provider plugins...正在初始化提供程序插件...

Terraform has been successfully initialized! Terraform 已成功初始化!

You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure.您现在可以开始使用 Terraform。尝试运行“terraform plan”以查看您的基础架构所需的任何更改。 All Terraform commands should now work.所有 Terraform 命令现在都应该起作用。

If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory.如果您曾为 Terraform 设置或更改模块或后端配置,请重新运行此命令以重新初始化您的工作目录。 If you forget, other commands will detect it and remind you to do so if necessary.如果您忘记了,其他命令会检测到它并在必要时提醒您这样做。

Terraform creates a hidden folder to store the provider. Terraform 创建一个隐藏文件夹来存储提供程序。 Make sure you set your OS permissions to see hidden files and folders.确保设置操作系统权限以查看隐藏的文件和文件夹。

From the documentation :文档中:

A hidden.terraform directory, which Terraform uses to manage cached provider plugins and modules, record which workspace is currently active, and record the last known backend configuration in case it needs to migrate state on the next run.一个 hidden.terraform 目录,Terraform 用于管理缓存的提供程序插件和模块,记录哪个工作区当前处于活动状态,并记录最后已知的后端配置,以备下次运行时需要迁移 state。 This directory is automatically managed by Terraform, and is created during initialization.该目录由Terraform自动管理,在初始化时创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Terraform 提供商限制 - Terraform provider restrictions 无法通过 terraform AWS 供应商访问 AWS 账户—— - Unable to access AWS account through terraform AWS provider -- 用 403 锁定我的 terraform state 文件; 如何识别执行terraform init的账户? - Locked out of my terraform state file with 403; How to identify the account performing terraform init? 无法通过 terraform AWS 提供商访问 AWS 帐户——无效的 AMI - Unable to access AWS account through terraform AWS provider -- invalid AMI Terraform 提供商升级后的 AWS S3 存储桶问题 - AWS S3 buckets issues after Terraform provider upgrade Terraform postgresql 提供者在aws中提供后创建角色和数据库失败 - Terraform postgresql provider fails to create the role and database after the provision in aws Terraform Azuread 提供商授权错误 - Terraform Azuread provider Authorizer Error 在 aws 模块中使用 Terraform Provider - Using Terraform Provider in aws module 如何让 `terraform init` 在我的 Apple Silicon Macbook Pro 上为 Google Provider 运行? - How can I get `terraform init` to run on my Apple Silicon Macbook Pro for the Google Provider? 并行运行 terraform 在 Terraform Cloud 上应用命令 - Running parallel terraform apply commands on Terraform Cloud
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM