|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +name: 'RuntimeTemplate' |
| 17 | +description: | |
| 18 | + 'A runtime template is a VM configuration that specifies a machine type and other characteristics of the VM, |
| 19 | + as well as common settings such as the network and whether public internet access is enabled. When you create |
| 20 | + a runtime, its VM is created according to the specifications of a runtime template.' |
| 21 | +
|
| 22 | +references: |
| 23 | + guides: |
| 24 | + 'Create a runtime template': 'https://cloud.google.com/colab/docs/create-runtime-template' |
| 25 | + api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.notebookRuntimeTemplates' |
| 26 | +base_url: 'projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates' |
| 27 | +self_link: 'projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates/{{name}}' |
| 28 | +immutable: true |
| 29 | +create_url: 'projects/{{project}}/locations/{{location}}/notebookRuntimeTemplates?notebook_runtime_template_id={{name}}' |
| 30 | +autogen_async: true |
| 31 | +async: |
| 32 | + operation: |
| 33 | + base_url: '{{op_id}}' |
| 34 | +custom_code: |
| 35 | + post_create: 'templates/terraform/post_create/colab_runtime_template.tmpl' |
| 36 | +examples: |
| 37 | + - name: 'colab_runtime_template_basic' |
| 38 | + primary_resource_id: 'runtime-template' |
| 39 | + primary_resource_name: 'fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])' |
| 40 | + vars: |
| 41 | + runtime_template_name: 'colab-runtime-template' |
| 42 | + - name: 'colab_runtime_template_no_name' |
| 43 | + primary_resource_id: 'runtime-template' |
| 44 | + exclude_import_test: true |
| 45 | + - name: 'colab_runtime_template_full' |
| 46 | + primary_resource_id: 'runtime-template' |
| 47 | + primary_resource_name: 'fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])' |
| 48 | + vars: |
| 49 | + runtime_template_name: 'colab-runtime-template' |
| 50 | + network_name: 'colab-test-default' |
| 51 | + key_name: 'my-crypto-key' |
| 52 | + test_vars_overrides: |
| 53 | + key_name: 'acctest.BootstrapKMSKeyInLocation(t, "us-central1").CryptoKey.Name' |
| 54 | +parameters: |
| 55 | + - name: 'location' |
| 56 | + type: String |
| 57 | + required: true |
| 58 | + url_param_only: true |
| 59 | + description: 'The location for the resource: https://cloud.google.com/colab/docs/locations' |
| 60 | +properties: |
| 61 | + - name: 'name' |
| 62 | + type: String |
| 63 | + default_from_api: true |
| 64 | + custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.tmpl' |
| 65 | + description: 'The resource name of the Runtime Template' |
| 66 | + - name: 'displayName' |
| 67 | + type: String |
| 68 | + description: |
| 69 | + Required. The display name of the Runtime Template. |
| 70 | + required: true |
| 71 | + - name: description |
| 72 | + type: String |
| 73 | + description: 'The description of the Runtime Template.' |
| 74 | + - name: machineSpec |
| 75 | + type: NestedObject |
| 76 | + default_from_api: true |
| 77 | + description: | |
| 78 | + 'The machine configuration of the runtime.' |
| 79 | + properties: |
| 80 | + - name: 'machineType' |
| 81 | + type: string |
| 82 | + default_from_api: true |
| 83 | + description: | |
| 84 | + The Compute Engine machine type selected for the runtime. |
| 85 | + - name: 'acceleratorType' |
| 86 | + type: enum |
| 87 | + description: | |
| 88 | + The type of hardware accelerator used by the runtime. If specified, acceleratorCount must also be specified. |
| 89 | + enum_values: |
| 90 | + - 'NVIDIA_TESLA_V100' |
| 91 | + - 'NVIDIA_TESLA_T4' |
| 92 | + - 'NVIDIA_TESLA_A100' |
| 93 | + - 'NVIDIA_A100_80GB' |
| 94 | + - 'NVIDIA_L4' |
| 95 | + - name: 'acceleratorCount' |
| 96 | + type: Integer |
| 97 | + default_from_api: true |
| 98 | + description: 'The number of accelerators used by the runtime.' |
| 99 | + - name: dataPersistentDiskSpec |
| 100 | + default_from_api: true |
| 101 | + type: NestedObject |
| 102 | + description: 'The configuration for the data disk of the runtime.' |
| 103 | + properties: |
| 104 | + - name: 'diskType' |
| 105 | + type: enum |
| 106 | + description: 'The type of the persistent disk.' |
| 107 | + default_from_api: true |
| 108 | + enum_values: |
| 109 | + - 'pd-standard' |
| 110 | + - 'pd-ssd' |
| 111 | + - 'pd-balanced' |
| 112 | + - 'pd-extreme' |
| 113 | + - name: 'diskSizeGb' |
| 114 | + type: int |
| 115 | + default_from_api: true |
| 116 | + description: | |
| 117 | + The disk size of the runtime in GB. If specified, the diskType must also be specified. The minimum size is 10GB and the maximum is 65536GB. |
| 118 | + - name: networkSpec |
| 119 | + type: NestedObject |
| 120 | + default_from_api: true |
| 121 | + description: 'The network configuration for the runtime.' |
| 122 | + properties: |
| 123 | + - name: 'enableInternetAccess' |
| 124 | + type: Boolean |
| 125 | + description: Enable public internet access for the runtime. |
| 126 | + - name: 'network' |
| 127 | + default_from_api: true |
| 128 | + type: String |
| 129 | + description: 'The name of the VPC that this runtime is in.' |
| 130 | + diff_suppress_func: 'tpgresource.CompareSelfLinkRelativePaths' |
| 131 | + - name: 'subnetwork' |
| 132 | + type: String |
| 133 | + description: 'The name of the subnetwork that this runtime is in.' |
| 134 | + diff_suppress_func: 'tpgresource.CompareSelfLinkRelativePaths' |
| 135 | + - name: 'labels' |
| 136 | + type: KeyValueLabels |
| 137 | + description: 'Labels to identify and group the runtime template.' |
| 138 | + - name: idleShutdownConfig |
| 139 | + type: NestedObject |
| 140 | + default_from_api: true |
| 141 | + description: 'Notebook Idle Shutdown configuration for the runtime.' |
| 142 | + properties: |
| 143 | + - name: 'idleTimeout' |
| 144 | + default_from_api: true |
| 145 | + type: String |
| 146 | + description: 'The duration after which the runtime is automatically shut down. An input of 0s disables the idle shutdown feature, and a valid range is [10m, 24h].' |
| 147 | + - name: eucConfig |
| 148 | + type: NestedObject |
| 149 | + description: 'EUC configuration of the NotebookRuntimeTemplate.' |
| 150 | + properties: |
| 151 | + - name: 'eucDisabled' |
| 152 | + type: Boolean |
| 153 | + description: 'Disable end user credential access for the runtime.' |
| 154 | + - name: shieldedVmConfig |
| 155 | + type: NestedObject |
| 156 | + description: 'Runtime Shielded VM spec.' |
| 157 | + properties: |
| 158 | + - name: 'enableSecureBoot' |
| 159 | + type: Boolean |
| 160 | + description: 'Enables secure boot for the runtime.' |
| 161 | + - name: 'networkTags' |
| 162 | + type: Array |
| 163 | + item_type: |
| 164 | + type: String |
| 165 | + description: 'Applies the given Compute Engine tags to the runtime.' |
| 166 | + - name: encryptionSpec |
| 167 | + type: NestedObject |
| 168 | + description: 'Customer-managed encryption key spec for the notebook runtime.' |
| 169 | + properties: |
| 170 | + - name: 'kmsKeyName' |
| 171 | + type: String |
| 172 | + description: 'The Cloud KMS encryption key (customer-managed encryption key) used to protect the runtime.' |
0 commit comments