-
Notifications
You must be signed in to change notification settings - Fork 0
/
infra.jinja
82 lines (76 loc) · 2.07 KB
/
infra.jinja
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
80
81
{% set prefix="mantis0858147" %}
{% set region="us-west1" %}
resources:
- type: compute.v1.network
name: {{prefix}}-vpc
properties:
autoCreateSubnetworks: false
- type: compute.v1.subnetwork
name: {{prefix}}-sb-wrkld
properties:
network: $(ref.{{prefix}}-vpc.selfLink)
region: {{region}}
ipCidrRange: 10.0.0.0/16
- type: compute.v1.subnetwork
name: {{prefix}}-sb-fgt-int
properties:
region: {{region}}
ipCidrRange: 172.20.2.0/24
network: $(ref.{{prefix}}-vpc.selfLink)
- type: compute.v1.subnetwork
name: {{prefix}}-sb-ilb
properties:
network: $(ref.{{prefix}}-vpc.selfLink)
region: {{region}}
ipCidrRange: 10.129.0.0/23
purpose: INTERNAL_HTTPS_LOAD_BALANCER
role: ACTIVE
- type: compute.v1.firewall
name: {{prefix}}-ilb-to-gke
properties:
network: $(ref.{{prefix}}-vpc.selfLink)
sourceRanges:
- $(ref.{{prefix}}-sb-ilb.ipCidrRange)
allowed:
- IPProtocol: tcp
ports: ["1-65535"]
- type: compute.v1.network
name: {{prefix}}-vpc-ext
properties:
autoCreateSubnetworks: false
- type: compute.v1.subnetwork
name: {{prefix}}-sb-ext
properties:
network: $(ref.{{prefix}}-vpc-ext.selfLink)
region: {{region}}
ipCidrRange: 172.20.1.0/24
- type: singlevm2.jinja
name: {{prefix}}-fgt
properties:
zone: {{region}}-b
license:
type: byol
networks:
- name: ext
vpcLink: $(ref.{{prefix}}-vpc-ext.selfLink)
subnetLink: $(ref.{{prefix}}-sb-ext.selfLink)
externalIP:
name: ext-ip
- name: int
vpcLink: $(ref.{{prefix}}-vpc.selfLink)
subnetLink: $(ref.{{prefix}}-sb-fgt-int.selfLink)
- type: gcp-types/container-v1:projects.locations.clusters
name: {{prefix}}-gke
properties:
parent: projects/{{env.project}}/locations/{{region}}
cluster:
name: {{prefix}}-gke
network: $(ref.{{prefix}}-vpc.selfLink)
subnetwork: $(ref.{{prefix}}-sb-wrkld.selfLink)
locations:
- {{region}}-b
ipAllocationPolicy:
useIpAliases: true
nodePools:
- name: {{prefix}}-pool1
initialNodeCount: 3