Skip to content

googleComputeNodeTypes

Provides available node types for Compute Engine sole-tenant nodes in a zone for a given project. For more information, see the official documentation and API.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.computeNodeTemplate.ComputeNodeTemplate(this, "tmpl", {
  name: "terraform-test-tmpl",
  node_type: "${data.google_compute_node_types.types.names[0]}",
  region: "us-central1",
});
new google.dataGoogleComputeNodeTypes.DataGoogleComputeNodeTypes(
  this,
  "central1b",
  {
    zone: "us-central1-b",
  }
);

Argument Reference

The following arguments are supported:

  • zone (Optional) - The zone to list node types for. Should be in zone of intended node groups and region of referencing node template. If zone is not specified, the provider-level zone must be set and is used instead.

  • project (Optional) - ID of the project to list available node types for. Should match the project the nodes of this type will be deployed to. Defaults to the project that the provider is authenticated with.

Attributes Reference

The following attributes are exported:

  • names - A list of node types available in the given zone and project.