From 7d51ee3666c9fe63543a0fc1e6a04c0b5cce63d4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Jul 2026 08:27:05 +0200 Subject: [PATCH 1/3] Standardize README landing page --- README.md | 86 ++++--------------------------------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 6aca71f..efaf967 100644 --- a/README.md +++ b/README.md @@ -1,91 +1,15 @@ # Hcl -A PowerShell module for working with [HashiCorp Configuration Language (HCL)](https://github.com/hashicorp/hcl), as used in [Terraform](https://www.terraform.io/), [OpenTofu](https://opentofu.org/), and other infrastructure-as-code tools. Supports parsing `.tf` configuration files, `.tfvars` variable files, `locals {}` blocks, and converting PowerShell objects back to HCL format. +Hcl is intended to be a PowerShell module for working with HCL. -## Prerequisites +## Status -This uses the following external resources: -- The [PSModule framework](https://github.com/PSModule/Process-PSModule) for building, testing and publishing the module. - -## Installation - -To install the module from the PowerShell Gallery, you can use the following command: - -```powershell -Install-PSResource -Name Hcl -Import-Module -Name Hcl -``` - -## Usage - -Here is a list of examples that are typical use cases for the module. - -### Example 1: Parse a Terraform locals block - -```powershell -$hcl = @' -locals { - environment = "production" - region = "us-east-1" - tags = { - project = "myapp" - team = "platform" - } -} -'@ -$result = ConvertFrom-Hcl -InputObject $hcl -$result.locals.environment # production -$result.locals.tags.project # myapp -``` - -### Example 2: Parse a .tfvars file - -```powershell -$tfvars = Get-Content -Path 'terraform.tfvars' -Raw -$variables = ConvertFrom-Hcl -InputObject $tfvars -$variables.region # us-east-1 -``` - -### Example 3: Convert a PowerShell object to HCL - -```powershell -$config = [ordered]@{ - resource = [ordered]@{ - aws_instance = [ordered]@{ - example = [ordered]@{ - ami = 'ami-0c55b159cbfafe1f0' - instance_type = 't2.micro' - } - } - } -} -ConvertTo-Hcl -InputObject $config -``` - -### Find more examples - -To find more examples of how to use the module, please refer to the [examples](examples) folder. - -Alternatively, you can use `Get-Command -Module 'Hcl'` to find commands available in the module. -To find examples of each command, use `Get-Help -Examples 'CommandName'`. +This repository is currently in progress. The current conversion commands are stubs and throw NotImplementedException, so there are no supported HCL conversion commands or usage examples to document yet. ## Documentation -For detailed documentation on each function, use the built-in help system: - -```powershell -Get-Help ConvertFrom-Hcl -Full -Get-Help ConvertTo-Hcl -Full -``` +When this module is implemented, command details should live in PowerShell help and generated documentation rather than being duplicated in this README. ## Contributing -Coder or not, you can contribute to the project! We welcome all contributions. - -### For users - -If you don't code, you still sit on valuable information that can make this project even better. If you experience that the product does unexpected things, throw errors or is missing functionality, you can help by submitting bugs and feature requests. Please see the issues tab on this project and submit a new issue that matches your needs. - -### For developers - -If you do code, we'd love to have your contributions. Please read the [Contribution guidelines](CONTRIBUTING.md) for more information. You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement. +Issues and pull requests are welcome when implementation work begins. From eca0cc46c6a34e2709b371d2ddbe525f1c5ad24d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Jul 2026 10:41:30 +0200 Subject: [PATCH 2/3] Address Copilot README review --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index efaf967..9998e07 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Hcl -Hcl is intended to be a PowerShell module for working with HCL. +Hcl is intended to be a PowerShell module for working with HashiCorp Configuration Language (HCL). ## Status -This repository is currently in progress. The current conversion commands are stubs and throw NotImplementedException, so there are no supported HCL conversion commands or usage examples to document yet. +This repository is currently in progress. The current conversion commands are stubs and throw `System.NotImplementedException`, so there are no supported HCL conversion commands or usage examples to document yet. ## Documentation From c0935b87917fc5fb979d3322aa490985fe49a2f2 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 6 Jul 2026 10:45:40 +0200 Subject: [PATCH 3/3] Address Copilot README review --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9998e07..af3a65f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Hcl -Hcl is intended to be a PowerShell module for working with HashiCorp Configuration Language (HCL). +Hcl is intended to be a PowerShell module for working with [HashiCorp Configuration Language (HCL)](https://github.com/hashicorp/hcl). ## Status -This repository is currently in progress. The current conversion commands are stubs and throw `System.NotImplementedException`, so there are no supported HCL conversion commands or usage examples to document yet. +This repository is currently in progress. The current conversion commands are stubs and throw `[System.NotImplementedException]`, so there are no supported HCL conversion commands yet. Example files may exist for future behavior, but they are not supported usage examples yet. ## Documentation