{"id":14063943,"url":"https://github.com/MertSenel/Hcl2PS","last_synced_at":"2025-07-29T17:31:08.372Z","repository":{"id":148975803,"uuid":"615551772","full_name":"MertSenel/Hcl2PS","owner":"MertSenel","description":"PowerShell Module to Wrap Hcl2Json CLI tool for Easy distribution of PowerShell cmdlets to Parse HCL Files","archived":false,"fork":false,"pushed_at":"2025-05-28T01:10:28.000Z","size":63325,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-28T01:22:28.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MertSenel.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-18T01:05:35.000Z","updated_at":"2025-05-28T01:10:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"a53e60bd-76e2-4c26-bd06-c622df37f75f","html_url":"https://github.com/MertSenel/Hcl2PS","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/MertSenel/Hcl2PS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MertSenel%2FHcl2PS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MertSenel%2FHcl2PS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MertSenel%2FHcl2PS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MertSenel%2FHcl2PS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MertSenel","download_url":"https://codeload.github.com/MertSenel/Hcl2PS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MertSenel%2FHcl2PS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267726744,"owners_count":24134901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:03:35.328Z","updated_at":"2025-07-29T17:31:06.747Z","avatar_url":"https://github.com/MertSenel.png","language":"PowerShell","readme":"\n\n![](./media/Hcl2PS-Module-Logo.png)\n\n[![.github/workflows/ci_pwsh.yml](https://github.com/MertSenel/Hcl2PS/actions/workflows/ci_pwsh.yml/badge.svg)](https://github.com/MertSenel/Hcl2PS/actions/workflows/ci_pwsh.yml)[![.github/workflows/ci_powershell.yml](https://github.com/MertSenel/Hcl2PS/actions/workflows/ci_powershell.yml/badge.svg)](https://github.com/MertSenel/Hcl2PS/actions/workflows/ci_powershell.yml)[![publish-module](https://github.com/MertSenel/Hcl2PS/actions/workflows/publish-module.yml/badge.svg)](https://github.com/MertSenel/Hcl2PS/actions/workflows/publish-module.yml)[![validate-module-install](https://github.com/MertSenel/Hcl2PS/actions/workflows/validate-module-install.yml/badge.svg)](https://github.com/MertSenel/Hcl2PS/actions/workflows/validate-module-install.yml)  \n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)[![GitHub version](https://badge.fury.io/gh/MertSenel%2FHcl2PS.svg)](https://badge.fury.io/gh/MertSenel%2FHcl2PS)[![powershellgallery](https://img.shields.io/powershellgallery/v/Hcl2PS)](https://www.powershellgallery.com/packages/Hcl2PS)[![downloads](https://img.shields.io/powershellgallery/dt/Hcl2PS.svg?label=downloads)](https://www.powershellgallery.com/packages/Hcl2PS)\n\n# Hcl2PS\n\nPowerShell Module to Wrap Hcl2Json CLI tool for Easy distribution of PowerShell cmdlets to Parse HCL Files\n\nThanks to @tmccombs for the original CLI tool, you can see the original code of the CLI tool in below urls.\n\nhcl2Json Project Url: [https://github.com/tmccombs/hcl2json](https://github.com/tmccombs/hcl2json)\n\nhcl2Json Project License: [https://github.com/tmccombs/hcl2json/blob/main/LICENSE](https://github.com/tmccombs/hcl2json/blob/main/LICENSE)\n\n## Installation\n\n`Hcl2PS` is aimed to be cross-platform and tested with best effort on Windows, Linux, and MacOS.\n\nGetting started with `Hcl2PS` is easy. Simply install and Import the module from the gallery using the following commands: \n\n```powershell\nInstall-Module -Name Hcl2PS\nImport-Module -Name Hcl2PS\n```\n\n## Usage\n\n### Standard Usage - PowerShell Object Output\n\nThe cmdlet `ConvertFrom-Hcl` accepts input in two ways, you can either pass a filepath to the Hcl file you wish to convert to a terraform object, or you can pass the contents of the file via pipeline input. \n\n`ConvertFrom-Hcl -Path .\\main.tf`\n\n`Get-Content .\\main.tf -Raw | ConvertFrom-Hcl`\n\nAs an output, the Cmdlet will return a Powershell object which has the properties mapped from the HCL syntax file's contents.\n#### Examples\n\n![](./media/Hcl2PS-Example-1.png)\n\n### JSON String Output\n\nThe cmdlet also supports a new -AsJson switch that allows you to return the output as a JSON string instead of a PowerShell object. This can be useful if you need to work with the data in JSON format or want to verify that the conversion to JSON is correct.\n\n`ConvertFrom-Hcl -Path .\\main.tf -AsJson`\n\n`Get-Content .\\main.tf -Raw | ConvertFrom-Hcl -AsJson`\n\nWhen using the -AsJson switch, the Cmdlet will return a JSON string that represents the same data as the standard PowerShell object output.\n\nThese features provide flexibility in how you work with HCL files, allowing \nyou to choose the output format that best suits your needs.\n\n#### Examples\n\n![](./media/Hcl2PS-Example-2.png)\n![](./media/Hcl2PS-Example-3.png)\n\n## Contributions \u0026 Issues\n\nContributions are welcomed, please raise a Pull Request with your proposed modifications if you wish to make any changes.\nIf you find an Issue and wish to report it, please use the Issues section.\n\n## License\n\nApache Licensed, please see [license](LICENSE.txt) for details.\n\n","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMertSenel%2FHcl2PS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMertSenel%2FHcl2PS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMertSenel%2FHcl2PS/lists"}