Expand description
Represents a NodeGroup resource to manage a group of sole-tenant nodes.
To get more information about NodeGroup, see:
- API documentation
- How-to Guides
Warning: Due to limitations of the API, this provider cannot update the number of nodes in a node group and changes to node group size either through provider config or through external changes will cause the provider to delete and recreate the node group.
§Example Usage
§Node Group Basic
resources:
soletenant-tmpl:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-tmpl
region: us-central1
nodeType: n1-node-96-624
nodes:
type: gcp:compute:NodeGroup
properties:
name: soletenant-group
zone: us-central1-a
description: example google_compute_node_group for the Google Provider
initialSize: 1
nodeTemplate: ${["soletenant-tmpl"].id}
§Node Group Maintenance Interval
resources:
soletenant-tmpl:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-tmpl
region: us-central1
nodeType: c2-node-60-240
nodes:
type: gcp:compute:NodeGroup
properties:
name: soletenant-group
zone: us-central1-a
description: example google_compute_node_group for Terraform Google Provider
initialSize: 1
nodeTemplate: ${["soletenant-tmpl"].id}
maintenanceInterval: RECURRENT
§Node Group Autoscaling Policy
resources:
soletenant-tmpl:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-tmpl
region: us-central1
nodeType: n1-node-96-624
nodes:
type: gcp:compute:NodeGroup
properties:
name: soletenant-group
zone: us-central1-a
description: example google_compute_node_group for Google Provider
maintenancePolicy: RESTART_IN_PLACE
maintenanceWindow:
startTime: 08:00
initialSize: 1
nodeTemplate: ${["soletenant-tmpl"].id}
autoscalingPolicy:
mode: ONLY_SCALE_OUT
minNodes: 1
maxNodes: 10
§Node Group Share Settings
resources:
guestProject:
type: gcp:organizations:Project
name: guest_project
properties:
projectId: project-id
name: project-name
orgId: '123456789'
deletionPolicy: DELETE
soletenant-tmpl:
type: gcp:compute:NodeTemplate
properties:
name: soletenant-tmpl
region: us-central1
nodeType: n1-node-96-624
nodes:
type: gcp:compute:NodeGroup
properties:
name: soletenant-group
zone: us-central1-f
description: example google_compute_node_group for Terraform Google Provider
initialSize: 1
nodeTemplate: ${["soletenant-tmpl"].id}
shareSettings:
shareType: SPECIFIC_PROJECTS
projectMaps:
- id: ${guestProject.projectId}
projectId: ${guestProject.projectId}
§Import
NodeGroup can be imported using any of these accepted formats:
-
projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}
-
{{project}}/{{zone}}/{{name}}
-
{{zone}}/{{name}}
-
{{name}}
When using the pulumi import
command, NodeGroup can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/nodeGroup:NodeGroup default projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}
$ pulumi import gcp:compute/nodeGroup:NodeGroup default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:compute/nodeGroup:NodeGroup default {{zone}}/{{name}}
$ pulumi import gcp:compute/nodeGroup:NodeGroup 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