All Projects β†’ pearcec β†’ Invoke-Terraform

pearcec / Invoke-Terraform

Licence: MIT license
A cross-platform PowerShell module for downloading and invoking terraform binaries.

Programming Languages

powershell
5483 projects

Projects that are alternatives of or similar to Invoke-Terraform

PoShLog
πŸ”© PoShLog is PowerShell cross-platform logging module. It allows you to log structured event data into console, file and much more places easily. It's built upon great C# logging library Serilog - https://serilog.net/
Stars: ✭ 108 (+671.43%)
Mutual labels:  wrapper, powershell-module
moGL
Modern OpenGL wrapper, thin C++14 header-only layer on top of the OpenGL 4.5+ API
Stars: ✭ 27 (+92.86%)
Mutual labels:  wrapper
CallofDuty.py
Asynchronous, object-oriented Python wrapper for the Call of Duty API.
Stars: ✭ 86 (+514.29%)
Mutual labels:  wrapper
XUSG
XUSG, XU's supreme graphics lib, is a handy wrapper currently for DirectX 12. It can be a good reference for designing your own DX12 wrapper APIs.
Stars: ✭ 57 (+307.14%)
Mutual labels:  wrapper
routeros-client
Abstraction layer over the node-routeros API
Stars: ✭ 63 (+350%)
Mutual labels:  wrapper
ADLab
Custom PowerShell module to setup an Active Directory lab environment to practice penetration testing.
Stars: ✭ 143 (+921.43%)
Mutual labels:  powershell-module
advcash
node.js wrapper for advcash cryptocurrency exchange
Stars: ✭ 14 (+0%)
Mutual labels:  wrapper
myTickle
πŸ“… A PowerShell and SQL Server-based reminder system
Stars: ✭ 20 (+42.86%)
Mutual labels:  powershell-module
harfbuzz rs
A fully safe Rust wrapper for the harfbuzz text shaping library.
Stars: ✭ 26 (+85.71%)
Mutual labels:  wrapper
pwsh-prelude
PowerShell β€œstandard” library for supercharging your productivity. Provides a powerful cross-platform scripting environment enabling efficient analysis and sustainable science in myriad contexts.
Stars: ✭ 26 (+85.71%)
Mutual labels:  powershell-module
igdb
Laravel PHP Facade/Wrapper for the IGDB API
Stars: ✭ 30 (+114.29%)
Mutual labels:  wrapper
PowerColorLS
PowerShell script to display a colorized directory and file listing with icons
Stars: ✭ 35 (+150%)
Mutual labels:  powershell-module
PSEventViewer
PSEventViewer (Get-Events) is really useful PowerShell wrapper around Get-WinEvent. One of the features you may be interested in is a simple way of getting β€œhidden” events data
Stars: ✭ 74 (+428.57%)
Mutual labels:  wrapper
nimCEF
Nim wrapper for the Chromium Embedded Framework
Stars: ✭ 27 (+92.86%)
Mutual labels:  wrapper
HerePy
A library that provides a Python interface to the HERE APIs.
Stars: ✭ 73 (+421.43%)
Mutual labels:  wrapper
mira
The fantastic Golang Reddit API wrapper for gophers
Stars: ✭ 54 (+285.71%)
Mutual labels:  wrapper
sdlpp
C++ wrapper for SDL2
Stars: ✭ 37 (+164.29%)
Mutual labels:  wrapper
FinMesh
A python package that brings together financial and economic data.
Stars: ✭ 20 (+42.86%)
Mutual labels:  wrapper
google-workspace
A unofficial high level Python API wrapper for some of the productivity based Google APIs, that is focused on simplicity.
Stars: ✭ 74 (+428.57%)
Mutual labels:  wrapper
FivePD-API
A wrapper that allows you to create FivePD callouts/plugins.
Stars: ✭ 17 (+21.43%)
Mutual labels:  wrapper

Invoke-Terraform

A PowerShell module to run terraform.

GitHub Actions PSGallery License
GitHub Actions Status PowerShell Gallery License

Overview

Invoke-Terraform is a PowerShell module that downloads, validates binary authenticity and runs multiple versions of terraform. It is cross-platform with user preferences.

Installation

To install the module from the PowerShell Gallery:

Install-Module -Name Invoke-Terraform -Repository PSGallery

Usage

Install-Terraform -TFVersion 0.14.9

Invoke-Terraform

Invoke-Terraform -TFVersion 0.14.8

terraform -TFVersion 0.14.8 -version

Commands

Command Description
Confirm-TerraformHashicorpKey Confirm the HashiCorp Security Key in gpg.
Get-TerraformConfiguration Get Invoke-Terraform configurations.
Get-TerraformStableBinary Get the path for the current static installation of terraform binary.
Install-Terraform Install a version of terraform.
Invoke-Terraform Run terraform.
Set-TerraformAutoDownload Set Invoke-Terraform to automatically download terraform if needed.
Set-TerraformAutoStableBinary Set Set-TerraformVersion to automatically switch static installation of terraform binary.
Set-TerraformConfiguration Set Invoke-Terraform configurations.
Set-TerraformStableBinary Set version of static installation of terraform binary.
Set-TerraformSquelchChecksumWarning Squelch checksum warnings.
Set-TerraformVersion Change default version of terraform to invoke.
Switch-Terraform Set-TerraformVersion alias.
Uninstall-Terraform Uninstall a version of terraform.
terraform Invoke-Terraform alias.

User Preferences

Name Description
Path Installation location for terraform binaries.
TFVersion Preferred version of terraform.
ReleaseUrl Defaults to https://releases.hashicorp.com/terraform
AutoDownload Automatically download terraform when invoking if the binary is not installed. Defaults to false.
AutoStableBinary Automatically switch the static binary to the TFVersion called with Set-TerraformVersion (ie Switch-Terraform). Defaults to false.

Verification

HashiCorp provides a few methods of verification for code authenticity. Invoke-Terraform uses checksum verification with gpg on all platforms and code signing verification with MacOS (starting ?) and Windows (starting with version 0.12.24).

The default behavior is to always run code signature verification every time terraform is run when supported and checksums when binaries are installed. By default HashiCorp PGP Key is import from keyserver.ubuntu.com. The following additional preferences may be used to validate the signatures provide by this module, and adjust the settings according to your security tolerance:

Name Description
HashiCorpPGPKeyId 0x34365D9472D7468F
HashiCorpTeamIdentifier D38WU7D763
HashiCorpWindowsThumbprint 35AB9FC834D217E9E7B1778FB1B97AF7C73792F2
PGPKeyServer keyserver.ubuntu.com
SquelchChecksumWarning Turn off warning from gpg when HashiCorp imported key has not be signed. Defaults to false.
SkipChecksum Turn off release archive checksum verification via gpg. Defaults to false.
SkipCodeSignature Turn off code signature verification. Defaults to false.

Other behavior

By default Invoke-Terraform searches the current working directory for the file .terraform-version. This file contains the preferred version of terraform. Store this file with your terraform project to seamlessly invoke the required version of terraform.

Best Practice

$ENV:Path, $PATH

It is recommended the terraform binary be removed from $ENV:Path. Even though the powershell alias overrides what is available in the Path, unexpected usage could occur if this module was not loaded. This eliminates the chance of running an unplanned version.

VSCode

If terraform is removed from your path as recommended, the vscode-terraform extension breaks. The Set-TerraformStableBinary has been added to provide a stable path name. Run Get-TerraformStableBinary to retrieve the path. Use the following example for vscode settings:

"terraform.languageServer": {
    "external": true,
    "pathToBinary": "",
    "args": [
        "serve",
        "-tf-exec=C:/users/pearcec/Documents/PowerShell/Modules/Invoke-Terraform/bin/terraform.exe",
    ],
    "maxNumberOfProblems": 100,
    "trace.server": "off"
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].