terraform-config-destroyed

Example:

# Destroy existing terraform configuration.
- terraform-config-destroyed:
    path: /home/freckles/projects/terraform/my_project

Description

Destroy a terraform configuration using the Ansible 'terraform' module.

Resources

Variables

Name Type Default Description

path

string --

The path to the terraform configuration folder. Required

Examples

Example 1

Destroy existing terraform configuration.

Code
- terraform-config-destroyed:
    path: /home/freckles/projects/terraform/my_project

Code

doc:
  short_help: Destroy a terraform configuration.
  help: |
    Destroy a terraform configuration using the Ansible 'terraform' module.
  references:
    Terraform homepage: https://www.terraform.io/
    Ansible terraform module documentation: https://docs.ansible.com/ansible/latest/modules/terraform_module.html
  examples:
  - title: Destroy existing terraform configuration.
    vars:
      path: /home/freckles/projects/terraform/my_project
args:
  path:
    doc:
      short_help: The path to the terraform configuration folder.
    type: string
    required: true
    cli:
      param_type: argument

frecklets:
- frecklet:
    name: terraform
    type: ansible-module
    desc:
      short: 'destroy terraform configuration from: {{:: path ::}}'
  vars:
    project_path: '{{:: path ::}}'
    state: absent
      #force_init: true
frecklecute terraform-config-destroyed --help

Usage: frecklecute terraform-config-destroyed [OPTIONS] PATH

  Destroy a terraform configuration using the Ansible 'terraform' module.

Options:
  --help  Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.terraform_config_destroyed.TerraformConfigDestroyed
#


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

@dataclass
class TerraformConfigDestroyed(AutoPycklet):
    """Destroy a terraform configuration using the Ansible 'terraform' module.

       Args:
         path: The path to the terraform configuration folder.

    """

    FRECKLET_ID = "terraform-config-destroyed"

    path: str = None


    def __post_init__(self):
        super(TerraformConfigDestroyed, self).__init__(var_names=["path"])


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


#
# module path: pycklets.terraform_config_destroyed.TerraformConfigDestroyed
#


from pyckles import AutoPycklet

class TerraformConfigDestroyed(AutoPycklet):
    """Destroy a terraform configuration using the Ansible 'terraform' module.

       Args:
         path: The path to the terraform configuration folder.

    """

    FRECKLET_ID = "terraform-config-destroyed"

    def __init__(self, path=None):

        super(TerraformConfigDestroyed, self).__init__(var_names=["path"])
        self._path = path

    @property
    def path(self):
        return self._path

    @path.setter
    def path(self, path):
        self._path = path



frecklet_class = TerraformConfigDestroyed