Skip to content

Commit 6f44918

Browse files
jjtrobertsniharika-98
authored andcommitted
feat: Add disks support to compute_node_template (GoogleCloudPlatform#12187)
1 parent 421f47f commit 6f44918

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

mmv1/products/compute/NodeTemplate.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ examples:
5959
primary_resource_id: 'template'
6060
vars:
6161
template_name: 'soletenant-with-accelerators'
62+
- name: 'node_template_disks'
63+
primary_resource_id: 'template'
64+
vars:
65+
template_name: 'soletenant-with-disks'
6266
parameters:
6367
- name: 'region'
6468
type: ResourceRef
@@ -175,3 +179,23 @@ properties:
175179
enum_values:
176180
- 'ENABLED'
177181
- 'NONE'
182+
- name: 'disks'
183+
type: Array
184+
description: |
185+
List of the type, size and count of disks attached to the
186+
node template
187+
item_type:
188+
type: NestedObject
189+
properties:
190+
- name: 'diskCount'
191+
type: Integer
192+
description: |
193+
Specifies the number of such disks.
194+
- name: 'diskType'
195+
type: String
196+
description: |
197+
Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
198+
- name: 'diskSizeGb'
199+
type: Integer
200+
description: |
201+
Specifies the size of the disk in base-2 GB.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
data "google_compute_node_types" "central1a" {
2+
zone = "us-central1-a"
3+
}
4+
5+
resource "google_compute_node_template" "{{$.PrimaryResourceId}}" {
6+
name = "{{index $.Vars "template_name"}}"
7+
region = "us-central1"
8+
node_type = "n2-node-80-640"
9+
10+
disks {
11+
disk_count = 16
12+
disk_size_gb = 375
13+
disk_type = "local-ssd"
14+
}
15+
}
16+

0 commit comments

Comments
 (0)