Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>HCL SchemaNew to Visual Studio Code? Get it now.
HCL Schema

HCL Schema

Avestura Technologies

|
3 installs
| (0) | Free
Support for .schema.hcl files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

HCL Schema

Create HCL Schemas using HCL files

Root Schema

The root HCL schema defines the schema itself (its own body).

Defining Schemas

You can define an schema by creating a *.schema.hcl:

example.schema.hcl:

__schema = "https://raw.githubusercontent.com/avestura/hcl-schema/refs/heads/main/schema/draft/2025-10/.schema.hcl"
__id     = "https://raw.githubusercontent.com/avestura/hcl-schema/refs/heads/main/example.schema.hcl"

body {
    attribute "myattr" {
        required = true
    }

    block_header "tag" {
        label_names = ["name1"]

        body { 
            attribute "x" {}
        }
    }
}

Which parses and accepts HCL files like this:

// Defines an HCL file like this:

myattr = "x"
tag "name" {
    x = 2
}
tag "name2" {}

Requirements

This extension depends on the HashiCorp's HCL Extension

Extension Settings

  • hclSchema.cliPath: If you don't want to use the built-in cli for checking the schema file, you can configure the binary path.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft