Skip to content

Commit

Permalink
feat: Add disks support to compute_node_template (GoogleCloudPlatfo…
Browse files Browse the repository at this point in the history
  • Loading branch information
jjtroberts authored Nov 4, 2024
1 parent ee5b3de commit e1a0915
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mmv1/products/compute/NodeTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ examples:
primary_resource_id: 'template'
vars:
template_name: 'soletenant-with-accelerators'
- name: 'node_template_disks'
primary_resource_id: 'template'
vars:
template_name: 'soletenant-with-disks'
parameters:
- name: 'region'
type: ResourceRef
Expand Down Expand Up @@ -175,3 +179,23 @@ properties:
enum_values:
- 'ENABLED'
- 'NONE'
- name: 'disks'
type: Array
description: |
List of the type, size and count of disks attached to the
node template
item_type:
type: NestedObject
properties:
- name: 'diskCount'
type: Integer
description: |
Specifies the number of such disks.
- name: 'diskType'
type: String
description: |
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.
- name: 'diskSizeGb'
type: Integer
description: |
Specifies the size of the disk in base-2 GB.
16 changes: 16 additions & 0 deletions mmv1/templates/terraform/examples/node_template_disks.tf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
data "google_compute_node_types" "central1a" {
zone = "us-central1-a"
}

resource "google_compute_node_template" "{{$.PrimaryResourceId}}" {
name = "{{index $.Vars "template_name"}}"
region = "us-central1"
node_type = "n2-node-80-640"

disks {
disk_count = 16
disk_size_gb = 375
disk_type = "local-ssd"
}
}

0 comments on commit e1a0915

Please sign in to comment.