Terraform - Infrastructure as Code boilerplate for AWS as cloud service provider
This code builds an AWS infrastructure having:
provider "aws" {
region = "us-east-1"
access_key = "ACCESS_KEY_HERE"
secret_key = "SECRET_KEY_HERE"
}
terraform init
terraform plan
terraform apply // warning: this step will allocate AWS resources and may incur cost
Use following commands to better understand the state of the cloud infrastructure.
Commands to be executed in format: terraform init
init Initialize a new or existing Terraform configuration
plan Generate and show an execution plan
apply Builds or changes infrastructure
destroy Destroy Terraform-managed infrastructure
output Read an output from a state file
providers Prints a tree of the providers used in the configuration
push Upload this Terraform module to Terraform Enterprise to run
refresh Update local state file against real resources
show Inspect Terraform state or plan
validate Validates the Terraform files
version Prints the Terraform version
- Terraform - Write, Plan, and Create Infrastructure as Code
- HCL language support - This plugin adds support for HashiCorp Configuration Language (HCL) and HashiCorp Interpolation Language (HIL) languages
Please feel free to add sample infrastucture using other cloud platforms like Google Cloud, Microsoft Azure, etc.
- Terraform documentation & guides