Expand description
Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region.
To get more information about NodeTemplate, see:
- API documentation
- How-to Guides
§Example Usage
§Node Template Basic
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let template = node_template::create(
"template",
NodeTemplateArgs::builder()
.name("soletenant-tmpl")
.node_type("n1-node-96-624")
.region("us-central1")
.build_struct(),
);
}
§Node Template Server Binding
resources:
template:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-with-licenses
region: us-central1
nodeType: n1-node-96-624
nodeAffinityLabels:
foo: baz
serverBinding:
type: RESTART_NODE_ON_MINIMAL_SERVERS
variables:
central1a:
fn::invoke:
function: gcp:compute:getNodeTypes
arguments:
zone: us-central1-a
§Node Template Accelerators
resources:
template:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-with-accelerators
region: us-central1
nodeType: n1-node-96-624
accelerators:
- acceleratorType: nvidia-tesla-t4
acceleratorCount: 4
variables:
central1a:
fn::invoke:
function: gcp:compute:getNodeTypes
arguments:
zone: us-central1-a
§Node Template Disks
resources:
template:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-with-disks
region: us-central1
nodeType: n2-node-80-640
disks:
- diskCount: 16
diskSizeGb: 375
diskType: local-ssd
variables:
central1a:
fn::invoke:
function: gcp:compute:getNodeTypes
arguments:
zone: us-central1-a
§Import
NodeTemplate can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, NodeTemplate can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/nodeTemplate:NodeTemplate default projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}
$ pulumi import gcp:compute/nodeTemplate:NodeTemplate default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/nodeTemplate:NodeTemplate default {{region}}/{{name}}
$ pulumi import gcp:compute/nodeTemplate:NodeTemplate default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments