Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 1.4 KB

README.md

File metadata and controls

47 lines (40 loc) · 1.4 KB

Github Terraform

Terraform-IaC-Starter

Kickstart your Infrastructure as Code journey with Terraform using this repository.

Getting Started

1. Clone the repository (SSH)

Make sure the SSH key is added to your GitHub account.

    git clone [email protected]:pasindu-kavinda-227/Terraform-IaC-Starter.git

2. Setup the env files

Create a file named terraform.tfvars

Generate these keys from the AWS console. You can select a AWS region.

access_key = "AWS Access Key ID here"
secret_key = "AWS Secret Key here"
region     = "AWS Region here"

3. Initialize Terraform

Run the Terraform Init command to initialize.

Make sure you have installed the Terraform CLI.

terraform init

4. Preview the changes

Run the Terraform Plan command to preview the changes that Terraform plans to make to your infrastructure.

terraform plan

5. Apply the changes

Run the Terraform Apply command to apply the changes that Terraform plans to make to your infrastructure.

terraform apply

Run command with -auto-approve to skip interactive approval.

6. Destroy the Infrastructure

Run Terraform Destroy command to revert the changes.

terraform apply -destroy