0.0.13 • Published 3 years ago

generator-cloud-tf-backend-cjc v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Yeoman Generator - Cloud Terraform Scaffolding

Overview

This Yeoman generator creates Terraform backend storage (to store terraform remote state)

Project Image

Supported Cloud Providers

Azure

This generator creates templates that build an Azure backend that follows the pattern depicted below Project Image

AWS

This generator creates templates that build an AWS backend that follows the pattern depicted below Project Image

Actions taken by the generator

Prompting

  • Asks for
    • project metadata values
    • target cloud provider
    • target cloud provider region
    • environments to be supported
      • choices include upper and lower (both selected by default)
    • common cloud resource tags

Writing

  • Creates Cloud Backend Configuration Files (opinionated backend naming convention)
  • Creates Backend Parameter Files
  • Creates terraform templates files for terraform backends (Terraform main.tf, variables.tf, and output.tf files)

Installing

  • initializes the local git repo (with either git or git flow)

Optionally installs the following

  • python3-pip
  • terraform 0.12.30

Optionally configures the following

  • Git Flow
  • Atlantis Workflow
  • Pre-Commit Hooks for Terraform

The resulting project will have the following structure:

backend_project
└───backends
|   |   lower-backend (default)
|   |   lower-project-backend-key (default)
|   |   upper-backend (default)
|   |   upper-project-backend-key (default)
└───parameters
|   |   lower-project.tfvars (default)
|   |   lower.tfvars (default)
|   |   upper-project.tfvars (default)
|   |   upper.tfvars (default)
└───scripts
|   |   prep-tf-env.sh (optional)
|   .gitignore
|   .pre-commit-config.yaml (optional)
|   atlantis.yaml (optional)
|   main.tf
|   outputs.tf
|   README.md
|   variables.tf

Note: The "-backend-key" files contain the object name for the terraform state per environment (upper - prod & uat, lower - sit, qa, dev).

Usage

Development

  • TBD

Prerequisites

  • npm installed
  • Yeoman installed
  • Before the generated terraform backend project templates are used, credentials for either AWS or Azure must be in place.

Configurations

  • TBD

Tests

  • TBD

Note: As of 3/24/21 this generator has only been tested on Ubuntu. Testing on additional operating systems coming soon.

Authors

Charlie Christina

0.0.12

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago