heyday/xterraform

xTerraform package will provide project with easily scalable and maintainable cloud infrastructure.

1.0.3 2021-05-18 23:19 UTC

This package is auto-updated.

Last update: 2024-11-13 04:25:26 UTC


README

xTerraform package will provide project with easily scalable and maintainable cloud infrastructure.

Contents

Requirements

  1. Install Terraform CLI in your machine: [https://www.terraform.io/downloads.html].

  2. Optionally:

Installation

Installation of xTerraform is per project basis. So do the following:

  1. Open terminal, change directory to current project root folder.

  2. Install xTerraform: composer require heyday/xterraform --dev.

  3. Create folder to contain terraform templates, for example: mkdir -p .xterraform/test.

  4. Publish Terraform templates to desired directory: cp -R vendor/heyday/xterraform/terraform/ .xterraform/test.

  5. Navigate to that directory: cd .xterraform/test.

  6. Update values.tfvars as needed.

  7. Initialize Terraform: terraform init.

Optionally you can add *.tf to .gitignore file, so all templates files will not be tracked by version control.

Application

  1. Apply infrastructure: terraform apply -var-file=values.tfvars

Destruction

  1. Destroy infrastructure: terraform destroy -var-file=values.tfvars