Skip to content

Commit

Permalink
Merge branch 'feat/provision_vpc' of github.com:storyprotocol/iac-max…
Browse files Browse the repository at this point in the history
…-modules into feat/provision_vpc
  • Loading branch information
AndyBoWu committed May 8, 2024
2 parents 8ce5229 + 2428ef0 commit af708bb
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 5 deletions.
4 changes: 4 additions & 0 deletions infra/s3/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module "s3-bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "4.1.2"
}
3 changes: 3 additions & 0 deletions infra/s3/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "bucket_id" {
value = module.s3-bucket.s3_bucket_id
}
4 changes: 4 additions & 0 deletions infra/s3/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variable "bucket_name" {
description = "The name of the bucket."
type = string
}
13 changes: 10 additions & 3 deletions infra/vpc/output.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
output "vpc_id" {
value = module.this.vpc_id
value = module.vpc.vpc_id
description = "The ID of the VPC created."
}

output "private_subnets" {
value = module.this.private_subnets
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."
}
34 changes: 32 additions & 2 deletions infra/vpc/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
variable "name" {
description = "Name of the VPC"
type = string
}

variable "cidr" {
type = string
default = "10.0.0.0/16"
description = "CIDR block for the VPC"
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
}

0 comments on commit af708bb

Please sign in to comment.