Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.networkconnectivity.kotlin.SpokeArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.networkconnectivity.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkconnectivity.SpokeArgs.builder
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedInterconnectAttachmentsArgs
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedInterconnectAttachmentsArgsBuilder
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedRouterApplianceInstancesArgs
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedRouterApplianceInstancesArgsBuilder
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedVpcNetworkArgs
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedVpcNetworkArgsBuilder
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedVpnTunnelsArgs
import com.pulumi.gcp.networkconnectivity.kotlin.inputs.SpokeLinkedVpnTunnelsArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* The NetworkConnectivity Spoke resource
* To get more information about Spoke, see:
* * [API documentation](https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1beta/projects.locations.spokes)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/overview)
* ## Example Usage
* ### Network Connectivity Spoke Linked Vpc Network Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const network = new gcp.compute.Network("network", {
* name: "net",
* autoCreateSubnetworks: false,
* });
* const basicHub = new gcp.networkconnectivity.Hub("basic_hub", {
* name: "hub1",
* description: "A sample hub",
* labels: {
* "label-two": "value-one",
* },
* });
* const primary = new gcp.networkconnectivity.Spoke("primary", {
* name: "spoke1",
* location: "global",
* description: "A sample spoke with a linked router appliance instance",
* labels: {
* "label-one": "value-one",
* },
* hub: basicHub.id,
* linkedVpcNetwork: {
* excludeExportRanges: [
* "198.51.100.0/24",
* "10.10.0.0/16",
* ],
* uri: network.selfLink,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* network = gcp.compute.Network("network",
* name="net",
* auto_create_subnetworks=False)
* basic_hub = gcp.networkconnectivity.Hub("basic_hub",
* name="hub1",
* description="A sample hub",
* labels={
* "label-two": "value-one",
* })
* primary = gcp.networkconnectivity.Spoke("primary",
* name="spoke1",
* location="global",
* description="A sample spoke with a linked router appliance instance",
* labels={
* "label-one": "value-one",
* },
* hub=basic_hub.id,
* linked_vpc_network={
* "exclude_export_ranges": [
* "198.51.100.0/24",
* "10.10.0.0/16",
* ],
* "uri": network.self_link,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var network = new Gcp.Compute.Network("network", new()
* {
* Name = "net",
* AutoCreateSubnetworks = false,
* });
* var basicHub = new Gcp.NetworkConnectivity.Hub("basic_hub", new()
* {
* Name = "hub1",
* Description = "A sample hub",
* Labels =
* {
* { "label-two", "value-one" },
* },
* });
* var primary = new Gcp.NetworkConnectivity.Spoke("primary", new()
* {
* Name = "spoke1",
* Location = "global",
* Description = "A sample spoke with a linked router appliance instance",
* Labels =
* {
* { "label-one", "value-one" },
* },
* Hub = basicHub.Id,
* LinkedVpcNetwork = new Gcp.NetworkConnectivity.Inputs.SpokeLinkedVpcNetworkArgs
* {
* ExcludeExportRanges = new[]
* {
* "198.51.100.0/24",
* "10.10.0.0/16",
* },
* Uri = network.SelfLink,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
* Name: pulumi.String("net"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* basicHub, err := networkconnectivity.NewHub(ctx, "basic_hub", &networkconnectivity.HubArgs{
* Name: pulumi.String("hub1"),
* Description: pulumi.String("A sample hub"),
* Labels: pulumi.StringMap{
* "label-two": pulumi.String("value-one"),
* },
* })
* if err != nil {
* return err
* }
* _, err = networkconnectivity.NewSpoke(ctx, "primary", &networkconnectivity.SpokeArgs{
* Name: pulumi.String("spoke1"),
* Location: pulumi.String("global"),
* Description: pulumi.String("A sample spoke with a linked router appliance instance"),
* Labels: pulumi.StringMap{
* "label-one": pulumi.String("value-one"),
* },
* Hub: basicHub.ID(),
* LinkedVpcNetwork: &networkconnectivity.SpokeLinkedVpcNetworkArgs{
* ExcludeExportRanges: pulumi.StringArray{
* pulumi.String("198.51.100.0/24"),
* pulumi.String("10.10.0.0/16"),
* },
* Uri: network.SelfLink,
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.networkconnectivity.Hub;
* import com.pulumi.gcp.networkconnectivity.HubArgs;
* import com.pulumi.gcp.networkconnectivity.Spoke;
* import com.pulumi.gcp.networkconnectivity.SpokeArgs;
* import com.pulumi.gcp.networkconnectivity.inputs.SpokeLinkedVpcNetworkArgs;
* 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 network = new Network("network", NetworkArgs.builder()
* .name("net")
* .autoCreateSubnetworks(false)
* .build());
* var basicHub = new Hub("basicHub", HubArgs.builder()
* .name("hub1")
* .description("A sample hub")
* .labels(Map.of("label-two", "value-one"))
* .build());
* var primary = new Spoke("primary", SpokeArgs.builder()
* .name("spoke1")
* .location("global")
* .description("A sample spoke with a linked router appliance instance")
* .labels(Map.of("label-one", "value-one"))
* .hub(basicHub.id())
* .linkedVpcNetwork(SpokeLinkedVpcNetworkArgs.builder()
* .excludeExportRanges(
* "198.51.100.0/24",
* "10.10.0.0/16")
* .uri(network.selfLink())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* network:
* type: gcp:compute:Network
* properties:
* name: net
* autoCreateSubnetworks: false
* basicHub:
* type: gcp:networkconnectivity:Hub
* name: basic_hub
* properties:
* name: hub1
* description: A sample hub
* labels:
* label-two: value-one
* primary:
* type: gcp:networkconnectivity:Spoke
* properties:
* name: spoke1
* location: global
* description: A sample spoke with a linked router appliance instance
* labels:
* label-one: value-one
* hub: ${basicHub.id}
* linkedVpcNetwork:
* excludeExportRanges:
* - 198.51.100.0/24
* - 10.10.0.0/16
* uri: ${network.selfLink}
* ```
*
* ### Network Connectivity Spoke Router Appliance Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const network = new gcp.compute.Network("network", {
* name: "tf-test-network_2067",
* autoCreateSubnetworks: false,
* });
* const subnetwork = new gcp.compute.Subnetwork("subnetwork", {
* name: "tf-test-subnet_40785",
* ipCidrRange: "10.0.0.0/28",
* region: "us-central1",
* network: network.selfLink,
* });
* const instance = new gcp.compute.Instance("instance", {
* name: "tf-test-instance_79169",
* machineType: "e2-medium",
* canIpForward: true,
* zone: "us-central1-a",
* bootDisk: {
* initializeParams: {
* image: "projects/debian-cloud/global/images/debian-10-buster-v20210817",
* },
* },
* networkInterfaces: [{
* subnetwork: subnetwork.name,
* networkIp: "10.0.0.2",
* accessConfigs: [{
* networkTier: "PREMIUM",
* }],
* }],
* });
* const basicHub = new gcp.networkconnectivity.Hub("basic_hub", {
* name: "tf-test-hub_56529",
* description: "A sample hub",
* labels: {
* "label-two": "value-one",
* },
* });
* const primary = new gcp.networkconnectivity.Spoke("primary", {
* name: "tf-test-name_75413",
* location: "us-central1",
* description: "A sample spoke with a linked routher appliance instance",
* labels: {
* "label-one": "value-one",
* },
* hub: basicHub.id,
* linkedRouterApplianceInstances: {
* instances: [{
* virtualMachine: instance.selfLink,
* ipAddress: "10.0.0.2",
* }],
* siteToSiteDataTransfer: true,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* network = gcp.compute.Network("network",
* name="tf-test-network_2067",
* auto_create_subnetworks=False)
* subnetwork = gcp.compute.Subnetwork("subnetwork",
* name="tf-test-subnet_40785",
* ip_cidr_range="10.0.0.0/28",
* region="us-central1",
* network=network.self_link)
* instance = gcp.compute.Instance("instance",
* name="tf-test-instance_79169",
* machine_type="e2-medium",
* can_ip_forward=True,
* zone="us-central1-a",
* boot_disk={
* "initialize_params": {
* "image": "projects/debian-cloud/global/images/debian-10-buster-v20210817",
* },
* },
* network_interfaces=[{
* "subnetwork": subnetwork.name,
* "network_ip": "10.0.0.2",
* "access_configs": [{
* "network_tier": "PREMIUM",
* }],
* }])
* basic_hub = gcp.networkconnectivity.Hub("basic_hub",
* name="tf-test-hub_56529",
* description="A sample hub",
* labels={
* "label-two": "value-one",
* })
* primary = gcp.networkconnectivity.Spoke("primary",
* name="tf-test-name_75413",
* location="us-central1",
* description="A sample spoke with a linked routher appliance instance",
* labels={
* "label-one": "value-one",
* },
* hub=basic_hub.id,
* linked_router_appliance_instances={
* "instances": [{
* "virtual_machine": instance.self_link,
* "ip_address": "10.0.0.2",
* }],
* "site_to_site_data_transfer": True,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var network = new Gcp.Compute.Network("network", new()
* {
* Name = "tf-test-network_2067",
* AutoCreateSubnetworks = false,
* });
* var subnetwork = new Gcp.Compute.Subnetwork("subnetwork", new()
* {
* Name = "tf-test-subnet_40785",
* IpCidrRange = "10.0.0.0/28",
* Region = "us-central1",
* Network = network.SelfLink,
* });
* var instance = new Gcp.Compute.Instance("instance", new()
* {
* Name = "tf-test-instance_79169",
* MachineType = "e2-medium",
* CanIpForward = true,
* Zone = "us-central1-a",
* BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
* {
* InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
* {
* Image = "projects/debian-cloud/global/images/debian-10-buster-v20210817",
* },
* },
* NetworkInterfaces = new[]
* {
* new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
* {
* Subnetwork = subnetwork.Name,
* NetworkIp = "10.0.0.2",
* AccessConfigs = new[]
* {
* new Gcp.Compute.Inputs.InstanceNetworkInterfaceAccessConfigArgs
* {
* NetworkTier = "PREMIUM",
* },
* },
* },
* },
* });
* var basicHub = new Gcp.NetworkConnectivity.Hub("basic_hub", new()
* {
* Name = "tf-test-hub_56529",
* Description = "A sample hub",
* Labels =
* {
* { "label-two", "value-one" },
* },
* });
* var primary = new Gcp.NetworkConnectivity.Spoke("primary", new()
* {
* Name = "tf-test-name_75413",
* Location = "us-central1",
* Description = "A sample spoke with a linked routher appliance instance",
* Labels =
* {
* { "label-one", "value-one" },
* },
* Hub = basicHub.Id,
* LinkedRouterApplianceInstances = new Gcp.NetworkConnectivity.Inputs.SpokeLinkedRouterApplianceInstancesArgs
* {
* Instances = new[]
* {
* new Gcp.NetworkConnectivity.Inputs.SpokeLinkedRouterApplianceInstancesInstanceArgs
* {
* VirtualMachine = instance.SelfLink,
* IpAddress = "10.0.0.2",
* },
* },
* SiteToSiteDataTransfer = true,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
* Name: pulumi.String("tf-test-network_2067"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* subnetwork, err := compute.NewSubnetwork(ctx, "subnetwork", &compute.SubnetworkArgs{
* Name: pulumi.String("tf-test-subnet_40785"),
* IpCidrRange: pulumi.String("10.0.0.0/28"),
* Region: pulumi.String("us-central1"),
* Network: network.SelfLink,
* })
* if err != nil {
* return err
* }
* instance, err := compute.NewInstance(ctx, "instance", &compute.InstanceArgs{
* Name: pulumi.String("tf-test-instance_79169"),
* MachineType: pulumi.String("e2-medium"),
* CanIpForward: pulumi.Bool(true),
* Zone: pulumi.String("us-central1-a"),
* BootDisk: &compute.InstanceBootDiskArgs{
* InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
* Image: pulumi.String("projects/debian-cloud/global/images/debian-10-buster-v20210817"),
* },
* },
* NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
* &compute.InstanceNetworkInterfaceArgs{
* Subnetwork: subnetwork.Name,
* NetworkIp: pulumi.String("10.0.0.2"),
* AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
* &compute.InstanceNetworkInterfaceAccessConfigArgs{
* NetworkTier: pulumi.String("PREMIUM"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* basicHub, err := networkconnectivity.NewHub(ctx, "basic_hub", &networkconnectivity.HubArgs{
* Name: pulumi.String("tf-test-hub_56529"),
* Description: pulumi.String("A sample hub"),
* Labels: pulumi.StringMap{
* "label-two": pulumi.String("value-one"),
* },
* })
* if err != nil {
* return err
* }
* _, err = networkconnectivity.NewSpoke(ctx, "primary", &networkconnectivity.SpokeArgs{
* Name: pulumi.String("tf-test-name_75413"),
* Location: pulumi.String("us-central1"),
* Description: pulumi.String("A sample spoke with a linked routher appliance instance"),
* Labels: pulumi.StringMap{
* "label-one": pulumi.String("value-one"),
* },
* Hub: basicHub.ID(),
* LinkedRouterApplianceInstances: &networkconnectivity.SpokeLinkedRouterApplianceInstancesArgs{
* Instances: networkconnectivity.SpokeLinkedRouterApplianceInstancesInstanceArray{
* &networkconnectivity.SpokeLinkedRouterApplianceInstancesInstanceArgs{
* VirtualMachine: instance.SelfLink,
* IpAddress: pulumi.String("10.0.0.2"),
* },
* },
* SiteToSiteDataTransfer: pulumi.Bool(true),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.Subnetwork;
* import com.pulumi.gcp.compute.SubnetworkArgs;
* import com.pulumi.gcp.compute.Instance;
* import com.pulumi.gcp.compute.InstanceArgs;
* import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
* import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
* import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
* import com.pulumi.gcp.networkconnectivity.Hub;
* import com.pulumi.gcp.networkconnectivity.HubArgs;
* import com.pulumi.gcp.networkconnectivity.Spoke;
* import com.pulumi.gcp.networkconnectivity.SpokeArgs;
* import com.pulumi.gcp.networkconnectivity.inputs.SpokeLinkedRouterApplianceInstancesArgs;
* 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 network = new Network("network", NetworkArgs.builder()
* .name("tf-test-network_2067")
* .autoCreateSubnetworks(false)
* .build());
* var subnetwork = new Subnetwork("subnetwork", SubnetworkArgs.builder()
* .name("tf-test-subnet_40785")
* .ipCidrRange("10.0.0.0/28")
* .region("us-central1")
* .network(network.selfLink())
* .build());
* var instance = new Instance("instance", InstanceArgs.builder()
* .name("tf-test-instance_79169")
* .machineType("e2-medium")
* .canIpForward(true)
* .zone("us-central1-a")
* .bootDisk(InstanceBootDiskArgs.builder()
* .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
* .image("projects/debian-cloud/global/images/debian-10-buster-v20210817")
* .build())
* .build())
* .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
* .subnetwork(subnetwork.name())
* .networkIp("10.0.0.2")
* .accessConfigs(InstanceNetworkInterfaceAccessConfigArgs.builder()
* .networkTier("PREMIUM")
* .build())
* .build())
* .build());
* var basicHub = new Hub("basicHub", HubArgs.builder()
* .name("tf-test-hub_56529")
* .description("A sample hub")
* .labels(Map.of("label-two", "value-one"))
* .build());
* var primary = new Spoke("primary", SpokeArgs.builder()
* .name("tf-test-name_75413")
* .location("us-central1")
* .description("A sample spoke with a linked routher appliance instance")
* .labels(Map.of("label-one", "value-one"))
* .hub(basicHub.id())
* .linkedRouterApplianceInstances(SpokeLinkedRouterApplianceInstancesArgs.builder()
* .instances(SpokeLinkedRouterApplianceInstancesInstanceArgs.builder()
* .virtualMachine(instance.selfLink())
* .ipAddress("10.0.0.2")
* .build())
* .siteToSiteDataTransfer(true)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* network:
* type: gcp:compute:Network
* properties:
* name: tf-test-network_2067
* autoCreateSubnetworks: false
* subnetwork:
* type: gcp:compute:Subnetwork
* properties:
* name: tf-test-subnet_40785
* ipCidrRange: 10.0.0.0/28
* region: us-central1
* network: ${network.selfLink}
* instance:
* type: gcp:compute:Instance
* properties:
* name: tf-test-instance_79169
* machineType: e2-medium
* canIpForward: true
* zone: us-central1-a
* bootDisk:
* initializeParams:
* image: projects/debian-cloud/global/images/debian-10-buster-v20210817
* networkInterfaces:
* - subnetwork: ${subnetwork.name}
* networkIp: 10.0.0.2
* accessConfigs:
* - networkTier: PREMIUM
* basicHub:
* type: gcp:networkconnectivity:Hub
* name: basic_hub
* properties:
* name: tf-test-hub_56529
* description: A sample hub
* labels:
* label-two: value-one
* primary:
* type: gcp:networkconnectivity:Spoke
* properties:
* name: tf-test-name_75413
* location: us-central1
* description: A sample spoke with a linked routher appliance instance
* labels:
* label-one: value-one
* hub: ${basicHub.id}
* linkedRouterApplianceInstances:
* instances:
* - virtualMachine: ${instance.selfLink}
* ipAddress: 10.0.0.2
* siteToSiteDataTransfer: true
* ```
*
* ## Import
* Spoke can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/spokes/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, Spoke can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:networkconnectivity/spoke:Spoke default projects/{{project}}/locations/{{location}}/spokes/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkconnectivity/spoke:Spoke default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkconnectivity/spoke:Spoke default {{location}}/{{name}}
* ```
* @property description An optional description of the spoke.
* @property hub Immutable. The URI of the hub that this spoke is attached to.
* @property labels Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
* **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.
* @property linkedInterconnectAttachments A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.
* Structure is documented below.
* @property linkedRouterApplianceInstances The URIs of linked Router appliance resources
* Structure is documented below.
* @property linkedVpcNetwork VPC network that is associated with the spoke.
* Structure is documented below.
* @property linkedVpnTunnels The URIs of linked VPN tunnel resources
* Structure is documented below.
* @property location The location for the resource
* - - -
* @property name Immutable. The name of the spoke. Spoke names must be unique.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class SpokeArgs(
public val description: Output? = null,
public val hub: Output? = null,
public val labels: Output>? = null,
public val linkedInterconnectAttachments: Output? = null,
public val linkedRouterApplianceInstances: Output? =
null,
public val linkedVpcNetwork: Output? = null,
public val linkedVpnTunnels: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.networkconnectivity.SpokeArgs =
com.pulumi.gcp.networkconnectivity.SpokeArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.hub(hub?.applyValue({ args0 -> args0 }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.linkedInterconnectAttachments(
linkedInterconnectAttachments?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.linkedRouterApplianceInstances(
linkedRouterApplianceInstances?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
)
.linkedVpcNetwork(linkedVpcNetwork?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.linkedVpnTunnels(linkedVpnTunnels?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SpokeArgs].
*/
@PulumiTagMarker
public class SpokeArgsBuilder internal constructor() {
private var description: Output? = null
private var hub: Output? = null
private var labels: Output>? = null
private var linkedInterconnectAttachments: Output? = null
private var linkedRouterApplianceInstances: Output? =
null
private var linkedVpcNetwork: Output? = null
private var linkedVpnTunnels: Output? = null
private var location: Output? = null
private var name: Output? = null
private var project: Output? = null
/**
* @param value An optional description of the spoke.
*/
@JvmName("qpkuwktsbpqldwoo")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Immutable. The URI of the hub that this spoke is attached to.
*/
@JvmName("yqjxinrbeaxdcenb")
public suspend fun hub(`value`: Output) {
this.hub = value
}
/**
* @param value Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
* **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.
*/
@JvmName("grenohfgvfphkkfv")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.
* Structure is documented below.
*/
@JvmName("wjrsvjdtdqesfuyv")
public suspend fun linkedInterconnectAttachments(`value`: Output) {
this.linkedInterconnectAttachments = value
}
/**
* @param value The URIs of linked Router appliance resources
* Structure is documented below.
*/
@JvmName("vntxujcahnygrxhn")
public suspend fun linkedRouterApplianceInstances(`value`: Output) {
this.linkedRouterApplianceInstances = value
}
/**
* @param value VPC network that is associated with the spoke.
* Structure is documented below.
*/
@JvmName("fnuqghepuhhrknft")
public suspend fun linkedVpcNetwork(`value`: Output) {
this.linkedVpcNetwork = value
}
/**
* @param value The URIs of linked VPN tunnel resources
* Structure is documented below.
*/
@JvmName("ilqrlbtnpmqejfti")
public suspend fun linkedVpnTunnels(`value`: Output) {
this.linkedVpnTunnels = value
}
/**
* @param value The location for the resource
* - - -
*/
@JvmName("direvrmkkaitmtil")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Immutable. The name of the spoke. Spoke names must be unique.
*/
@JvmName("rofmbywpsfqgtukd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rmklekogjyyawvni")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value An optional description of the spoke.
*/
@JvmName("ttagqrgeptbrcqsp")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Immutable. The URI of the hub that this spoke is attached to.
*/
@JvmName("vtomxeswasjpupmu")
public suspend fun hub(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hub = mapped
}
/**
* @param value Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
* **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.
*/
@JvmName("ypgcaockumovxglx")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
* **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.
*/
@JvmName("krnfdqfkxcejicei")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.
* Structure is documented below.
*/
@JvmName("swawvntbtclfgcsq")
public suspend fun linkedInterconnectAttachments(`value`: SpokeLinkedInterconnectAttachmentsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.linkedInterconnectAttachments = mapped
}
/**
* @param argument A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.
* Structure is documented below.
*/
@JvmName("kyuwqhmirjkwmnfl")
public suspend fun linkedInterconnectAttachments(argument: suspend SpokeLinkedInterconnectAttachmentsArgsBuilder.() -> Unit) {
val toBeMapped = SpokeLinkedInterconnectAttachmentsArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.linkedInterconnectAttachments = mapped
}
/**
* @param value The URIs of linked Router appliance resources
* Structure is documented below.
*/
@JvmName("dbormoeuveiwkudf")
public suspend fun linkedRouterApplianceInstances(`value`: SpokeLinkedRouterApplianceInstancesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.linkedRouterApplianceInstances = mapped
}
/**
* @param argument The URIs of linked Router appliance resources
* Structure is documented below.
*/
@JvmName("cyskuboxxyfhpxtm")
public suspend fun linkedRouterApplianceInstances(argument: suspend SpokeLinkedRouterApplianceInstancesArgsBuilder.() -> Unit) {
val toBeMapped = SpokeLinkedRouterApplianceInstancesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.linkedRouterApplianceInstances = mapped
}
/**
* @param value VPC network that is associated with the spoke.
* Structure is documented below.
*/
@JvmName("edctceikbarpguos")
public suspend fun linkedVpcNetwork(`value`: SpokeLinkedVpcNetworkArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.linkedVpcNetwork = mapped
}
/**
* @param argument VPC network that is associated with the spoke.
* Structure is documented below.
*/
@JvmName("jyqfmfspbyrxjbgr")
public suspend fun linkedVpcNetwork(argument: suspend SpokeLinkedVpcNetworkArgsBuilder.() -> Unit) {
val toBeMapped = SpokeLinkedVpcNetworkArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.linkedVpcNetwork = mapped
}
/**
* @param value The URIs of linked VPN tunnel resources
* Structure is documented below.
*/
@JvmName("qoytqwdsbqkqtfho")
public suspend fun linkedVpnTunnels(`value`: SpokeLinkedVpnTunnelsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.linkedVpnTunnels = mapped
}
/**
* @param argument The URIs of linked VPN tunnel resources
* Structure is documented below.
*/
@JvmName("cewlsnqilobyrxpt")
public suspend fun linkedVpnTunnels(argument: suspend SpokeLinkedVpnTunnelsArgsBuilder.() -> Unit) {
val toBeMapped = SpokeLinkedVpnTunnelsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.linkedVpnTunnels = mapped
}
/**
* @param value The location for the resource
* - - -
*/
@JvmName("nmntkvjochwmviol")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Immutable. The name of the spoke. Spoke names must be unique.
*/
@JvmName("odeurgprgjqrrxok")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rphdhggfhudgvpxd")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): SpokeArgs = SpokeArgs(
description = description,
hub = hub,
labels = labels,
linkedInterconnectAttachments = linkedInterconnectAttachments,
linkedRouterApplianceInstances = linkedRouterApplianceInstances,
linkedVpcNetwork = linkedVpcNetwork,
linkedVpnTunnels = linkedVpnTunnels,
location = location,
name = name,
project = project,
)
}