File tree Expand file tree Collapse file tree 6 files changed +63
-1
lines changed
Expand file tree Collapse file tree 6 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 55* .tfstate
66* .tfstate. *
77
8+ # Local .hcl configurations
9+ * .hcl
10+
811# Crash log files
9- crash .log
12+ * .log
1013
1114# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
1215# .tfvars files are managed as part of configuration and so should be included in
Original file line number Diff line number Diff line change 1+ # Terraform Backend
2+ /*
3+ terraform {
4+ backend "s3" {}
5+ }
6+ */
Original file line number Diff line number Diff line change 1+ # AWS VPC
2+ terraform {
3+ required_version = " >= 0.12.0"
4+ }
5+
6+ # AWS VPC Resources
7+ resource "aws_vpc" "vpc" {
8+ cidr_block = " ${ var . cidr } "
9+
10+ tags = {
11+ Name = " ${ var . prefix } -${ var . environment } "
12+ Environment = var.environment
13+ }
14+ }
15+
16+ # AWS VPC Internet Gateway
17+ resource "aws_internet_gateway" "igw" {
18+ vpc_id = aws_vpc. vpc . id
19+
20+ tags = {
21+ Name = " ${ var . prefix } -${ var . environment } "
22+ Environment = var.environment
23+ }
24+ }
Original file line number Diff line number Diff line change 1+ # Terraform Output
Original file line number Diff line number Diff line change 1+ # Terraform Provider
2+ provider "aws" {
3+ region = var. aws_region
4+ }
Original file line number Diff line number Diff line change 1+ # Terraform Variables
2+ variable "aws_region" {
3+ description = " AWS Default Region"
4+ type = string
5+ default = " us-east-1"
6+ }
7+
8+ variable "prefix" {
9+ description = " To apply generic naming to AWS VPC Resources"
10+ type = string
11+ default = " copper"
12+ }
13+
14+ variable "environment" {
15+ description = " To apply generic environment to AWS VPC Resources"
16+ type = string
17+ default = " devops"
18+ }
19+
20+ variable "cidr" {
21+ description = " CIDR block value to define the size of the AWS VPC"
22+ type = string
23+ default = " 10.0.0.0/20"
24+ }
You can’t perform that action at this time.
0 commit comments