Skip to content

googleNetworkConnectivityHub

The NetworkConnectivity Hub resource

Example Usage - basic_hub

A basic test of a networkconnectivity hub

/*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.networkConnectivityHub.NetworkConnectivityHub(this, "primary", {
  description: "A sample hub",
  labels: [
    {
      "label-one": "value-one",
    },
  ],
  name: "hub",
  project: "my-project-name",
});

Argument Reference

The following arguments are supported:

  • name - (Required) Immutable. The name of the hub. Hub names must be unique. They use the following form: projects/{projectNumber}/locations/global/hubs/{hubId}

  • description - (Optional) An optional description of the hub.

  • labels - (Optional) Optional labels in key:value format. For more information about labels, see Requirements for labels.

  • project - (Optional) The project for the resource

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/global/hubs/{{name}}

  • createTime - Output only. The time the hub was created.

  • routingVpcs - The VPC network associated with this hub's spokes. All of the VPN tunnels, VLAN attachments, and router appliance instances referenced by this hub's spokes must belong to this VPC network. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub.

  • state - Output only. The current lifecycle state of this hub. Possible values: STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING

  • uniqueId - Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id.

  • updateTime - Output only. The time the hub was last updated.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Hub can be imported using any of these accepted formats:

$ terraform import google_network_connectivity_hub.default projects/{{project}}/locations/global/hubs/{{name}}
$ terraform import google_network_connectivity_hub.default {{project}}/{{name}}
$ terraform import google_network_connectivity_hub.default {{name}}