terraform-installed
Example:
# Install default/latest version of Hashicorp Terraform on Linux (amd64), into '$HOME/.local/bin'. - terraform-installed
Description
Download the Hashicorp Terraform executable and install it locally.
Resources
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The architecture of the host system. |
|
string | -- | The (absolute) path to the parent folder of the downloaded executable file. |
|
string | -- | The group of the executable. |
|
string | -- | The owner of the executable. |
|
string | -- | The platform of the host system. |
Examples
Example 1
Install default/latest version of Hashicorp Terraform on Linux (amd64), into '$HOME/.local/bin'.
Code
- terraform-installed
Example 2
Install default/latest version of Hashicorp Terraform system-wide, into '/usr/local/bin'.
Code
- terraform-installed: owner: root
Example 3
Install Hashicorp Terraform (version: 0.12.6) on Mac OS X, into '$HOME/.local/bin'.
Code
- terraform-installed: platform: darwin version: 0.12.6
Code
doc: short_help: Install Hashicorp Terraform. help: | Download the Hashicorp Terraform executable and install it locally. references: Terraform homepage: https://www.terraform.io examples: - title: Install default/latest version of Hashicorp Terraform on Linux (amd64), into '$HOME/.local/bin'. - title: Install default/latest version of Hashicorp Terraform system-wide, into '/usr/local/bin'. vars: owner: root - title: "Install Hashicorp Terraform (version: 0.12.6) on Mac OS X, into '$HOME/.local/bin'." vars: platform: darwin version: 0.12.6 args: _import: hashicorp-executable-installed frecklets: - hashicorp-executable-installed: product_name: terraform version: 0.12.6 dest: '{{:: dest ::}}' platform: '{{:: platform ::}}' arch: '{{:: arch ::}}' owner: '{{:: owner ::}}' group: '{{:: group ::}}'
frecklecute terraform-installed --help Usage: frecklecute terraform-installed [OPTIONS] Download the Hashicorp Terraform executable and install it locally. Options: --arch ARCH The architecture of the host system. --dest DEST The (absolute) path to the parent folder of the downloaded executable file. --group GROUP The group of the executable. --owner USER The owner of the executable. --platform PLATFORM The platform of the host system. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.terraform_installed.TerraformInstalled # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class TerraformInstalled(AutoPycklet): """Download the Hashicorp Terraform executable and install it locally. Args: arch: The architecture of the host system. dest: The (absolute) path to the parent folder of the downloaded executable file. group: The group of the executable. owner: The owner of the executable. platform: The platform of the host system. """ FRECKLET_ID = "terraform-installed" arch: str = None dest: str = None group: str = None owner: str = None platform: str = None def __post_init__(self): super(TerraformInstalled, self).__init__(var_names=["arch", "dest", "group", "owner", "platform"]) frecklet_class = TerraformInstalled
# -*- coding: utf-8 -*- # # module path: pycklets.terraform_installed.TerraformInstalled # from pyckles import AutoPycklet class TerraformInstalled(AutoPycklet): """Download the Hashicorp Terraform executable and install it locally. Args: arch: The architecture of the host system. dest: The (absolute) path to the parent folder of the downloaded executable file. group: The group of the executable. owner: The owner of the executable. platform: The platform of the host system. """ FRECKLET_ID = "terraform-installed" def __init__(self, arch=None, dest=None, group=None, owner=None, platform=None): super(TerraformInstalled, self).__init__(var_names=["arch", "dest", "group", "owner", "platform"]) self._arch = arch self._dest = dest self._group = group self._owner = owner self._platform = platform @property def arch(self): return self._arch @arch.setter def arch(self, arch): self._arch = arch @property def dest(self): return self._dest @dest.setter def dest(self, dest): self._dest = dest @property def group(self): return self._group @group.setter def group(self, group): self._group = group @property def owner(self): return self._owner @owner.setter def owner(self, owner): self._owner = owner @property def platform(self): return self._platform @platform.setter def platform(self, platform): self._platform = platform frecklet_class = TerraformInstalled