[英]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.