generated from aws-ia/.github
-
Notifications
You must be signed in to change notification settings - Fork 30
/
main.tf
79 lines (67 loc) · 2.13 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#####################################################################################
# Terraform module examples are meant to show an _example_ on how to use a module
# per use-case. The code below should not be copied directly but referenced in order
# to build your own root module that invokes this module
#####################################################################################
module "basic" {
# source = "aws-ia/ipam/aws"
source = "../.."
top_cidr = ["10.0.0.0/8"]
pool_configurations = {
corporate-us-west-2 = {
description = "2nd level, locale us-west-2 pool"
cidr = ["10.0.0.0/16", "10.1.0.0/16"]
locale = "us-west-2"
sub_pools = {
sandbox = {
name = "mysandbox"
cidr = ["10.0.0.0/20"]
ram_share_principals = var.sandbox_ou_arn
allocation_resource_tags = {
env = "sandbox"
}
}
dev = {
cidr = ["10.1.0.0/20"]
sub_pools = {
team_a = {
cidr = ["10.1.0.0/24"]
ram_share_principals = var.prod_account # prod account
}
team_b = {
cidr = ["10.1.1.0/24"]
ram_share_principals = var.prod_account # prod account
}
}
}
prod = {
cidr = ["10.1.16.0/20"]
sub_pools = {
team_a = {
cidr = ["10.1.16.0/24"]
ram_share_principals = var.prod_account # prod account
}
team_b = {
cidr = ["10.1.17.0/24"]
ram_share_principals = var.prod_account # prod account
}
}
}
}
}
us-east-1 = {
cidr = ["10.2.0.0/16"]
locale = "us-east-1"
sub_pools = {
team_a = {
cidr = ["10.2.0.0/20"]
ram_share_principals = var.prod_ou_arn
}
team_b = {
cidr = ["10.2.16.0/20"]
ram_share_principals = var.prod_ou_arn
}
}
}
}
}