【问题标题】:configuring intellij with terraform plugin to connect to aws使用 terraform 插件配置 intellij 以连接到 aws
【发布时间】:2022-02-10 23:10:38
【问题描述】:

我需要能够运行 terraform 插件来执行标准 terraform 任务,例如需要 aws 连接的 terraform plan 和 terraform apply。我已经安装了 terrafom 插件,但不知道如何配置它

【问题讨论】:

  • 你有什么用于运行 terraform 的 intellij 插件?

标签: amazon-web-services intellij-idea terraform


【解决方案1】:

JetBrains 插件社区中发布的 Terraform 插件用于 HashiCorp Terraform / HCL 语言支持,用于执行以下操作:

  • 语法高亮显示。
  • 带有“重新格式化代码”的代码格式化程序。
  • 报告已弃用属性的使用情况。

NOT 代替执行 terraform 二进制文件。

参考:https://plugins.jetbrains.com/plugin/7808-hashicorp-terraform--hcl-language-support

【讨论】:

  • 我正在使用这个插件,并且代码格式化程序没有像 terraform 文档中那样缩进代码......你知道如何解决这个问题吗?
【解决方案2】:

我的解决方案: 我已经安装了 terraform using chocolatey

  1. 在设置中设置路径

来自terraform.exe C:\ProgramData\chocolatey\bin\terraform.exe

Intellij 仍会将其显示为 terraform.exe,但它现在可以工作了。

【讨论】:

    【解决方案3】:

    该插件现在支持您请求的命令 (plan\apply),请确保更新它。

    关于 Arcones 问题:该插件由 Vladislav Rassokhin 维护,因此我们可能会在插件支持新 Terraform 功能时遇到延迟。你可以在这里打开一个问题:https://github.com/VladRassokhin/intellij-hcl/issues

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-06
      • 2020-06-07
      • 1970-01-01
      • 1970-01-01
      • 2021-06-05
      • 2019-01-26
      • 2019-02-20
      • 2021-11-23
      相关资源
      最近更新 更多