deployer

command module
v0.0.0-...-e9e2618 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

Terraform Example Foundation deploy helper

Helper tool to deploy the Terraform example foundation.

Usage

  • Check if required tools, Go 1.18+, Terraform 1.3.0+, gcloud 393.0.0+, and Git 2.28.0+, are installed:

    go version
    
    terraform -version
    
    gcloud --version
    
    git --version
    
  • Create a directory in the file system to host the Cloud Source repositories the will be created and a copy of the terraform example foundation.

  • Clone the terraform-example-foundation repository on this directory.

    deploy-directory/
    └── terraform-example-foundation
    
  • Copy the file global.tfvars.example as global.tfvars to the same directory.

    deploy-directory/
    └── global.tfvars
    └── terraform-example-foundation
    
  • Update global.tfvars with values from your environment. See the READMEs for the stages for additional information:

  • Variable code_checkout_path is the full path to deploy-directory directory.

  • Variable foundation_code_path is the full path to terraform-example-foundation directory.

  • Build the helper:

    go build
    
  • Validate the tfvars file:

    ./deployer -tfvars_file <PATH TO 'global.tfvars' FILE> -validate
    
Supported flags
  -tfvars_file file
        Full path to the Terraform .tfvars file with the configuration to be used.
  -steps_file file
        Path to the steps file to be used to save progress. (default ".steps.json")
  -list_steps
        List the existing steps.
  -reset_step step
        Name of a step to be reset.
  -validate
        Validate tfvars file inputs
  -quiet
        If true, additional output is suppressed.
  -disable_prompt
        Disable interactive prompt.
  -destroy
        Destroy the deployment.
  -help
        Prints this help text and exits.

Requirements

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL