Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iam-abhishek-yadav/vpc_with_terraform_and_github_actions
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.
https://github.com/iam-abhishek-yadav/vpc_with_terraform_and_github_actions
githubactions terraform
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/iam-abhishek-yadav/vpc_with_terraform_and_github_actions
- Owner: iam-abhishek-yadav
- Created: 2024-01-07T11:18:13.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-16T14:26:05.000Z (6 months ago)
- Last Synced: 2024-06-16T15:59:01.204Z (6 months ago)
- Topics: githubactions, terraform
- Language: HCL
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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](https://www.terraform.io/downloads.html).**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.
```hcl
backend "s3" {
bucket = "bucket_name"
key = "dev/terraform.tfstate"
region = "us-east-1"
}
```**Usage**
- **Initialize Terraform:** Begin by initializing Terraform with the following command:
```bash
terraform init
```- **Create the VPC:** Execute the Terraform command below to create the VPC infrastructure:
```bash
terraform apply --auto-approve
```- **Destroy the VPC:** When no longer needed, destroy the VPC and associated resources using the command:
```bash
terraform destroy --auto-approve
```