Giter VIP home page Giter VIP logo

vscode-language-terraform's Introduction

Terraform

This is a Visual Studio Code extension. Adds syntax support for the Terraform and Terragrunt configuration language.

Features

  • Syntax highlighting
  • Basic syntax validation
  • Snippets
  • Terragrunt supported
  • No language server
  • No telemetry
  • No popups
  • No credentials required

Snippets

Terraform

Providers

Snippets-1

Snippets-2

Syntax highlighting

Dark+

Syntax-1 Syntax-2

Light+

Syntax-1 Syntax-2

vscode-language-terraform's People

Contributors

4ops avatar a-kulikov-geoscan avatar cruftyoldsysadmin avatar dependabot[bot] avatar hariscodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-language-terraform's Issues

FR - generate links to resource docs pages

Feature Request -

Provide an extension option to provide a link to the docs page for each resource in an HCL file, either inserted as a comment above the resource definition block or as a mouse-over hovering link.

Thanks!

Feature Request: formatting

It would be really cool if the plugin could run something like terraform fmt FILE on the current file, on save or something

terraform 0.12.12 + terragrunt 0.20.4 (HCL)

I've got wrong syntax highlighting while creating terragrunt.hcl file:

  • lines 1-10, do not understand why it is wrong
  • line 13, vscode does not do wrap lines (it is enabled generally for all files)
  • lines 20-27, do not understand why it is wrong + last curly braces of 'terraform' wrongly highlighted as invalid code

In archive you can see the file itself + screenshot of the problem

Archive.zip

Bug: Wrong syntax highlighting for Terragrunt "inputs"

Example shows it best (v0.2.1):

Here is a terragrunt.hcl file:

remote_state {
  backend = "s3"

  config = {
    encrypt        = true
    bucket         = "tfstate-for-infrastructure-in-${local.environment_vars.account_id}"
    accesslogging_bucket_name = "tfstate-log-for-infrastructure-in-${local.environment_vars.account_id}"
    key            = "${path_relative_to_include()}/terraform.tfstate"
    region         = local.environment_vars.region
    dynamodb_table = "terraform-locks"
    s3_bucket_tags = local.global_vars.tags
    dynamodb_table_tags = local.global_vars.tags
  }

  generate = {
    path      = "backend.tf"
    if_exists = "overwrite_terragrunt"
  }
}

inputs = merge(
  local.account_vars.locals,
  local.region_vars.locals,
  local.environment_vars.locals,
)

Here is how this section looks in VS Code:

image

Syntax highlighting support for multiple includes in terragrunt.hcl

Terragrunt 0.32 released support for multiple include files. Previously the only supported syntax was a global include:

include {
  path = find_in_parent_folders()
 }

Now you can have multiple named includes (which allowed me to cut down my Terragrunt repo by about 55%). Currently the new syntax does not get highlighted correctly, and in my theme (dark (Visual Studio)), the multiple configuration blocks are all red.

Multiple include syntax

include {
  path = find_in_parent_folders()
}

include "vpc" {
 path = find_in_parent_folders("_envcommon/vpc-deps.hcl")
}

include "fargate" {
 path = find_in_parent_folders("_envcommon/ecs-deps.hcl")
}

Resources

terraform extensions are not working

Issue Type: Feature Request

while writing script terraform extension are not working and aws & azure also not working

Extension version: 0.2.2
VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:13:13.157Z)
OS version: Windows_NT x64 10.0.19042

Format on save

Would it be possible to automatically run terraform fmt on save?

Thank you!

Spurious error on aws.<region alias>

This VSCode plugin complains "Invalid attribute name: An attribute name is required after a dot." when using dashed region provider aliases.

Note that terraform apply does accept this syntax.

Request

Hi,

Can you integrate basic auto-complete on resources mostly aws on this extension?

Is this still maintained?

Looks like there was no change in 2023, and Hashicorp has since added import blocks and other changes. Is this still actively maintained, or should this project be considered 'complete'?

Support for syntax highlighting for not just terragrunt.hcl Terragunt files

Hello there,

I am wondering if it is possible to add support for other terragrunt files to have syntax highlighting that are not named "terragrunt.hcl".

We have many terragrunt files that end in ".hcl", but are not named terragrunt.hcl . We import these other *.hcl files into our terragrunt.hcl files.

Example usage of where we have multiple terragrunt files not named "terragrunt.hcl":

  • app.hcl
  • terragrunt.hcl
    /production
    • env.hcl
      /westus2
      - location.hcl
      /ec2_instance
      - terragrunt.hcl

Even if it was added as a optional parameter on the extension that would be great as well.

Support for Moved Blocks

In Terraform 1.1, Hashicorp introduced moved blocks as a way of refactoring Terraform modules without requiring a breaking change.

moved {  
  from = aws_instance.example
  to   = aws_instance.example[0]
}

It would be great if we could get syntax highlighting support for these new blocks.

backend snippet needs a comma between s3 and swift

Backend configuration:
  scope: meta.terraform.tf
  prefix: backend
  description: Backend configuration.
  body: |
    backend ${1|local,remote,artifactory,azurerm,consul,cos,etcd,etcdv3gcs,http,mantaoss,pg,s3swift,atlas|} {
      ${2|name,address,path,prefix,endpoints,url,scheme,username,password,token|} = "${3:value}"
    }

While testing out your plugin, I came across a typo in your backend snippet. There should be a comma between s3 and swift.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.