terraform-provider-google/website/docs/r/compute_node_group.html.markdown
The Magician 4d9f0a456d Add new line before project doc bullet (#3645)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-05-17 09:58:48 -07:00

4.0 KiB

layout page_title sidebar_current description
google Google: google_compute_node_group docs-google-compute-node-group 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:

~> 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.

## Example Usage - Node Group Basic
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 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.