feature: subnets

This commit is contained in:
David FILLON committed 2024-03-24 17:03:43 +01:00
1 parent af8e1cc4a6
commit b7b1653cc6
10 files changed
+253 -89

No files matched your search

+23 -11
View File
@@ -1,14 +1,7 @@
provider "aws" {
region = local.region
default_tags {
tags = local.tags
}
}
locals {
name = "ex-${basename(path.cwd)}"
region = "eu-west-1"
name = "ex-${basename(path.cwd)}"
region = "eu-west-1"
cidr_block = "10.0.0.0/16"
tags = {
Example = local.name
@@ -17,6 +10,25 @@ locals {
}
}
provider "aws" {
region = local.region
default_tags {
tags = local.tags
}
}
module "vpc" {
source = "../.."
source = "../.."
prefix = local.name
cidr_block = local.cidr_block
subnet_groups = {
public = {
public = true
cidr_block = cidrsubnet(local.cidr_block, 1, 0)
}
private = {
cidr_block = cidrsubnet(local.cidr_block, 1, 1)
}
}
}