All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.compute.kotlin.InterconnectAttachmentArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.InterconnectAttachmentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Represents an InterconnectAttachment (VLAN attachment) resource. For more
 * information, see Creating VLAN Attachments.
 * ## Example Usage
 * ### Interconnect Attachment Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const foobarNetwork = new gcp.compute.Network("foobar", {
 *     name: "network-1",
 *     autoCreateSubnetworks: false,
 * });
 * const foobar = new gcp.compute.Router("foobar", {
 *     name: "router-1",
 *     network: foobarNetwork.name,
 *     bgp: {
 *         asn: 16550,
 *     },
 * });
 * const onPrem = new gcp.compute.InterconnectAttachment("on_prem", {
 *     name: "on-prem-attachment",
 *     edgeAvailabilityDomain: "AVAILABILITY_DOMAIN_1",
 *     type: "PARTNER",
 *     router: foobar.id,
 *     mtu: "1500",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * foobar_network = gcp.compute.Network("foobar",
 *     name="network-1",
 *     auto_create_subnetworks=False)
 * foobar = gcp.compute.Router("foobar",
 *     name="router-1",
 *     network=foobar_network.name,
 *     bgp=gcp.compute.RouterBgpArgs(
 *         asn=16550,
 *     ))
 * on_prem = gcp.compute.InterconnectAttachment("on_prem",
 *     name="on-prem-attachment",
 *     edge_availability_domain="AVAILABILITY_DOMAIN_1",
 *     type="PARTNER",
 *     router=foobar.id,
 *     mtu="1500")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foobarNetwork = new Gcp.Compute.Network("foobar", new()
 *     {
 *         Name = "network-1",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var foobar = new Gcp.Compute.Router("foobar", new()
 *     {
 *         Name = "router-1",
 *         Network = foobarNetwork.Name,
 *         Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
 *         {
 *             Asn = 16550,
 *         },
 *     });
 *     var onPrem = new Gcp.Compute.InterconnectAttachment("on_prem", new()
 *     {
 *         Name = "on-prem-attachment",
 *         EdgeAvailabilityDomain = "AVAILABILITY_DOMAIN_1",
 *         Type = "PARTNER",
 *         Router = foobar.Id,
 *         Mtu = "1500",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		foobarNetwork, err := compute.NewNetwork(ctx, "foobar", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("network-1"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		foobar, err := compute.NewRouter(ctx, "foobar", &compute.RouterArgs{
 * 			Name:    pulumi.String("router-1"),
 * 			Network: foobarNetwork.Name,
 * 			Bgp: &compute.RouterBgpArgs{
 * 				Asn: pulumi.Int(16550),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewInterconnectAttachment(ctx, "on_prem", &compute.InterconnectAttachmentArgs{
 * 			Name:                   pulumi.String("on-prem-attachment"),
 * 			EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_1"),
 * 			Type:                   pulumi.String("PARTNER"),
 * 			Router:                 foobar.ID(),
 * 			Mtu:                    pulumi.String("1500"),
 * 		})
 * 		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.Router;
 * import com.pulumi.gcp.compute.RouterArgs;
 * import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
 * import com.pulumi.gcp.compute.InterconnectAttachment;
 * import com.pulumi.gcp.compute.InterconnectAttachmentArgs;
 * 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 foobarNetwork = new Network("foobarNetwork", NetworkArgs.builder()
 *             .name("network-1")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var foobar = new Router("foobar", RouterArgs.builder()
 *             .name("router-1")
 *             .network(foobarNetwork.name())
 *             .bgp(RouterBgpArgs.builder()
 *                 .asn(16550)
 *                 .build())
 *             .build());
 *         var onPrem = new InterconnectAttachment("onPrem", InterconnectAttachmentArgs.builder()
 *             .name("on-prem-attachment")
 *             .edgeAvailabilityDomain("AVAILABILITY_DOMAIN_1")
 *             .type("PARTNER")
 *             .router(foobar.id())
 *             .mtu(1500)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   onPrem:
 *     type: gcp:compute:InterconnectAttachment
 *     name: on_prem
 *     properties:
 *       name: on-prem-attachment
 *       edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
 *       type: PARTNER
 *       router: ${foobar.id}
 *       mtu: 1500
 *   foobar:
 *     type: gcp:compute:Router
 *     properties:
 *       name: router-1
 *       network: ${foobarNetwork.name}
 *       bgp:
 *         asn: 16550
 *   foobarNetwork:
 *     type: gcp:compute:Network
 *     name: foobar
 *     properties:
 *       name: network-1
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ### Compute Interconnect Attachment Ipsec Encryption
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const network = new gcp.compute.Network("network", {
 *     name: "test-network",
 *     autoCreateSubnetworks: false,
 * });
 * const address = new gcp.compute.Address("address", {
 *     name: "test-address",
 *     addressType: "INTERNAL",
 *     purpose: "IPSEC_INTERCONNECT",
 *     address: "192.168.1.0",
 *     prefixLength: 29,
 *     network: network.selfLink,
 * });
 * const router = new gcp.compute.Router("router", {
 *     name: "test-router",
 *     network: network.name,
 *     encryptedInterconnectRouter: true,
 *     bgp: {
 *         asn: 16550,
 *     },
 * });
 * const ipsec_encrypted_interconnect_attachment = new gcp.compute.InterconnectAttachment("ipsec-encrypted-interconnect-attachment", {
 *     name: "test-interconnect-attachment",
 *     edgeAvailabilityDomain: "AVAILABILITY_DOMAIN_1",
 *     type: "PARTNER",
 *     router: router.id,
 *     encryption: "IPSEC",
 *     ipsecInternalAddresses: [address.selfLink],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * network = gcp.compute.Network("network",
 *     name="test-network",
 *     auto_create_subnetworks=False)
 * address = gcp.compute.Address("address",
 *     name="test-address",
 *     address_type="INTERNAL",
 *     purpose="IPSEC_INTERCONNECT",
 *     address="192.168.1.0",
 *     prefix_length=29,
 *     network=network.self_link)
 * router = gcp.compute.Router("router",
 *     name="test-router",
 *     network=network.name,
 *     encrypted_interconnect_router=True,
 *     bgp=gcp.compute.RouterBgpArgs(
 *         asn=16550,
 *     ))
 * ipsec_encrypted_interconnect_attachment = gcp.compute.InterconnectAttachment("ipsec-encrypted-interconnect-attachment",
 *     name="test-interconnect-attachment",
 *     edge_availability_domain="AVAILABILITY_DOMAIN_1",
 *     type="PARTNER",
 *     router=router.id,
 *     encryption="IPSEC",
 *     ipsec_internal_addresses=[address.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 = "test-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var address = new Gcp.Compute.Address("address", new()
 *     {
 *         Name = "test-address",
 *         AddressType = "INTERNAL",
 *         Purpose = "IPSEC_INTERCONNECT",
 *         IPAddress = "192.168.1.0",
 *         PrefixLength = 29,
 *         Network = network.SelfLink,
 *     });
 *     var router = new Gcp.Compute.Router("router", new()
 *     {
 *         Name = "test-router",
 *         Network = network.Name,
 *         EncryptedInterconnectRouter = true,
 *         Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
 *         {
 *             Asn = 16550,
 *         },
 *     });
 *     var ipsec_encrypted_interconnect_attachment = new Gcp.Compute.InterconnectAttachment("ipsec-encrypted-interconnect-attachment", new()
 *     {
 *         Name = "test-interconnect-attachment",
 *         EdgeAvailabilityDomain = "AVAILABILITY_DOMAIN_1",
 *         Type = "PARTNER",
 *         Router = router.Id,
 *         Encryption = "IPSEC",
 *         IpsecInternalAddresses = new[]
 *         {
 *             address.SelfLink,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"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("test-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		address, err := compute.NewAddress(ctx, "address", &compute.AddressArgs{
 * 			Name:         pulumi.String("test-address"),
 * 			AddressType:  pulumi.String("INTERNAL"),
 * 			Purpose:      pulumi.String("IPSEC_INTERCONNECT"),
 * 			Address:      pulumi.String("192.168.1.0"),
 * 			PrefixLength: pulumi.Int(29),
 * 			Network:      network.SelfLink,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		router, err := compute.NewRouter(ctx, "router", &compute.RouterArgs{
 * 			Name:                        pulumi.String("test-router"),
 * 			Network:                     network.Name,
 * 			EncryptedInterconnectRouter: pulumi.Bool(true),
 * 			Bgp: &compute.RouterBgpArgs{
 * 				Asn: pulumi.Int(16550),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewInterconnectAttachment(ctx, "ipsec-encrypted-interconnect-attachment", &compute.InterconnectAttachmentArgs{
 * 			Name:                   pulumi.String("test-interconnect-attachment"),
 * 			EdgeAvailabilityDomain: pulumi.String("AVAILABILITY_DOMAIN_1"),
 * 			Type:                   pulumi.String("PARTNER"),
 * 			Router:                 router.ID(),
 * 			Encryption:             pulumi.String("IPSEC"),
 * 			IpsecInternalAddresses: pulumi.StringArray{
 * 				address.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.compute.Address;
 * import com.pulumi.gcp.compute.AddressArgs;
 * import com.pulumi.gcp.compute.Router;
 * import com.pulumi.gcp.compute.RouterArgs;
 * import com.pulumi.gcp.compute.inputs.RouterBgpArgs;
 * import com.pulumi.gcp.compute.InterconnectAttachment;
 * import com.pulumi.gcp.compute.InterconnectAttachmentArgs;
 * 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("test-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var address = new Address("address", AddressArgs.builder()
 *             .name("test-address")
 *             .addressType("INTERNAL")
 *             .purpose("IPSEC_INTERCONNECT")
 *             .address("192.168.1.0")
 *             .prefixLength(29)
 *             .network(network.selfLink())
 *             .build());
 *         var router = new Router("router", RouterArgs.builder()
 *             .name("test-router")
 *             .network(network.name())
 *             .encryptedInterconnectRouter(true)
 *             .bgp(RouterBgpArgs.builder()
 *                 .asn(16550)
 *                 .build())
 *             .build());
 *         var ipsec_encrypted_interconnect_attachment = new InterconnectAttachment("ipsec-encrypted-interconnect-attachment", InterconnectAttachmentArgs.builder()
 *             .name("test-interconnect-attachment")
 *             .edgeAvailabilityDomain("AVAILABILITY_DOMAIN_1")
 *             .type("PARTNER")
 *             .router(router.id())
 *             .encryption("IPSEC")
 *             .ipsecInternalAddresses(address.selfLink())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   ipsec-encrypted-interconnect-attachment:
 *     type: gcp:compute:InterconnectAttachment
 *     properties:
 *       name: test-interconnect-attachment
 *       edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
 *       type: PARTNER
 *       router: ${router.id}
 *       encryption: IPSEC
 *       ipsecInternalAddresses:
 *         - ${address.selfLink}
 *   address:
 *     type: gcp:compute:Address
 *     properties:
 *       name: test-address
 *       addressType: INTERNAL
 *       purpose: IPSEC_INTERCONNECT
 *       address: 192.168.1.0
 *       prefixLength: 29
 *       network: ${network.selfLink}
 *   router:
 *     type: gcp:compute:Router
 *     properties:
 *       name: test-router
 *       network: ${network.name}
 *       encryptedInterconnectRouter: true
 *       bgp:
 *         asn: 16550
 *   network:
 *     type: gcp:compute:Network
 *     properties:
 *       name: test-network
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ## Import
 * InterconnectAttachment can be imported using any of these accepted formats:
 * * `projects/{{project}}/regions/{{region}}/interconnectAttachments/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, InterconnectAttachment can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default projects/{{project}}/regions/{{region}}/interconnectAttachments/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/interconnectAttachment:InterconnectAttachment default {{name}}
 * ```
 * @property adminEnabled Whether the VLAN attachment is enabled or disabled.  When using
 * PARTNER type this will Pre-Activate the interconnect attachment
 * @property bandwidth Provisioned bandwidth capacity for the interconnect attachment.
 * For attachments of type DEDICATED, the user can set the bandwidth.
 * For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
 * Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
 * Defaults to BPS_10G
 * Possible values are: `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, `BPS_50G`.
 * @property candidateSubnets Up to 16 candidate prefixes that can be used to restrict the allocation
 * of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
 * All prefixes must be within link-local address space (169.254.0.0/16)
 * and must be /29 or shorter (/28, /27, etc). Google will attempt to select
 * an unused /29 from the supplied candidate prefix(es). The request will
 * fail if all possible /29s are in use on Google's edge. If not supplied,
 * Google will randomly select an unused /29 from all of link-local space.
 * @property description An optional description of this resource.
 * @property edgeAvailabilityDomain Desired availability domain for the attachment. Only available for type
 * PARTNER, at creation time. For improved reliability, customers should
 * configure a pair of attachments with one per availability domain. The
 * selected availability domain will be provided to the Partner via the
 * pairing key so that the provisioned circuit will lie in the specified
 * domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
 * @property encryption Indicates the user-supplied encryption option of this interconnect
 * attachment. Can only be specified at attachment creation for PARTNER or
 * DEDICATED attachments.
 * * NONE - This is the default value, which means that the VLAN attachment
 * carries unencrypted traffic. VMs are able to send traffic to, or receive
 * traffic from, such a VLAN attachment.
 * * IPSEC - The VLAN attachment carries only encrypted traffic that is
 * encrypted by an IPsec device, such as an HA VPN gateway or third-party
 * IPsec VPN. VMs cannot directly send traffic to, or receive traffic from,
 * such a VLAN attachment. To use HA VPN over Cloud Interconnect, the VLAN
 * attachment must be created with this option.
 * Default value is `NONE`.
 * Possible values are: `NONE`, `IPSEC`.
 * @property interconnect URL of the underlying Interconnect object that this attachment's
 * traffic will traverse through. Required if type is DEDICATED, must not
 * be set if type is PARTNER.
 * @property ipsecInternalAddresses URL of addresses that have been reserved for the interconnect attachment,
 * Used only for interconnect attachment that has the encryption option as
 * IPSEC.
 * The addresses must be RFC 1918 IP address ranges. When creating HA VPN
 * gateway over the interconnect attachment, if the attachment is configured
 * to use an RFC 1918 IP address, then the VPN gateway's IP address will be
 * allocated from the IP address range specified here.
 * For example, if the HA VPN gateway's interface 0 is paired to this
 * interconnect attachment, then an RFC 1918 IP address for the VPN gateway
 * interface 0 will be allocated from the IP address specified for this
 * interconnect attachment.
 * If this field is not specified for interconnect attachment that has
 * encryption option as IPSEC, later on when creating HA VPN gateway on this
 * interconnect attachment, the HA VPN gateway's IP address will be
 * allocated from regional external IP address pool.
 * @property mtu Maximum Transmission Unit (MTU), in bytes, of packets passing through
 * this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
 * @property name Name of the resource. Provided by the client when the resource is created. The
 * name must be 1-63 characters long, and comply with RFC1035. Specifically, the
 * name must be 1-63 characters long and match the regular expression
 * `a-z?` which means the first character must be a
 * lowercase letter, and all following characters must be a dash, lowercase
 * letter, or digit, except the last character, which cannot be a dash.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property region Region where the regional interconnect attachment resides.
 * @property router URL of the cloud router to be used for dynamic routing. This router must be in
 * the same region as this InterconnectAttachment. The InterconnectAttachment will
 * automatically connect the Interconnect to the network & region within which the
 * Cloud Router is configured.
 * @property stackType The stack type for this interconnect attachment to identify whether the IPv6
 * feature is enabled or not. If not specified, IPV4_ONLY will be used.
 * This field can be both set at interconnect attachments creation and update
 * interconnect attachment operations.
 * Possible values are: `IPV4_IPV6`, `IPV4_ONLY`.
 * @property type The type of InterconnectAttachment you wish to create. Defaults to
 * DEDICATED.
 * Possible values are: `DEDICATED`, `PARTNER`, `PARTNER_PROVIDER`.
 * @property vlanTag8021q The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
 * using PARTNER type this will be managed upstream.
 */
public data class InterconnectAttachmentArgs(
    public val adminEnabled: Output? = null,
    public val bandwidth: Output? = null,
    public val candidateSubnets: Output>? = null,
    public val description: Output? = null,
    public val edgeAvailabilityDomain: Output? = null,
    public val encryption: Output? = null,
    public val interconnect: Output? = null,
    public val ipsecInternalAddresses: Output>? = null,
    public val mtu: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val region: Output? = null,
    public val router: Output? = null,
    public val stackType: Output? = null,
    public val type: Output? = null,
    public val vlanTag8021q: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.InterconnectAttachmentArgs =
        com.pulumi.gcp.compute.InterconnectAttachmentArgs.builder()
            .adminEnabled(adminEnabled?.applyValue({ args0 -> args0 }))
            .bandwidth(bandwidth?.applyValue({ args0 -> args0 }))
            .candidateSubnets(candidateSubnets?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .edgeAvailabilityDomain(edgeAvailabilityDomain?.applyValue({ args0 -> args0 }))
            .encryption(encryption?.applyValue({ args0 -> args0 }))
            .interconnect(interconnect?.applyValue({ args0 -> args0 }))
            .ipsecInternalAddresses(
                ipsecInternalAddresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .mtu(mtu?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 }))
            .router(router?.applyValue({ args0 -> args0 }))
            .stackType(stackType?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 }))
            .vlanTag8021q(vlanTag8021q?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InterconnectAttachmentArgs].
 */
@PulumiTagMarker
public class InterconnectAttachmentArgsBuilder internal constructor() {
    private var adminEnabled: Output? = null

    private var bandwidth: Output? = null

    private var candidateSubnets: Output>? = null

    private var description: Output? = null

    private var edgeAvailabilityDomain: Output? = null

    private var encryption: Output? = null

    private var interconnect: Output? = null

    private var ipsecInternalAddresses: Output>? = null

    private var mtu: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var region: Output? = null

    private var router: Output? = null

    private var stackType: Output? = null

    private var type: Output? = null

    private var vlanTag8021q: Output? = null

    /**
     * @param value Whether the VLAN attachment is enabled or disabled.  When using
     * PARTNER type this will Pre-Activate the interconnect attachment
     */
    @JvmName("ilylrbaufqfwkjnf")
    public suspend fun adminEnabled(`value`: Output) {
        this.adminEnabled = value
    }

    /**
     * @param value Provisioned bandwidth capacity for the interconnect attachment.
     * For attachments of type DEDICATED, the user can set the bandwidth.
     * For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
     * Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
     * Defaults to BPS_10G
     * Possible values are: `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, `BPS_50G`.
     */
    @JvmName("ccryqlneidjirspa")
    public suspend fun bandwidth(`value`: Output) {
        this.bandwidth = value
    }

    /**
     * @param value Up to 16 candidate prefixes that can be used to restrict the allocation
     * of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
     * All prefixes must be within link-local address space (169.254.0.0/16)
     * and must be /29 or shorter (/28, /27, etc). Google will attempt to select
     * an unused /29 from the supplied candidate prefix(es). The request will
     * fail if all possible /29s are in use on Google's edge. If not supplied,
     * Google will randomly select an unused /29 from all of link-local space.
     */
    @JvmName("bsmpwreiupcjrsyq")
    public suspend fun candidateSubnets(`value`: Output>) {
        this.candidateSubnets = value
    }

    @JvmName("exroxtcpvfdshfnr")
    public suspend fun candidateSubnets(vararg values: Output) {
        this.candidateSubnets = Output.all(values.asList())
    }

    /**
     * @param values Up to 16 candidate prefixes that can be used to restrict the allocation
     * of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
     * All prefixes must be within link-local address space (169.254.0.0/16)
     * and must be /29 or shorter (/28, /27, etc). Google will attempt to select
     * an unused /29 from the supplied candidate prefix(es). The request will
     * fail if all possible /29s are in use on Google's edge. If not supplied,
     * Google will randomly select an unused /29 from all of link-local space.
     */
    @JvmName("aoidgmcbvvthoiek")
    public suspend fun candidateSubnets(values: List>) {
        this.candidateSubnets = Output.all(values)
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("mpluskhemnwfetty")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Desired availability domain for the attachment. Only available for type
     * PARTNER, at creation time. For improved reliability, customers should
     * configure a pair of attachments with one per availability domain. The
     * selected availability domain will be provided to the Partner via the
     * pairing key so that the provisioned circuit will lie in the specified
     * domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
     */
    @JvmName("ajaxfnvvplasnmjd")
    public suspend fun edgeAvailabilityDomain(`value`: Output) {
        this.edgeAvailabilityDomain = value
    }

    /**
     * @param value Indicates the user-supplied encryption option of this interconnect
     * attachment. Can only be specified at attachment creation for PARTNER or
     * DEDICATED attachments.
     * * NONE - This is the default value, which means that the VLAN attachment
     * carries unencrypted traffic. VMs are able to send traffic to, or receive
     * traffic from, such a VLAN attachment.
     * * IPSEC - The VLAN attachment carries only encrypted traffic that is
     * encrypted by an IPsec device, such as an HA VPN gateway or third-party
     * IPsec VPN. VMs cannot directly send traffic to, or receive traffic from,
     * such a VLAN attachment. To use HA VPN over Cloud Interconnect, the VLAN
     * attachment must be created with this option.
     * Default value is `NONE`.
     * Possible values are: `NONE`, `IPSEC`.
     */
    @JvmName("emeycxaktgsxcpaj")
    public suspend fun encryption(`value`: Output) {
        this.encryption = value
    }

    /**
     * @param value URL of the underlying Interconnect object that this attachment's
     * traffic will traverse through. Required if type is DEDICATED, must not
     * be set if type is PARTNER.
     */
    @JvmName("unsdomoeitguqstv")
    public suspend fun interconnect(`value`: Output) {
        this.interconnect = value
    }

    /**
     * @param value URL of addresses that have been reserved for the interconnect attachment,
     * Used only for interconnect attachment that has the encryption option as
     * IPSEC.
     * The addresses must be RFC 1918 IP address ranges. When creating HA VPN
     * gateway over the interconnect attachment, if the attachment is configured
     * to use an RFC 1918 IP address, then the VPN gateway's IP address will be
     * allocated from the IP address range specified here.
     * For example, if the HA VPN gateway's interface 0 is paired to this
     * interconnect attachment, then an RFC 1918 IP address for the VPN gateway
     * interface 0 will be allocated from the IP address specified for this
     * interconnect attachment.
     * If this field is not specified for interconnect attachment that has
     * encryption option as IPSEC, later on when creating HA VPN gateway on this
     * interconnect attachment, the HA VPN gateway's IP address will be
     * allocated from regional external IP address pool.
     */
    @JvmName("boxrafjjiaeogsdk")
    public suspend fun ipsecInternalAddresses(`value`: Output>) {
        this.ipsecInternalAddresses = value
    }

    @JvmName("olaxqqjicroslile")
    public suspend fun ipsecInternalAddresses(vararg values: Output) {
        this.ipsecInternalAddresses = Output.all(values.asList())
    }

    /**
     * @param values URL of addresses that have been reserved for the interconnect attachment,
     * Used only for interconnect attachment that has the encryption option as
     * IPSEC.
     * The addresses must be RFC 1918 IP address ranges. When creating HA VPN
     * gateway over the interconnect attachment, if the attachment is configured
     * to use an RFC 1918 IP address, then the VPN gateway's IP address will be
     * allocated from the IP address range specified here.
     * For example, if the HA VPN gateway's interface 0 is paired to this
     * interconnect attachment, then an RFC 1918 IP address for the VPN gateway
     * interface 0 will be allocated from the IP address specified for this
     * interconnect attachment.
     * If this field is not specified for interconnect attachment that has
     * encryption option as IPSEC, later on when creating HA VPN gateway on this
     * interconnect attachment, the HA VPN gateway's IP address will be
     * allocated from regional external IP address pool.
     */
    @JvmName("akcwosmtbyyladhe")
    public suspend fun ipsecInternalAddresses(values: List>) {
        this.ipsecInternalAddresses = Output.all(values)
    }

    /**
     * @param value Maximum Transmission Unit (MTU), in bytes, of packets passing through
     * this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
     */
    @JvmName("oklicypaxfkecont")
    public suspend fun mtu(`value`: Output) {
        this.mtu = value
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is created. The
     * name must be 1-63 characters long, and comply with RFC1035. Specifically, the
     * name must be 1-63 characters long and match the regular expression
     * `a-z?` which means the first character must be a
     * lowercase letter, and all following characters must be a dash, lowercase
     * letter, or digit, except the last character, which cannot be a dash.
     * - - -
     */
    @JvmName("wqbumcdttojjraxp")
    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("hvtqibtjmkybyydk")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Region where the regional interconnect attachment resides.
     */
    @JvmName("ducmivkitotqkmhi")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value URL of the cloud router to be used for dynamic routing. This router must be in
     * the same region as this InterconnectAttachment. The InterconnectAttachment will
     * automatically connect the Interconnect to the network & region within which the
     * Cloud Router is configured.
     */
    @JvmName("pqqxojveupuaiajr")
    public suspend fun router(`value`: Output) {
        this.router = value
    }

    /**
     * @param value The stack type for this interconnect attachment to identify whether the IPv6
     * feature is enabled or not. If not specified, IPV4_ONLY will be used.
     * This field can be both set at interconnect attachments creation and update
     * interconnect attachment operations.
     * Possible values are: `IPV4_IPV6`, `IPV4_ONLY`.
     */
    @JvmName("wujqsfyrdgjpiiko")
    public suspend fun stackType(`value`: Output) {
        this.stackType = value
    }

    /**
     * @param value The type of InterconnectAttachment you wish to create. Defaults to
     * DEDICATED.
     * Possible values are: `DEDICATED`, `PARTNER`, `PARTNER_PROVIDER`.
     */
    @JvmName("ajrwhfjbrhbquksq")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
     * using PARTNER type this will be managed upstream.
     */
    @JvmName("hcotwmbrumhaplor")
    public suspend fun vlanTag8021q(`value`: Output) {
        this.vlanTag8021q = value
    }

    /**
     * @param value Whether the VLAN attachment is enabled or disabled.  When using
     * PARTNER type this will Pre-Activate the interconnect attachment
     */
    @JvmName("fovuwwckbgiapqie")
    public suspend fun adminEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.adminEnabled = mapped
    }

    /**
     * @param value Provisioned bandwidth capacity for the interconnect attachment.
     * For attachments of type DEDICATED, the user can set the bandwidth.
     * For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth.
     * Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,
     * Defaults to BPS_10G
     * Possible values are: `BPS_50M`, `BPS_100M`, `BPS_200M`, `BPS_300M`, `BPS_400M`, `BPS_500M`, `BPS_1G`, `BPS_2G`, `BPS_5G`, `BPS_10G`, `BPS_20G`, `BPS_50G`.
     */
    @JvmName("wjxmrtdooyftsnrb")
    public suspend fun bandwidth(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidth = mapped
    }

    /**
     * @param value Up to 16 candidate prefixes that can be used to restrict the allocation
     * of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
     * All prefixes must be within link-local address space (169.254.0.0/16)
     * and must be /29 or shorter (/28, /27, etc). Google will attempt to select
     * an unused /29 from the supplied candidate prefix(es). The request will
     * fail if all possible /29s are in use on Google's edge. If not supplied,
     * Google will randomly select an unused /29 from all of link-local space.
     */
    @JvmName("rsxkhiuvdxbecofn")
    public suspend fun candidateSubnets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.candidateSubnets = mapped
    }

    /**
     * @param values Up to 16 candidate prefixes that can be used to restrict the allocation
     * of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
     * All prefixes must be within link-local address space (169.254.0.0/16)
     * and must be /29 or shorter (/28, /27, etc). Google will attempt to select
     * an unused /29 from the supplied candidate prefix(es). The request will
     * fail if all possible /29s are in use on Google's edge. If not supplied,
     * Google will randomly select an unused /29 from all of link-local space.
     */
    @JvmName("modpyhlfvcsfeaob")
    public suspend fun candidateSubnets(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.candidateSubnets = mapped
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("cvkdajbsnwaektgt")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Desired availability domain for the attachment. Only available for type
     * PARTNER, at creation time. For improved reliability, customers should
     * configure a pair of attachments with one per availability domain. The
     * selected availability domain will be provided to the Partner via the
     * pairing key so that the provisioned circuit will lie in the specified
     * domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.
     */
    @JvmName("wuovfpbjicpeljit")
    public suspend fun edgeAvailabilityDomain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.edgeAvailabilityDomain = mapped
    }

    /**
     * @param value Indicates the user-supplied encryption option of this interconnect
     * attachment. Can only be specified at attachment creation for PARTNER or
     * DEDICATED attachments.
     * * NONE - This is the default value, which means that the VLAN attachment
     * carries unencrypted traffic. VMs are able to send traffic to, or receive
     * traffic from, such a VLAN attachment.
     * * IPSEC - The VLAN attachment carries only encrypted traffic that is
     * encrypted by an IPsec device, such as an HA VPN gateway or third-party
     * IPsec VPN. VMs cannot directly send traffic to, or receive traffic from,
     * such a VLAN attachment. To use HA VPN over Cloud Interconnect, the VLAN
     * attachment must be created with this option.
     * Default value is `NONE`.
     * Possible values are: `NONE`, `IPSEC`.
     */
    @JvmName("ylucyxuikrtrjmwg")
    public suspend fun encryption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param value URL of the underlying Interconnect object that this attachment's
     * traffic will traverse through. Required if type is DEDICATED, must not
     * be set if type is PARTNER.
     */
    @JvmName("ojjsajmahbogwrgk")
    public suspend fun interconnect(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interconnect = mapped
    }

    /**
     * @param value URL of addresses that have been reserved for the interconnect attachment,
     * Used only for interconnect attachment that has the encryption option as
     * IPSEC.
     * The addresses must be RFC 1918 IP address ranges. When creating HA VPN
     * gateway over the interconnect attachment, if the attachment is configured
     * to use an RFC 1918 IP address, then the VPN gateway's IP address will be
     * allocated from the IP address range specified here.
     * For example, if the HA VPN gateway's interface 0 is paired to this
     * interconnect attachment, then an RFC 1918 IP address for the VPN gateway
     * interface 0 will be allocated from the IP address specified for this
     * interconnect attachment.
     * If this field is not specified for interconnect attachment that has
     * encryption option as IPSEC, later on when creating HA VPN gateway on this
     * interconnect attachment, the HA VPN gateway's IP address will be
     * allocated from regional external IP address pool.
     */
    @JvmName("htrbwhggylujafyj")
    public suspend fun ipsecInternalAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipsecInternalAddresses = mapped
    }

    /**
     * @param values URL of addresses that have been reserved for the interconnect attachment,
     * Used only for interconnect attachment that has the encryption option as
     * IPSEC.
     * The addresses must be RFC 1918 IP address ranges. When creating HA VPN
     * gateway over the interconnect attachment, if the attachment is configured
     * to use an RFC 1918 IP address, then the VPN gateway's IP address will be
     * allocated from the IP address range specified here.
     * For example, if the HA VPN gateway's interface 0 is paired to this
     * interconnect attachment, then an RFC 1918 IP address for the VPN gateway
     * interface 0 will be allocated from the IP address specified for this
     * interconnect attachment.
     * If this field is not specified for interconnect attachment that has
     * encryption option as IPSEC, later on when creating HA VPN gateway on this
     * interconnect attachment, the HA VPN gateway's IP address will be
     * allocated from regional external IP address pool.
     */
    @JvmName("gcjhbeedqjwbwamq")
    public suspend fun ipsecInternalAddresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipsecInternalAddresses = mapped
    }

    /**
     * @param value Maximum Transmission Unit (MTU), in bytes, of packets passing through
     * this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not specified, the value will default to 1440.
     */
    @JvmName("qftjfvdrxfekeweg")
    public suspend fun mtu(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mtu = mapped
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is created. The
     * name must be 1-63 characters long, and comply with RFC1035. Specifically, the
     * name must be 1-63 characters long and match the regular expression
     * `a-z?` which means the first character must be a
     * lowercase letter, and all following characters must be a dash, lowercase
     * letter, or digit, except the last character, which cannot be a dash.
     * - - -
     */
    @JvmName("rdxpsxhgppddujvb")
    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("upuuvuqomyovywbh")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Region where the regional interconnect attachment resides.
     */
    @JvmName("oayohdbgqcpjnrdb")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value URL of the cloud router to be used for dynamic routing. This router must be in
     * the same region as this InterconnectAttachment. The InterconnectAttachment will
     * automatically connect the Interconnect to the network & region within which the
     * Cloud Router is configured.
     */
    @JvmName("fblgvsgqvjwokskq")
    public suspend fun router(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.router = mapped
    }

    /**
     * @param value The stack type for this interconnect attachment to identify whether the IPv6
     * feature is enabled or not. If not specified, IPV4_ONLY will be used.
     * This field can be both set at interconnect attachments creation and update
     * interconnect attachment operations.
     * Possible values are: `IPV4_IPV6`, `IPV4_ONLY`.
     */
    @JvmName("jlqlcknbiatacmoc")
    public suspend fun stackType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stackType = mapped
    }

    /**
     * @param value The type of InterconnectAttachment you wish to create. Defaults to
     * DEDICATED.
     * Possible values are: `DEDICATED`, `PARTNER`, `PARTNER_PROVIDER`.
     */
    @JvmName("tddnolvghlatdpbh")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When
     * using PARTNER type this will be managed upstream.
     */
    @JvmName("rbgytakqhanvvcfp")
    public suspend fun vlanTag8021q(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vlanTag8021q = mapped
    }

    internal fun build(): InterconnectAttachmentArgs = InterconnectAttachmentArgs(
        adminEnabled = adminEnabled,
        bandwidth = bandwidth,
        candidateSubnets = candidateSubnets,
        description = description,
        edgeAvailabilityDomain = edgeAvailabilityDomain,
        encryption = encryption,
        interconnect = interconnect,
        ipsecInternalAddresses = ipsecInternalAddresses,
        mtu = mtu,
        name = name,
        project = project,
        region = region,
        router = router,
        stackType = stackType,
        type = type,
        vlanTag8021q = vlanTag8021q,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy