简体   繁体   English

如何在 VSCode 中更改 Terraform 版本?

[英]How do I Change the Terraform Version in VSCode?

I have installed the latest Terraform version, however in VSCode, in my directory when I type terraform --version I get this.我已经安装了最新的 Terraform 版本,但是在 VSCode 中,当我在我的目录中键入 terraform --version 时,我得到了这个。

Terraform v0.11.7
+ provider.azurerm v2.3.0

Your version of Terraform is out of date! The latest version
is 1.1.9. You can update by downloading from www.terraform.io/downloads.html 

I have tried everything, even changed the path to the executable file in the settings, but nothing helped.我已经尝试了一切,甚至在设置中更改了可执行文件的路径,但没有任何帮助。

Thank You Ervin Szilagyi for your suggestion, Tested in my enviorment working fine for me.谢谢Ervin Szilagyi的建议,在我的环境中测试对我来说工作正常。

You need to update the version of terraform exectutable file in the exectable path of terrform.需要更新terrform可执行路径下terraform可执行文件的版本。 To get the current executable path for Terraform with this command Get-Command terraform .要使用此命令Get-Command terraform Terraform 的当前可执行路径。

在此处输入图像描述

You can use this link to download the exectubale file.您可以使用此链接下载可执行文件。

在此处输入图像描述

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

相关问题 如何为 Terraform 配置 AWS MFA? - How do I configure AWS MFA for Terraform? 如何强制 terraform 重新创建资源? - How do I force terraform to recreate a resource? 如何在 terraform 中运行 forloop inside 字符串模板? - How do I run a forloop inside string template in terraform? 如何在 terraform 中将 rds 与弹性 beantalk 连接 - How do I connect rds with elastic beanstalk in terraform 如何在 Cognito terraform 中更改 ID 池 - how to change id pool in cognito terraform 如何设置Terraform中elasticsearch索引的总字段数限制? - How do I set the total field limit of an elastic search index in Terraform? 如何将生命周期规则应用于 Terraform 中的现有 s3 存储桶? - How do I apply a lifecycle rule to an EXISTING s3 bucket in Terraform? 如何授予谷歌服务帐户使用 terraform 列出所有项目的权限? - How do I grant permission to a google service account to list all projects using terraform? 如何使用 Terraform 使用来自 Artifact Registry 的 Docker 映像部署 GKE 工作负载? - How do I deploy a GKE Workload with my Docker image from the Artifact Registry using Terraform? 如何使用 Terraform 将 EC2 实例启动到现有 VPC 中? - How do I launch an EC2 instance into an existing VPC using Terraform?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM