Skip to content

Commit 7d51ee3

Browse files
Standardize README landing page
1 parent aa15ae1 commit 7d51ee3

1 file changed

Lines changed: 5 additions & 81 deletions

File tree

README.md

Lines changed: 5 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,15 @@
11
# Hcl
22

3-
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.
3+
Hcl is intended to be a PowerShell module for working with HCL.
44

5-
## Prerequisites
5+
## Status
66

7-
This uses the following external resources:
8-
- The [PSModule framework](https://github.com/PSModule/Process-PSModule) for building, testing and publishing the module.
9-
10-
## Installation
11-
12-
To install the module from the PowerShell Gallery, you can use the following command:
13-
14-
```powershell
15-
Install-PSResource -Name Hcl
16-
Import-Module -Name Hcl
17-
```
18-
19-
## Usage
20-
21-
Here is a list of examples that are typical use cases for the module.
22-
23-
### Example 1: Parse a Terraform locals block
24-
25-
```powershell
26-
$hcl = @'
27-
locals {
28-
environment = "production"
29-
region = "us-east-1"
30-
tags = {
31-
project = "myapp"
32-
team = "platform"
33-
}
34-
}
35-
'@
36-
$result = ConvertFrom-Hcl -InputObject $hcl
37-
$result.locals.environment # production
38-
$result.locals.tags.project # myapp
39-
```
40-
41-
### Example 2: Parse a .tfvars file
42-
43-
```powershell
44-
$tfvars = Get-Content -Path 'terraform.tfvars' -Raw
45-
$variables = ConvertFrom-Hcl -InputObject $tfvars
46-
$variables.region # us-east-1
47-
```
48-
49-
### Example 3: Convert a PowerShell object to HCL
50-
51-
```powershell
52-
$config = [ordered]@{
53-
resource = [ordered]@{
54-
aws_instance = [ordered]@{
55-
example = [ordered]@{
56-
ami = 'ami-0c55b159cbfafe1f0'
57-
instance_type = 't2.micro'
58-
}
59-
}
60-
}
61-
}
62-
ConvertTo-Hcl -InputObject $config
63-
```
64-
65-
### Find more examples
66-
67-
To find more examples of how to use the module, please refer to the [examples](examples) folder.
68-
69-
Alternatively, you can use `Get-Command -Module 'Hcl'` to find commands available in the module.
70-
To find examples of each command, use `Get-Help -Examples 'CommandName'`.
7+
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.
718

729
## Documentation
7310

74-
For detailed documentation on each function, use the built-in help system:
75-
76-
```powershell
77-
Get-Help ConvertFrom-Hcl -Full
78-
Get-Help ConvertTo-Hcl -Full
79-
```
11+
When this module is implemented, command details should live in PowerShell help and generated documentation rather than being duplicated in this README.
8012

8113
## Contributing
8214

83-
Coder or not, you can contribute to the project! We welcome all contributions.
84-
85-
### For users
86-
87-
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.
88-
89-
### For developers
90-
91-
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.
15+
Issues and pull requests are welcome when implementation work begins.

0 commit comments

Comments
 (0)