google_network_connectivity_hub

The NetworkConnectivity Hub resource

Example Usage - basic_hub

A basic test of a networkconnectivity hub

resource "google_network_connectivity_hub" "primary" {
  name        = "hub"
  description = "A sample hub"
  project     = "my-project-name"

  labels = {
    label-one = "value-one"
  }
}

Argument Reference

The following arguments are supported:


Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

Attributes Reference

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

Timeouts

This resource provides the following Timeouts configuration options:

Import

Hub can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Hub using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/global/hubs/{{name}}"
  to = google_network_connectivity_hub.default
}

When using the terraform import command, Hub can be imported using one of the formats above. For example:

$ 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}}