Hub Args
data class HubArgs(val description: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val name: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<HubArgs>
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());
}
}Content copied to clipboard
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 exampleContent copied to clipboard
$ pulumi import gcp:networkconnectivity/hub:Hub default projects/{{project}}/locations/global/hubs/{{name}}Content copied to clipboard
$ pulumi import gcp:networkconnectivity/hub:Hub default {{project}}/{{name}}Content copied to clipboard
$ pulumi import gcp:networkconnectivity/hub:Hub default {{name}}Content copied to clipboard
Constructors
Functions
Properties
Link copied to clipboard
Link copied to clipboard
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.