feature: subnets
This commit is contained in:
1 parent
af8e1cc4a6
commit
b7b1653cc6
10 files changed
+253
-89
No files matched your search
+23
-11
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user