-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
43 lines (36 loc) · 880 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0.0"
}
}
required_version = ">= 1.2.0"
backend "s3" {
bucket = "bucket-andrem"
key = "terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "dynamodb_table_name"
}
}
provider "aws" {
region = var.region
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "andrem-vpc"
cidr = "172.31.0.0/16"
azs = var.azs
# Define CIDR blocks for your private subnets
private_subnets = ["172.31.0.0/26", "172.31.0.64/26"]
# Define CIDR blocks for your public subnets
public_subnets = ["172.31.0.128/26", "172.31.0.192/26"]
enable_nat_gateway = true
enable_vpn_gateway = true
tags = {
Terraform = "true"
Environment = "Development"
Project = "andrem"
}
}