Boilerplate Terraform projects.
This project demonstrates how to deploy an EC2 instance using Terraform.
main.tf:- Contains the Terraform configuration for deploying the EC2 instance.
variables.tf:- Defines the variables used in the Terraform configuration.
- Initialize Terraform:
terraform init
- Plan with Terraform:
terraform plan
- Deploy with Terraform:
terraform apply
- Destroy with Terraform:
# Show the plan - requires confirmation to perform. terraform destroy # Create the destroy plan and output to a file for sharing. # Then use that plan to destroy i.. terraform plan -destroy -out="destroy.tfplan" terraform apply "destroy.tfplan"