Skip to content

Commit 87d5e14

Browse files
committed
added enumValue,regex,output variable in metadata.display, changed variable project to project_id
1 parent e653788 commit 87d5e14

File tree

9 files changed

+955
-18
lines changed

9 files changed

+955
-18
lines changed

modules/gke-node-pool/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "google_container_node_pool" "main" {
1919

2020
name = var.name
2121
name_prefix = var.name_prefix
22-
project = var.project
22+
project = var.project_id
2323
cluster = var.cluster
2424
location = var.location
2525

modules/gke-node-pool/metadata.display.yaml

Lines changed: 203 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ spec:
3131
autoscaling:
3232
name: autoscaling
3333
title: Autoscaling
34+
properties:
35+
location_policy:
36+
name: location_policy
37+
title: Location Policy
38+
enumValueLabels:
39+
- label: ANY
40+
value: ANY
41+
- label: BALANCED
42+
value: BALANCED
3443
cluster:
3544
name: cluster
3645
title: Cluster
@@ -43,6 +52,7 @@ spec:
4352
location:
4453
name: location
4554
title: Location
55+
level: 1
4656
management:
4757
name: management
4858
title: Management
@@ -58,9 +68,179 @@ spec:
5868
network_config:
5969
name: network_config
6070
title: Network Config
71+
properties:
72+
network_performance_config:
73+
name: network_performance_config
74+
title: Network Performance Config
75+
properties:
76+
total_egress_bandwidth_tier:
77+
name: total_egress_bandwidth_tier
78+
title: Total Egress Bandwidth Tier
79+
enumValueLabels:
80+
- label: TIER_UNSPECIFIED
81+
value: TIER_UNSPECIFIED
82+
- label: TIER_1
83+
value: TIER_1
6184
node_config:
6285
name: node_config
6386
title: Node Config
87+
properties:
88+
disk_type:
89+
name: disk_type
90+
title: Disk Type
91+
enumValueLabels:
92+
- label: pd-standard
93+
value: pd-standard
94+
- label: pd-balanced
95+
value: pd-balanced
96+
- label: pd-ssd
97+
value: pd-ssd
98+
local_ssd_encryption_mode:
99+
name: local_ssd_encryption_mode
100+
title: Local SSD Encryption Mode
101+
enumValueLabels:
102+
- label: STANDARD_ENCRYPTION
103+
value: STANDARD_ENCRYPTION
104+
- label: EPHEMERAL_KEY_ENCRYPTION
105+
value: EPHEMERAL_KEY_ENCRYPTION
106+
logging_variant:
107+
name: logging_variant
108+
title: Logging Variant
109+
enumValueLabels:
110+
- label: DEFAULT
111+
value: DEFAULT
112+
- label: MAX_THROUGHPUT
113+
value: MAX_THROUGHPUT
114+
guest_accelerator:
115+
name: guest_accelerator
116+
title: Guest Accelerator
117+
properties:
118+
gpu_driver_installation_config:
119+
name: gpu_driver_installation_config
120+
title: GPU Driver Installation Config
121+
properties:
122+
gpu_driver_version:
123+
name: gpu_driver_version
124+
title: GPU Driver Version
125+
enumValueLabels:
126+
- label: DEFAULT
127+
value: DEFAULT
128+
- label: INSTALLATION_DISABLED
129+
value: INSTALLATION_DISABLED
130+
- label: LATEST
131+
value: LATEST
132+
- label: GPU_DRIVER_VERSION_UNSPECIFIED
133+
value: GPU_DRIVER_VERSION_UNSPECIFIED
134+
gpu_sharing_config:
135+
name: gpu_sharing_config
136+
title: GPU Sharing Config
137+
properties:
138+
gpu_sharing_strategy:
139+
name: gpu_sharing_strategy
140+
title: GPU Sharing Strategy
141+
enumValueLabels:
142+
- label: TIME_SHARING
143+
value: TIME_SHARING
144+
- label: MPS
145+
value: MPS
146+
oauth_scopes:
147+
name: oauth_scopes
148+
title: Oauth Scopes
149+
subtext: A list of Google API scopes to be made available on all of the node VMs under the "default" service account. Use the "https://www.googleapis.com/auth/cloud-platform" scope to grant access to all APIs.
150+
reservation_affinity:
151+
name: reservation_affinity
152+
title: Reservation Affinity
153+
properties:
154+
consume_reservation_type:
155+
name: consume_reservation_type
156+
title: Consume Reservation Type
157+
enumValueLabels:
158+
- label: UNSPECIFIED
159+
value: UNSPECIFIED
160+
- label: NO_RESERVATION
161+
value: NO_RESERVATION
162+
- label: ANY_RESERVATION
163+
value: ANY_RESERVATION
164+
- label: SPECIFIC_RESERVATION
165+
value: SPECIFIC_RESERVATION
166+
sandbox_config:
167+
name: sandbox_config
168+
title: Sandbox Config
169+
properties:
170+
sandbox_type:
171+
name: sandbox_type
172+
title: Sandbox Type
173+
enumValueLabels:
174+
- label: gvisor
175+
value: gvisor
176+
taint:
177+
name: taint
178+
title: Taint
179+
properties:
180+
effect:
181+
name: effect
182+
title: Effect
183+
enumValueLabels:
184+
- label: NO_SCHEDULE
185+
value: NO_SCHEDULE
186+
- label: PREFER_NO_SCHEDULE
187+
value: PREFER_NO_SCHEDULE
188+
- label: NO_EXECUTE
189+
value: NO_EXECUTE
190+
workload_metadata_config:
191+
name: workload_metadata_config
192+
title: Workload Metadata Config
193+
properties:
194+
mode:
195+
name: mode
196+
title: Mode
197+
enumValueLabels:
198+
- label: GCE_METADATA
199+
value: GCE_METADATA
200+
- label: GKE_METADATA
201+
value: GKE_METADATA
202+
- label: MODE_UNSPECIFIED
203+
value: MODE_UNSPECIFIED
204+
kubelet_config:
205+
name: kubelet_config
206+
title: Kubelet Config
207+
properties:
208+
cpu_manager_policy:
209+
name: cpu_manager_policy
210+
title: CPU Manager Policy
211+
enumValueLabels:
212+
- label: none
213+
value: none
214+
- label: static
215+
value: static
216+
linux_node_config:
217+
name: linux_node_config
218+
title: Linux Node Config
219+
properties:
220+
cgroup_mode:
221+
name: cgroup_mode
222+
title: Cgroup Mode
223+
enumValueLabels:
224+
- label: CGROUP_MODE_UNSPECIFIED
225+
value: CGROUP_MODE_UNSPECIFIED
226+
- label: CGROUP_MODE_V1
227+
value: CGROUP_MODE_V1
228+
- label: CGROUP_MODE_V2
229+
value: CGROUP_MODE_V2
230+
windows_node_config:
231+
name: windows_node_config
232+
title: Windows Node Config
233+
properties:
234+
osversion:
235+
name: osversion
236+
title: OS Version
237+
enumValueLabels:
238+
- label: OS_VERSION_UNSPECIFIED
239+
value: OS_VERSION_UNSPECIFIED
240+
- label: OS_VERSION_LTSC2019
241+
value: OS_VERSION_LTSC2019
242+
- label: OS_VERSION_LTSC2022
243+
value: OS_VERSION_LTSC2022
64244
node_count:
65245
name: node_count
66246
title: Node Count
@@ -70,9 +250,16 @@ spec:
70250
placement_policy:
71251
name: placement_policy
72252
title: Placement Policy
73-
project:
74-
name: project
75-
title: Project
253+
properties:
254+
type:
255+
name: type
256+
title: Type
257+
enumValueLabels:
258+
- label: COMPACT
259+
value: COMPACT
260+
project_id:
261+
name: project_id
262+
title: Project Id
76263
queued_provisioning:
77264
name: queued_provisioning
78265
title: Queued Provisioning
@@ -82,3 +269,16 @@ spec:
82269
upgrade_settings:
83270
name: upgrade_settings
84271
title: Upgrade Settings
272+
properties:
273+
strategy:
274+
name: strategy
275+
title: Strategy
276+
enumValueLabels:
277+
- label: SURGE
278+
value: SURGE
279+
- label: BLUE_GREEN
280+
value: BLUE_GREEN
281+
runtime:
282+
outputs:
283+
id:
284+
visibility: VISIBILITY_ROOT

modules/gke-node-pool/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ spec:
127127
interfaces:
128128
variables:
129129
- name: cluster
130-
description: The cluster to create the node pool for. Cluster must be present in location provided for clusters. May be specified in the format projects/{{project}}/locations/{{location}}/clusters/{{cluster}} or as just the name of the cluster.
130+
description: The cluster to create the node pool for. Cluster must be present in location provided for clusters. May be specified in the format projects/{{project_id}}/locations/{{location}}/clusters/{{cluster}} or as just the name of the cluster.
131131
varType: string
132132
required: true
133133
connections:
@@ -136,7 +136,7 @@ spec:
136136
version: ">=38.0.1"
137137
spec:
138138
outputExpr: cluster_id
139-
- name: project
139+
- name: project_id
140140
description: The ID of the project in which to create the node pool.
141141
varType: string
142142
required: true
@@ -400,7 +400,7 @@ spec:
400400
update: 45m
401401
outputs:
402402
- name: id
403-
description: an identifier for the resource with format {{project}}/{{location}}/{{cluster}}/{{name}}
403+
description: an identifier for the resource with format {{project_id}}/{{location}}/{{cluster}}/{{name}}
404404
- name: instance_group_urls
405405
description: The resource URLs of the managed instance groups associated with this node pool.
406406
- name: managed_instance_group_urls

modules/gke-node-pool/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
output "id" {
18-
description = "an identifier for the resource with format {{project}}/{{location}}/{{cluster}}/{{name}}"
18+
description = "an identifier for the resource with format {{project_id}}/{{location}}/{{cluster}}/{{name}}"
1919
value = google_container_node_pool.main.id
2020
}
2121

modules/gke-node-pool/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
*/
1616

1717
variable "cluster" {
18-
description = "The cluster to create the node pool for. Cluster must be present in location provided for clusters. May be specified in the format projects/{{project}}/locations/{{location}}/clusters/{{cluster}} or as just the name of the cluster."
18+
description = "The cluster to create the node pool for. Cluster must be present in location provided for clusters. May be specified in the format projects/{{project_id}}/locations/{{location}}/clusters/{{cluster}} or as just the name of the cluster."
1919
type = string
2020
}
2121

22-
variable "project" {
22+
variable "project_id" {
2323
description = "The ID of the project in which to create the node pool."
2424
type = string
2525
}

modules/gke-standard-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "google_container_cluster" "main" {
1919

2020
name = var.name
2121
description = var.description
22-
project = var.project
22+
project = var.project_id
2323
resource_labels = var.resource_labels
2424

2525
location = var.location

0 commit comments

Comments
 (0)