Hub
The NetworkConnectivity Hub resource
Example Usage
Basic_hub
A basic test of a networkconnectivity hub
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkconnectivity.Hub;
import com.pulumi.gcp.networkconnectivity.HubArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Hub("primary", HubArgs.builder()
.description("A sample hub")
.labels(Map.of("label-one", "value-one"))
.project("my-project-name")
.build());
}
}Import
Hub can be imported using any of these accepted formats* projects/{{project}}/locations/global/hubs/{{name}} * {{project}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import Hub using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/global/hubs/{{name}}" to = google_network_connectivity_hub.default }
$ pulumi import gcp:networkconnectivity/hub:Hub When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Hub can be imported using one of the formats above. For example$ pulumi import gcp:networkconnectivity/hub:Hub default projects/{{project}}/locations/global/hubs/{{name}}$ pulumi import gcp:networkconnectivity/hub:Hub default {{project}}/{{name}}$ pulumi import gcp:networkconnectivity/hub:Hub default {{name}}Properties
Optional labels in key:value format. For more information about labels, see Requirements for labels. 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.
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.