generated from storyprotocol/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
95 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "vpc" { | ||
source = "./vpc" | ||
|
||
env = var.env | ||
region = var.region | ||
name = var.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
variable "region" { | ||
description = "The region where the resources will be created" | ||
type = string | ||
} | ||
|
||
variable "env" { | ||
description = "The environment name" | ||
type = string | ||
} | ||
|
||
variable "name" { | ||
description = "The name of the VPC" | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Filter out local zones not currently supported | ||
# with managed node groups | ||
data "aws_availability_zones" "available" { | ||
filter { | ||
name = "opt-in-status" | ||
values = ["opt-in-not-required"] | ||
} | ||
} | ||
|
||
module "iac-max-vpc" { | ||
source = "terraform-aws-modules/vpc/aws" | ||
version = "5.0.0" | ||
|
||
name = "iac-max-vpc" | ||
|
||
cidr = "10.0.0.0/16" | ||
azs = [data.aws_availability_zones.available.names[0]] | ||
|
||
public_subnets = ["10.0.1.0/24"] | ||
|
||
enable_nat_gateway = true | ||
single_nat_gateway = true | ||
enable_dns_hostnames = true | ||
|
||
tags = { | ||
Terraform = "true" | ||
Environment = var.env | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
output "vpc_id" { | ||
value = module.vpc.vpc_id | ||
description = "The ID of the VPC created." | ||
} | ||
|
||
output "public_subnet_ids" { | ||
value = module.vpc.public_subnet_ids | ||
description = "List of IDs of public subnets." | ||
} | ||
|
||
output "private_subnet_ids" { | ||
value = module.vpc.private_subnet_ids | ||
description = "List of IDs of private subnets." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "region" { | ||
description = "Region where the VPC will be created" | ||
type = string | ||
} | ||
variable "name" { | ||
description = "Name of the VPC" | ||
type = string | ||
} | ||
|
||
variable "env" { | ||
description = "Environment" | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,13 @@ | ||
variable "region" { | ||
description = "Region where the VPC will be created" | ||
type = string | ||
} | ||
variable "name" { | ||
description = "Name of the VPC" | ||
type = string | ||
} | ||
|
||
variable "cidr" { | ||
description = "CIDR block for the VPC" | ||
variable "env" { | ||
description = "Environment" | ||
type = string | ||
} | ||
|
||
variable "azs" { | ||
description = "Availability Zones to use for the subnets" | ||
type = list(string) | ||
} | ||
|
||
variable "private_subnets" { | ||
description = "List of private subnet CIDRs" | ||
type = list(string) | ||
} | ||
|
||
variable "public_subnets" { | ||
description = "List of public subnet CIDRs" | ||
type = list(string) | ||
} | ||
|
||
variable "enable_nat_gateway" { | ||
description = "Should be true if NAT gateway should be created" | ||
type = bool | ||
} | ||
|
||
variable "enable_vpn_gateway" { | ||
description = "Should be true if VPN gateway should be created" | ||
type = bool | ||
} |