diff --git a/.github/workflows/Process-PSModule.yml b/.github/workflows/Process-PSModule.yml
index f442eda..dceb2e0 100644
--- a/.github/workflows/Process-PSModule.yml
+++ b/.github/workflows/Process-PSModule.yml
@@ -27,6 +27,6 @@ permissions:
jobs:
Process-PSModule:
- uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@60bdf8a5a4c92c53fcf2a8d23f7d5f5c93e6864e # v5.4.3
+ uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@11117919e65242d3388727819a751f74ad24ea9e # v5.5.0
secrets:
APIKEY: ${{ secrets.APIKEY }}
diff --git a/README.md b/README.md
index 6319793..6aca71f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# {{ NAME }}
+# Hcl
-{{ DESCRIPTION }}
+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.
## Prerequisites
@@ -12,58 +12,80 @@ This uses the following external resources:
To install the module from the PowerShell Gallery, you can use the following command:
```powershell
-Install-PSResource -Name {{ NAME }}
-Import-Module -Name {{ NAME }}
+Install-PSResource -Name Hcl
+Import-Module -Name Hcl
```
## Usage
-Here is a list of example that are typical use cases for the module.
+Here is a list of examples that are typical use cases for the module.
-### Example 1: Greet an entity
-
-Provide examples for typical commands that a user would like to do with the module.
+### Example 1: Parse a Terraform locals block
```powershell
-Greet-Entity -Name 'World'
-Hello, World!
+$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
+### Example 2: Parse a .tfvars file
-Provide examples for typical commands that a user would like to do with the module.
+```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
-Import-Module -Name PSModuleTemplate
+$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 the Get-Command -Module 'This module' to find more commands that are available in the module.
-To find examples of each of the commands you can use Get-Help -Examples 'CommandName'.
+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'`.
## Documentation
-Link to further documentation if available, or describe where in the repository users can find more detailed documentation about
-the module's functions and features.
+For detailed documentation on each function, use the built-in help system:
+
+```powershell
+Get-Help ConvertFrom-Hcl -Full
+Get-Help ConvertTo-Hcl -Full
+```
## 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
+### For users
-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.
+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.
-## Acknowledgements
+### For developers
-Here is a list of people and projects that helped this project in some way.
+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.
diff --git a/examples/General.ps1 b/examples/General.ps1
index e193423..ea662b9 100644
--- a/examples/General.ps1
+++ b/examples/General.ps1
@@ -1,19 +1,16 @@
-<#
+<#
.SYNOPSIS
- This is a general example of how to use the module.
+ This is a general example of how to use the Hcl module.
#>
# Import the module
-Import-Module -Name 'PSModule'
+Import-Module -Name 'Hcl'
-# Define the path to the font file
-$FontFilePath = 'C:\Fonts\CodeNewRoman\CodeNewRomanNerdFontPropo-Regular.tff'
-
-# Install the font
-Install-Font -Path $FontFilePath -Verbose
-
-# List installed fonts
-Get-Font -Name 'CodeNewRomanNerdFontPropo-Regular'
-
-# Uninstall the font
-Get-Font -Name 'CodeNewRomanNerdFontPropo-Regular' | Uninstall-Font -Verbose
+# Convert an HCL locals block to a PowerShell object
+$hcl = @'
+locals {
+ environment = "production"
+ region = "us-east-1"
+}
+'@
+ConvertFrom-Hcl -InputObject $hcl
diff --git a/src/README.md b/src/README.md
deleted file mode 100644
index af76160..0000000
--- a/src/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Details
-
-For more info about the expected structure of a module repository, please refer to [Build-PSModule](https://github.com/PSModule/Build-PSModule)
diff --git a/src/assemblies/LsonLib.dll b/src/assemblies/LsonLib.dll
deleted file mode 100644
index 3661807..0000000
Binary files a/src/assemblies/LsonLib.dll and /dev/null differ
diff --git a/src/classes/private/SecretWriter.ps1 b/src/classes/private/SecretWriter.ps1
deleted file mode 100644
index 1b1732a..0000000
--- a/src/classes/private/SecretWriter.ps1
+++ /dev/null
@@ -1,15 +0,0 @@
-class SecretWriter {
- [string] $Alias
- [string] $Name
- [string] $Secret
-
- SecretWriter([string] $alias, [string] $name, [string] $secret) {
- $this.Alias = $alias
- $this.Name = $name
- $this.Secret = $secret
- }
-
- [string] GetAlias() {
- return $this.Alias
- }
-}
diff --git a/src/classes/public/Book.ps1 b/src/classes/public/Book.ps1
deleted file mode 100644
index 8917d9a..0000000
--- a/src/classes/public/Book.ps1
+++ /dev/null
@@ -1,147 +0,0 @@
-class Book {
- # Class properties
- [string] $Title
- [string] $Author
- [string] $Synopsis
- [string] $Publisher
- [datetime] $PublishDate
- [int] $PageCount
- [string[]] $Tags
- # Default constructor
- Book() { $this.Init(@{}) }
- # Convenience constructor from hashtable
- Book([hashtable]$Properties) { $this.Init($Properties) }
- # Common constructor for title and author
- Book([string]$Title, [string]$Author) {
- $this.Init(@{Title = $Title; Author = $Author })
- }
- # Shared initializer method
- [void] Init([hashtable]$Properties) {
- foreach ($Property in $Properties.Keys) {
- $this.$Property = $Properties.$Property
- }
- }
- # Method to calculate reading time as 2 minutes per page
- [timespan] GetReadingTime() {
- if ($this.PageCount -le 0) {
- throw 'Unable to determine reading time from page count.'
- }
- $Minutes = $this.PageCount * 2
- return [timespan]::new(0, $Minutes, 0)
- }
- # Method to calculate how long ago a book was published
- [timespan] GetPublishedAge() {
- if (
- $null -eq $this.PublishDate -or
- $this.PublishDate -eq [datetime]::MinValue
- ) { throw 'PublishDate not defined' }
-
- return (Get-Date) - $this.PublishDate
- }
- # Method to return a string representation of the book
- [string] ToString() {
- return "$($this.Title) by $($this.Author) ($($this.PublishDate.Year))"
- }
-}
-
-class BookList {
- # Static property to hold the list of books
- static [System.Collections.Generic.List[Book]] $Books
- # Static method to initialize the list of books. Called in the other
- # static methods to avoid needing to explicit initialize the value.
- static [void] Initialize() { [BookList]::Initialize($false) }
- static [bool] Initialize([bool]$force) {
- if ([BookList]::Books.Count -gt 0 -and -not $force) {
- return $false
- }
-
- [BookList]::Books = [System.Collections.Generic.List[Book]]::new()
-
- return $true
- }
- # Ensure a book is valid for the list.
- static [void] Validate([book]$Book) {
- $Prefix = @(
- 'Book validation failed: Book must be defined with the Title,'
- 'Author, and PublishDate properties, but'
- ) -join ' '
- if ($null -eq $Book) { throw "$Prefix was null" }
- if ([string]::IsNullOrEmpty($Book.Title)) {
- throw "$Prefix Title wasn't defined"
- }
- if ([string]::IsNullOrEmpty($Book.Author)) {
- throw "$Prefix Author wasn't defined"
- }
- if ([datetime]::MinValue -eq $Book.PublishDate) {
- throw "$Prefix PublishDate wasn't defined"
- }
- }
- # Static methods to manage the list of books.
- # Add a book if it's not already in the list.
- static [void] Add([Book]$Book) {
- [BookList]::Initialize()
- [BookList]::Validate($Book)
- if ([BookList]::Books.Contains($Book)) {
- throw "Book '$Book' already in list"
- }
-
- $FindPredicate = {
- param([Book]$b)
-
- $b.Title -eq $Book.Title -and
- $b.Author -eq $Book.Author -and
- $b.PublishDate -eq $Book.PublishDate
- }.GetNewClosure()
- if ([BookList]::Books.Find($FindPredicate)) {
- throw "Book '$Book' already in list"
- }
-
- [BookList]::Books.Add($Book)
- }
- # Clear the list of books.
- static [void] Clear() {
- [BookList]::Initialize()
- [BookList]::Books.Clear()
- }
- # Find a specific book using a filtering scriptblock.
- static [Book] Find([scriptblock]$Predicate) {
- [BookList]::Initialize()
- return [BookList]::Books.Find($Predicate)
- }
- # Find every book matching the filtering scriptblock.
- static [Book[]] FindAll([scriptblock]$Predicate) {
- [BookList]::Initialize()
- return [BookList]::Books.FindAll($Predicate)
- }
- # Remove a specific book.
- static [void] Remove([Book]$Book) {
- [BookList]::Initialize()
- [BookList]::Books.Remove($Book)
- }
- # Remove a book by property value.
- static [void] RemoveBy([string]$Property, [string]$Value) {
- [BookList]::Initialize()
- $Index = [BookList]::Books.FindIndex({
- param($b)
- $b.$Property -eq $Value
- }.GetNewClosure())
- if ($Index -ge 0) {
- [BookList]::Books.RemoveAt($Index)
- }
- }
-}
-
-enum Binding {
- Hardcover
- Paperback
- EBook
-}
-
-enum Genre {
- Mystery
- Thriller
- Romance
- ScienceFiction
- Fantasy
- Horror
-}
diff --git a/src/data/Config.psd1 b/src/data/Config.psd1
deleted file mode 100644
index fea4466..0000000
--- a/src/data/Config.psd1
+++ /dev/null
@@ -1,3 +0,0 @@
-@{
- RandomKey = 'RandomValue'
-}
diff --git a/src/data/Settings.psd1 b/src/data/Settings.psd1
deleted file mode 100644
index bcfa7b4..0000000
--- a/src/data/Settings.psd1
+++ /dev/null
@@ -1,3 +0,0 @@
-@{
- RandomSetting = 'RandomSettingValue'
-}
diff --git a/src/finally.ps1 b/src/finally.ps1
deleted file mode 100644
index d8fc207..0000000
--- a/src/finally.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-Write-Verbose '------------------------------'
-Write-Verbose '--- THIS IS A LAST LOADER ---'
-Write-Verbose '------------------------------'
diff --git a/src/formats/CultureInfo.Format.ps1xml b/src/formats/CultureInfo.Format.ps1xml
deleted file mode 100644
index a715e08..0000000
--- a/src/formats/CultureInfo.Format.ps1xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- System.Globalization.CultureInfo
-
- System.Globalization.CultureInfo
-
-
-
-
- 16
-
-
- 16
-
-
-
-
-
-
-
- LCID
-
-
- Name
-
-
- DisplayName
-
-
-
-
-
-
-
-
diff --git a/src/formats/Mygciview.Format.ps1xml b/src/formats/Mygciview.Format.ps1xml
deleted file mode 100644
index 4c972c2..0000000
--- a/src/formats/Mygciview.Format.ps1xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- mygciview
-
- System.IO.DirectoryInfo
- System.IO.FileInfo
-
-
- PSParentPath
-
-
-
-
-
- 7
- Left
-
-
-
- 26
- Right
-
-
-
- 26
- Right
-
-
-
- 14
- Right
-
-
-
- Left
-
-
-
-
-
-
-
- ModeWithoutHardLink
-
-
- LastWriteTime
-
-
- CreationTime
-
-
- Length
-
-
- Name
-
-
-
-
-
-
-
-
diff --git a/src/functions/private/Get-InternalPSModule.ps1 b/src/functions/private/Get-InternalPSModule.ps1
deleted file mode 100644
index 89f053c..0000000
--- a/src/functions/private/Get-InternalPSModule.ps1
+++ /dev/null
@@ -1,18 +0,0 @@
-function Get-InternalPSModule {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
- #>
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/functions/private/Set-InternalPSModule.ps1 b/src/functions/private/Set-InternalPSModule.ps1
deleted file mode 100644
index cf870ba..0000000
--- a/src/functions/private/Set-InternalPSModule.ps1
+++ /dev/null
@@ -1,22 +0,0 @@
-function Set-InternalPSModule {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
- #>
- [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
- 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
- Justification = 'Reason for suppressing'
- )]
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/functions/public/ConvertFrom-Hcl.ps1 b/src/functions/public/ConvertFrom-Hcl.ps1
new file mode 100644
index 0000000..5df0990
--- /dev/null
+++ b/src/functions/public/ConvertFrom-Hcl.ps1
@@ -0,0 +1,24 @@
+function ConvertFrom-Hcl {
+ <#
+ .SYNOPSIS
+ Converts an HCL string to a PowerShell object.
+
+ .DESCRIPTION
+ Converts a HashiCorp Configuration Language (HCL) formatted string into a PowerShell object.
+ Supports HCL syntax as used in Terraform configuration files (.tf), variable files (.tfvars),
+ and other infrastructure-as-code tooling.
+
+ .EXAMPLE
+ ConvertFrom-Hcl -InputObject 'locals { environment = "production" }'
+
+ Converts an HCL string to a PowerShell object.
+ #>
+ [CmdletBinding()]
+ param (
+ # The HCL string to convert.
+ [Parameter(Mandatory)]
+ [string] $InputObject
+ )
+ $null = $InputObject
+ throw [System.NotImplementedException] 'ConvertFrom-Hcl is not yet implemented.'
+}
diff --git a/src/functions/public/ConvertTo-Hcl.ps1 b/src/functions/public/ConvertTo-Hcl.ps1
new file mode 100644
index 0000000..a86701e
--- /dev/null
+++ b/src/functions/public/ConvertTo-Hcl.ps1
@@ -0,0 +1,29 @@
+function ConvertTo-Hcl {
+ <#
+ .SYNOPSIS
+ Converts a PowerShell object to an HCL string.
+
+ .DESCRIPTION
+ Converts a PowerShell object into a HashiCorp Configuration Language (HCL) formatted string,
+ suitable for use in Terraform configuration files (.tf), variable files (.tfvars),
+ and other infrastructure-as-code tooling.
+
+ .EXAMPLE
+ @{ environment = 'production' } | ConvertTo-Hcl
+
+ Converts a PowerShell hashtable to an HCL string.
+ #>
+ [CmdletBinding()]
+ param (
+ # The PowerShell object to convert to HCL.
+ [Parameter(
+ Mandatory,
+ ValueFromPipeline
+ )]
+ [object] $InputObject
+ )
+ process {
+ $null = $InputObject
+ throw [System.NotImplementedException] 'ConvertTo-Hcl is not yet implemented.'
+ }
+}
diff --git a/src/functions/public/PSModule/Get-PSModuleTest.ps1 b/src/functions/public/PSModule/Get-PSModuleTest.ps1
deleted file mode 100644
index a07d05b..0000000
--- a/src/functions/public/PSModule/Get-PSModuleTest.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-#Requires -Modules Utilities
-#Requires -Modules @{ ModuleName = 'PSSemVer'; RequiredVersion = '1.1.4' }
-#Requires -Modules @{ ModuleName = 'DynamicParams'; ModuleVersion = '1.1.8' }
-#Requires -Modules @{ ModuleName = 'Store'; ModuleVersion = '0.3.1' }
-
-function Get-PSModuleTest {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .DESCRIPTION
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
- #>
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/functions/public/PSModule/New-PSModuleTest.ps1 b/src/functions/public/PSModule/New-PSModuleTest.ps1
deleted file mode 100644
index e003841..0000000
--- a/src/functions/public/PSModule/New-PSModuleTest.ps1
+++ /dev/null
@@ -1,40 +0,0 @@
-#Requires -Modules @{ModuleName='PSSemVer'; ModuleVersion='1.1.4'}
-
-function New-PSModuleTest {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .DESCRIPTION
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
-
- .NOTES
- Testing if a module can have a [Markdown based link](https://example.com).
- !"#¤%&/()=?`´^¨*'-_+§½{[]}<>|@£$€¥¢:;.,"
- \[This is a test\]
- #>
- [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
- 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
- Justification = 'Reason for suppressing'
- )]
- [Alias('New-PSModuleTestAlias1')]
- [Alias('New-PSModuleTestAlias2')]
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
-
-New-Alias New-PSModuleTestAlias3 New-PSModuleTest
-New-Alias -Name New-PSModuleTestAlias4 -Value New-PSModuleTest
-
-
-Set-Alias New-PSModuleTestAlias5 New-PSModuleTest
diff --git a/src/functions/public/PSModule/PSModule.md b/src/functions/public/PSModule/PSModule.md
deleted file mode 100644
index a657773..0000000
--- a/src/functions/public/PSModule/PSModule.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# PSModule
-
-This is a sub page for PSModule.
diff --git a/src/functions/public/SomethingElse/Set-PSModuleTest.ps1 b/src/functions/public/SomethingElse/Set-PSModuleTest.ps1
deleted file mode 100644
index 23ec98e..0000000
--- a/src/functions/public/SomethingElse/Set-PSModuleTest.ps1
+++ /dev/null
@@ -1,25 +0,0 @@
-function Set-PSModuleTest {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .DESCRIPTION
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
- #>
- [Diagnostics.CodeAnalysis.SuppressMessageAttribute(
- 'PSUseShouldProcessForStateChangingFunctions', '', Scope = 'Function',
- Justification = 'Reason for suppressing'
- )]
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/functions/public/SomethingElse/SomethingElse.md b/src/functions/public/SomethingElse/SomethingElse.md
deleted file mode 100644
index d9f7e9e..0000000
--- a/src/functions/public/SomethingElse/SomethingElse.md
+++ /dev/null
@@ -1 +0,0 @@
-# This is SomethingElse
diff --git a/src/functions/public/Test-PSModuleTest.ps1 b/src/functions/public/Test-PSModuleTest.ps1
deleted file mode 100644
index 0c27510..0000000
--- a/src/functions/public/Test-PSModuleTest.ps1
+++ /dev/null
@@ -1,21 +0,0 @@
-function Test-PSModuleTest {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .DESCRIPTION
- Performs tests on a module.
-
- .EXAMPLE
- Test-PSModule -Name 'World'
-
- "Hello, World!"
- #>
- [CmdletBinding()]
- param (
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/functions/public/completers.ps1 b/src/functions/public/completers.ps1
deleted file mode 100644
index 6b1adbb..0000000
--- a/src/functions/public/completers.ps1
+++ /dev/null
@@ -1,8 +0,0 @@
-Register-ArgumentCompleter -CommandName New-PSModuleTest -ParameterName Name -ScriptBlock {
- param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
- $null = $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters
-
- 'Alice', 'Bob', 'Charlie' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
- }
-}
diff --git a/src/header.ps1 b/src/header.ps1
deleted file mode 100644
index cc1fde9..0000000
--- a/src/header.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidLongLines', '', Justification = 'Contains long links.')]
-[CmdletBinding()]
-param()
diff --git a/src/init/initializer.ps1 b/src/init/initializer.ps1
deleted file mode 100644
index 28396fb..0000000
--- a/src/init/initializer.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-Write-Verbose '-------------------------------'
-Write-Verbose '--- THIS IS AN INITIALIZER ---'
-Write-Verbose '-------------------------------'
diff --git a/src/manifest.psd1 b/src/manifest.psd1
deleted file mode 100644
index ff720bd..0000000
--- a/src/manifest.psd1
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file always wins!
-# Use this file to override any of the framework defaults and generated values.
-@{
- ModuleVersion = '0.0.0'
-}
diff --git a/src/modules/OtherPSModule.psm1 b/src/modules/OtherPSModule.psm1
deleted file mode 100644
index 5d6af8e..0000000
--- a/src/modules/OtherPSModule.psm1
+++ /dev/null
@@ -1,19 +0,0 @@
-function Get-OtherPSModule {
- <#
- .SYNOPSIS
- Performs tests on a module.
-
- .DESCRIPTION
- A longer description of the function.
-
- .EXAMPLE
- Get-OtherPSModule -Name 'World'
- #>
- [CmdletBinding()]
- param(
- # Name of the person to greet.
- [Parameter(Mandatory)]
- [string] $Name
- )
- Write-Output "Hello, $Name!"
-}
diff --git a/src/scripts/loader.ps1 b/src/scripts/loader.ps1
deleted file mode 100644
index 973735a..0000000
--- a/src/scripts/loader.ps1
+++ /dev/null
@@ -1,3 +0,0 @@
-Write-Verbose '-------------------------'
-Write-Verbose '--- THIS IS A LOADER ---'
-Write-Verbose '-------------------------'
diff --git a/src/types/DirectoryInfo.Types.ps1xml b/src/types/DirectoryInfo.Types.ps1xml
deleted file mode 100644
index aef538b..0000000
--- a/src/types/DirectoryInfo.Types.ps1xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- System.IO.FileInfo
-
-
- Status
- Success
-
-
-
-
- System.IO.DirectoryInfo
-
-
- Status
- Success
-
-
-
-
diff --git a/src/types/FileInfo.Types.ps1xml b/src/types/FileInfo.Types.ps1xml
deleted file mode 100644
index 4cfaf6b..0000000
--- a/src/types/FileInfo.Types.ps1xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- System.IO.FileInfo
-
-
- Age
-
- ((Get-Date) - ($this.CreationTime)).Days
-
-
-
-
-
diff --git a/src/variables/private/PrivateVariables.ps1 b/src/variables/private/PrivateVariables.ps1
deleted file mode 100644
index f1fc2c3..0000000
--- a/src/variables/private/PrivateVariables.ps1
+++ /dev/null
@@ -1,47 +0,0 @@
-$script:HabitablePlanets = @(
- @{
- Name = 'Earth'
- Mass = 5.97
- Diameter = 12756
- DayLength = 24.0
- },
- @{
- Name = 'Mars'
- Mass = 0.642
- Diameter = 6792
- DayLength = 24.7
- },
- @{
- Name = 'Proxima Centauri b'
- Mass = 1.17
- Diameter = 11449
- DayLength = 5.15
- },
- @{
- Name = 'Kepler-442b'
- Mass = 2.34
- Diameter = 11349
- DayLength = 5.7
- },
- @{
- Name = 'Kepler-452b'
- Mass = 5.0
- Diameter = 17340
- DayLength = 20.0
- }
-)
-
-$script:InhabitedPlanets = @(
- @{
- Name = 'Earth'
- Mass = 5.97
- Diameter = 12756
- DayLength = 24.0
- },
- @{
- Name = 'Mars'
- Mass = 0.642
- Diameter = 6792
- DayLength = 24.7
- }
-)
diff --git a/src/variables/public/Moons.ps1 b/src/variables/public/Moons.ps1
deleted file mode 100644
index dd0f33c..0000000
--- a/src/variables/public/Moons.ps1
+++ /dev/null
@@ -1,6 +0,0 @@
-$script:Moons = @(
- @{
- Planet = 'Earth'
- Name = 'Moon'
- }
-)
diff --git a/src/variables/public/Planets.ps1 b/src/variables/public/Planets.ps1
deleted file mode 100644
index 5927bc5..0000000
--- a/src/variables/public/Planets.ps1
+++ /dev/null
@@ -1,20 +0,0 @@
-$script:Planets = @(
- @{
- Name = 'Mercury'
- Mass = 0.330
- Diameter = 4879
- DayLength = 4222.6
- },
- @{
- Name = 'Venus'
- Mass = 4.87
- Diameter = 12104
- DayLength = 2802.0
- },
- @{
- Name = 'Earth'
- Mass = 5.97
- Diameter = 12756
- DayLength = 24.0
- }
-)
diff --git a/src/variables/public/SolarSystems.ps1 b/src/variables/public/SolarSystems.ps1
deleted file mode 100644
index acbcedf..0000000
--- a/src/variables/public/SolarSystems.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-$script:SolarSystems = @(
- @{
- Name = 'Solar System'
- Planets = $script:Planets
- Moons = $script:Moons
- },
- @{
- Name = 'Alpha Centauri'
- Planets = @()
- Moons = @()
- },
- @{
- Name = 'Sirius'
- Planets = @()
- Moons = @()
- }
-)
diff --git a/tests/Hcl.Tests.ps1 b/tests/Hcl.Tests.ps1
new file mode 100644
index 0000000..3a86fe0
--- /dev/null
+++ b/tests/Hcl.Tests.ps1
@@ -0,0 +1,19 @@
+[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
+ 'PSReviewUnusedParameter', '',
+ Justification = 'Required for Pester tests'
+)]
+[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
+ 'PSUseDeclaredVarsMoreThanAssignments', '',
+ Justification = 'Required for Pester tests'
+)]
+[CmdletBinding()]
+param()
+
+Describe 'Module' {
+ It 'Function: ConvertFrom-Hcl - Throws NotImplementedException' {
+ { ConvertFrom-Hcl -InputObject 'locals { }' } | Should -Throw
+ }
+ It 'Function: ConvertTo-Hcl - Throws NotImplementedException' {
+ { ConvertTo-Hcl -InputObject @{} } | Should -Throw
+ }
+}
diff --git a/tests/PSModuleTest.Tests.ps1 b/tests/PSModuleTest.Tests.ps1
deleted file mode 100644
index b856855..0000000
--- a/tests/PSModuleTest.Tests.ps1
+++ /dev/null
@@ -1,25 +0,0 @@
-[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
- 'PSReviewUnusedParameter', '',
- Justification = 'Required for Pester tests'
-)]
-[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
- 'PSUseDeclaredVarsMoreThanAssignments', '',
- Justification = 'Required for Pester tests'
-)]
-[CmdletBinding()]
-param()
-
-Describe 'Module' {
- It 'Function: Get-PSModuleTest' {
- Get-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
- }
- It 'Function: New-PSModuleTest' {
- New-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
- }
- It 'Function: Set-PSModuleTest' {
- Set-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
- }
- It 'Function: Test-PSModuleTest' {
- Test-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
- }
-}