terragrunt-installed

Example:

# Install 'terragrunt' on Linux ('amd64' architecture).
- terragrunt-installed

Description

Installs Terragrunt.

Resources

Variables

Name Type Default Description

arch

string amd64

The architecture of the host system.

dest

string /usr/local/bin

The destination folder.

group

string root

The group of the executable.

install_terraform

boolean False

Whether to also install terraform.

owner

string root

The owner of the executable.

platform

string linux

The platform of the host system.

version

string 0.19.8

The version of the product.

Examples

Example 1

Install 'terragrunt' on Linux ('amd64' architecture).

Code
- terragrunt-installed

Example 2

Install 'terragrunt' on Mac OS X ('amd64' architecture).

Code
- terragrunt-installed:
    platform: darwin

Example 3

Install specific version of 'terragrunt' on Linux ('386' architecture').

Code
- terragrunt-installed:
    version: 0.19.8
    arch: i386

Code

doc:
  short_help: Intstall Terragrunt.
  help: |
    Installs [Terragrunt](https://github.com/gruntwork-io/terragrunt).
  references:
    Terragrunt GitHub repo: https://github.com/gruntwork-io/terragrunt
  examples:
  - title: Install 'terragrunt' on Linux ('amd64' architecture).
  - title: Install 'terragrunt' on Mac OS X ('amd64' architecture).
    vars:
      platform: darwin
  - title: Install specific version of 'terragrunt' on Linux ('386' architecture').
    vars:
      version: 0.19.8
      arch: i386

args:
  dest:
    doc:
      short_help: The destination folder.
    type: string
    required: false
    default: /usr/local/bin
  version:
    doc:
      short_help: The version of the product.
    type: string
    required: true
    default: 0.19.8
  arch:
    doc:
      short_help: The architecture of the host system.
    type: string
    required: true
    default: amd64
    allowed:
    - amd64
    - '386'
  platform:
    doc:
      short_help: The platform of the host system.
    type: string
    required: true
    default: linux
    allowed:
    - linux
    - darwin
    - windows
  owner:
    doc:
      short_help: The owner of the executable.
    type: string
    required: false
    default: root
    cli:
      metavar: USER
  group:
    doc:
      short_help: The group of the executable.
    type: string
    required: false
    empty: false
    default: root
    cli:
      metavar: GROUP
  install_terraform:
    doc:
      short_help: Whether to also install terraform.
    type: boolean
    required: false
    default: false
    cli:
      param_decls:
      - --install-terraform

frecklets:
- packages-installed:
    become: true
    packages:
    - name: ca-certificates
      pkgs:
        debian: ca-certificates
- terraform-installed:
    frecklet::skip: '{{:: install_terraform | negate ::}}'
    arch: '{{:: arch ::}}'
    platform: '{{:: platform ::}}'
- executable-downloaded:
    dest: '{{:: dest ::}}'
    url: 'https://github.com/gruntwork-io/terragrunt/releases/download/v{{:: version
      ::}}/terragrunt_{{:: platform ::}}_{{:: arch ::}}'
    extract: false
    owner: '{{:: owner ::}}'
    group: '{{:: group ::}}'
    exe_name: terragrunt
frecklecute terragrunt-installed --help

Usage: frecklecute terragrunt-installed [OPTIONS]

  Installs [Terragrunt](https://github.com/gruntwork-io/terragrunt).

Options:
  --arch ARCH          The architecture of the host system.
  --dest DEST          The destination folder.
  --group GROUP        The group of the executable.
  --install-terraform  Whether to also install terraform.
  --owner USER         The owner of the executable.
  --platform PLATFORM  The platform of the host system.
  --version VERSION    The version of the product.
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.terragrunt_installed.TerragruntInstalled
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class TerragruntInstalled(AutoPycklet):
    """Installs [Terragrunt](https://github.com/gruntwork-io/terragrunt).

       Args:
         arch: The architecture of the host system.
         dest: The destination folder.
         group: The group of the executable.
         install_terraform: Whether to also install terraform.
         owner: The owner of the executable.
         platform: The platform of the host system.
         version: The version of the product.

    """

    FRECKLET_ID = "terragrunt-installed"

    arch: str = None
    dest: str = None
    group: str = None
    install_terraform: bool = None
    owner: str = None
    platform: str = None
    version: str = None


    def __post_init__(self):
        super(TerragruntInstalled, self).__init__(var_names=["arch", "dest", "group", "install_terraform", "owner", "platform", "version"])


frecklet_class = TerragruntInstalled
# -*- coding: utf-8 -*-


#
# module path: pycklets.terragrunt_installed.TerragruntInstalled
#


from pyckles import AutoPycklet

class TerragruntInstalled(AutoPycklet):
    """Installs [Terragrunt](https://github.com/gruntwork-io/terragrunt).

       Args:
         arch: The architecture of the host system.
         dest: The destination folder.
         group: The group of the executable.
         install_terraform: Whether to also install terraform.
         owner: The owner of the executable.
         platform: The platform of the host system.
         version: The version of the product.

    """

    FRECKLET_ID = "terragrunt-installed"

    def __init__(self, arch="amd64", dest="/usr/local/bin", group="root", install_terraform=None, owner="root", platform="linux", version="0.19.8"):

        super(TerragruntInstalled, self).__init__(var_names=["arch", "dest", "group", "install_terraform", "owner", "platform", "version"])
        self._arch = arch
        self._dest = dest
        self._group = group
        self._install_terraform = install_terraform
        self._owner = owner
        self._platform = platform
        self._version = version

    @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 install_terraform(self):
        return self._install_terraform

    @install_terraform.setter
    def install_terraform(self, install_terraform):
        self._install_terraform = install_terraform

    @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

    @property
    def version(self):
        return self._version

    @version.setter
    def version(self, version):
        self._version = version



frecklet_class = TerragruntInstalled