mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-05 02:01:05 +00:00
78ef2f545b
Signed-off-by: Modular Magician <magic-modules@google.com>
130 lines
4.0 KiB
Markdown
130 lines
4.0 KiB
Markdown
---
|
|
# ----------------------------------------------------------------------------
|
|
#
|
|
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
#
|
|
# This file is automatically generated by Magic Modules and manual
|
|
# changes will be clobbered when the file is regenerated.
|
|
#
|
|
# Please read more about how to change this file in
|
|
# .github/CONTRIBUTING.md.
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
layout: "google"
|
|
page_title: "Google: google_compute_node_group"
|
|
sidebar_current: "docs-google-compute-node-group"
|
|
description: |-
|
|
Represents a NodeGroup resource to manage a group of sole-tenant nodes.
|
|
---
|
|
|
|
# google\_compute\_node\_group
|
|
|
|
Represents a NodeGroup resource to manage a group of sole-tenant nodes.
|
|
|
|
|
|
To get more information about NodeGroup, see:
|
|
|
|
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
|
|
* How-to Guides
|
|
* [Sole-Tenant Nodes](https://cloud.google.com/compute/docs/nodes/)
|
|
|
|
~> **Warning:** Due to limitations of the API, Terraform cannot update the
|
|
number of nodes in a node group and changes to node group size either
|
|
through Terraform config or through external changes will cause
|
|
Terraform to delete and recreate the node group.
|
|
|
|
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
|
|
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=node_group_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
|
|
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
|
|
</a>
|
|
</div>
|
|
## Example Usage - Node Group Basic
|
|
|
|
|
|
```hcl
|
|
data "google_compute_node_types" "central1a" {
|
|
zone = "us-central1-a"
|
|
}
|
|
|
|
resource "google_compute_node_template" "soletenant-tmpl" {
|
|
name = "soletenant-tmpl"
|
|
region = "us-central1"
|
|
node_type = "${data.google_compute_node_types.central1a.names[0]}"
|
|
}
|
|
|
|
resource "google_compute_node_group" "nodes" {
|
|
name = "soletenant-group"
|
|
zone = "us-central1-a"
|
|
description = "example google_compute_node_group for Terraform Google Provider"
|
|
|
|
size = 1
|
|
node_template = "${google_compute_node_template.soletenant-tmpl.self_link}"
|
|
}
|
|
```
|
|
|
|
## Argument Reference
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
* `node_template` -
|
|
(Required)
|
|
The URL of the node template to which this node group belongs.
|
|
|
|
* `size` -
|
|
(Required)
|
|
The total number of nodes in the node group.
|
|
|
|
|
|
- - -
|
|
|
|
|
|
* `description` -
|
|
(Optional)
|
|
An optional textual description of the resource.
|
|
|
|
* `name` -
|
|
(Optional)
|
|
Name of the resource.
|
|
|
|
* `zone` -
|
|
(Optional)
|
|
Zone where this node group is located
|
|
* `project` - (Optional) The ID of the project in which the resource belongs.
|
|
If it is not provided, the provider project is used.
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
In addition to the arguments listed above, the following computed attributes are exported:
|
|
|
|
|
|
* `creation_timestamp` -
|
|
Creation timestamp in RFC3339 text format.
|
|
* `self_link` - The URI of the created resource.
|
|
|
|
|
|
## Timeouts
|
|
|
|
This resource provides the following
|
|
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
|
|
|
|
- `create` - Default is 4 minutes.
|
|
- `update` - Default is 4 minutes.
|
|
- `delete` - Default is 4 minutes.
|
|
|
|
## Import
|
|
|
|
NodeGroup can be imported using any of these accepted formats:
|
|
|
|
```
|
|
$ terraform import google_compute_node_group.default projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}
|
|
$ terraform import google_compute_node_group.default {{project}}/{{zone}}/{{name}}
|
|
$ terraform import google_compute_node_group.default {{name}}
|
|
```
|
|
|
|
-> If you're importing a resource with beta features, make sure to include `-provider=google-beta`
|
|
as an argument so that Terraform uses the correct provider to import your resource.
|