How would one programmatically formatting Terraform HCL

This page summarizes the projects mentioned and recommended in the original post on /r/Terraform

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • hcl

    HCL is the HashiCorp configuration language.

    Format is HCL language feature: https://github.com/hashicorp/hcl/blob/main/hclwrite/public.go

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • lingon

    Discontinued Lingon is a collection of libraries and tools for building platforms using Go.

    We built Lingon (https://github.com/volvo-cars/lingon/tree/main/docs/terraform) to generate terraform HCL from Go code. It might be useful or at least a good reference of using the hclwrite package:

  • terraform

    Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

    Source for what terraform fmt does: https://github.com/hashicorp/terraform/blob/main/internal/repl/format.go

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Terraform state with native s3 locking

    1 project | dev.to | 2 Dec 2024
  • S3 native state locking in Terraform

    2 projects | dev.to | 29 Nov 2024
  • Top 8 Terraform Security Best Practices to Protect Your Infrastructure

    1 project | dev.to | 27 Nov 2024
  • Globally Replicated Services for the Rest of Us

    1 project | dev.to | 17 Nov 2024
  • How I Set Up Cross-Account ECR Access for Lambda Functions

    1 project | dev.to | 16 Nov 2024

Did you konow that Go is
the 4th most popular programming language
based on number of metions?