Skip to content

oneanupam/terragrunt-gcp-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terragrunt GCP Lab

This repository contains terragrunt code to deploy infrastructure on google cloud platform. Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your configurations DRY.

Prerequisites

Below prerequisites must be fulfilled for successful execution of terraform concept code sets.

Software Requirement

Resources in this repository are meant to use with Terraform 1.3.6 & Terragrunt 0.43.2 versions. If you don't have the compatible version, download it from respective official repositories.

Note: See Installation-Guide on how to install Terraform.

Terraform Code Execution

To execute the Terraform code present under "tf_envs" folder, go to command prompt and cd to respective directory then run the following commands:

  • [Required] terraform init # To initialize the terraform working directory.
  • [Optional] terraform validate # To validate the terraform configuration.
  • [Optional] terraform fmt # To format the terraform configuration to a canonical format and style.
  • [Optional] terraform plan # To create an execution plan for terraform configuration files.
  • [Required] terraform apply -auto-approve # To execute the actions proposed in a terraform plan to create, update, or destroy infrastructure.
  • [Optional] terraform destroy -auto-approve # To destroy the created infrastructure. Specific resources can be destroyed using resource targetting.

Terragrunt Code Execution

To execute the Terragrunt code present under "tg_envs" folder, go to command prompt and cd to respective directory and then run the following commands:

  • [Required] terragrunt init # To initialize the terragrunt working directory.
  • [Optional] terragrunt validate # To validate the terraform configuration.
  • [Optional] terragrunt plan # To create an execution plan for terraform configuration files.
  • [Optional] terragrunt hclfmt # To recursively find hcl files and rewrite them into a canonical format.
  • [Required] terragrunt apply -auto-approve # To execute the actions proposed in a terragrunt plan to create, update, or destroy infrastructure.
  • [Optional] terragrunt destroy -auto-approve # To destroy the created infrastructure.

References

About

This repository contains terragrunt code to deploy infrastructure on google cloud platform.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages