Skip to content

Terraform code for provisioning an AWS Virtual Private Cloud (VPC) infrastructure. It automates the creation of VPC components such as subnets, route tables, and internet gateways. GitHub Actions are used for CI/CD to ensure infrastructure as code deployment.

Notifications You must be signed in to change notification settings

iam-abhishek-yadav/VPC_with_Terraform_And_Github_Actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS VPC Management with Terraform

This repository includes Terraform configurations designed for managing an AWS Virtual Private Cloud (VPC), allowing for both creation and destruction of the infrastructure.

Prerequisites

Before utilizing these Terraform configurations, ensure you have the following prerequisites in place:

  • AWS Account: You must possess an active AWS account to create and manage resources.
  • Terraform Installation: Make sure Terraform is installed on your local machine. You can download it from Terraform's official website.

Configuration

  • Setting up AWS S3 Backend for Terraform: To manage Terraform state, configure an S3 bucket in your AWS account named terraform-backend-s3-github. If this name is unavailable, create a bucket with a different name and update the terraform_vpc/providers.tf file accordingly.

     backend "s3" {
       bucket = "bucket_name"
       key    = "dev/terraform.tfstate"
       region = "us-east-1"
     }

Usage

  • Initialize Terraform: Begin by initializing Terraform with the following command:

    terraform init
  • Create the VPC: Execute the Terraform command below to create the VPC infrastructure:

    terraform apply --auto-approve
  • Destroy the VPC: When no longer needed, destroy the VPC and associated resources using the command:

    terraform destroy --auto-approve

About

Terraform code for provisioning an AWS Virtual Private Cloud (VPC) infrastructure. It automates the creation of VPC components such as subnets, route tables, and internet gateways. GitHub Actions are used for CI/CD to ensure infrastructure as code deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages