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

com.pulumi.gcp.networkconnectivity.kotlin.InternalRangeArgs.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.12.0.0
Show newest version
@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.InternalRangeArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.
 * To get more information about InternalRange, see:
 * * [API documentation](https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.internalRanges)
 * * How-to Guides
 *     * [Use internal ranges](https://cloud.google.com/vpc/docs/create-use-internal-ranges)
 * ## Example Usage
 * ### Network Connectivity Internal Ranges Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "internal-ranges",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.networkconnectivity.InternalRange("default", {
 *     name: "basic",
 *     description: "Test internal range",
 *     network: defaultNetwork.selfLink,
 *     usage: "FOR_VPC",
 *     peering: "FOR_SELF",
 *     ipCidrRange: "10.0.0.0/24",
 *     labels: {
 *         "label-a": "b",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="internal-ranges",
 *     auto_create_subnetworks=False)
 * default = gcp.networkconnectivity.InternalRange("default",
 *     name="basic",
 *     description="Test internal range",
 *     network=default_network.self_link,
 *     usage="FOR_VPC",
 *     peering="FOR_SELF",
 *     ip_cidr_range="10.0.0.0/24",
 *     labels={
 *         "label-a": "b",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "internal-ranges",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.InternalRange("default", new()
 *     {
 *         Name = "basic",
 *         Description = "Test internal range",
 *         Network = defaultNetwork.SelfLink,
 *         Usage = "FOR_VPC",
 *         Peering = "FOR_SELF",
 *         IpCidrRange = "10.0.0.0/24",
 *         Labels =
 *         {
 *             { "label-a", "b" },
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("internal-ranges"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkconnectivity.NewInternalRange(ctx, "default", &networkconnectivity.InternalRangeArgs{
 * 			Name:        pulumi.String("basic"),
 * 			Description: pulumi.String("Test internal range"),
 * 			Network:     defaultNetwork.SelfLink,
 * 			Usage:       pulumi.String("FOR_VPC"),
 * 			Peering:     pulumi.String("FOR_SELF"),
 * 			IpCidrRange: pulumi.String("10.0.0.0/24"),
 * 			Labels: pulumi.StringMap{
 * 				"label-a": pulumi.String("b"),
 * 			},
 * 		})
 * 		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.InternalRange;
 * import com.pulumi.gcp.networkconnectivity.InternalRangeArgs;
 * 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .name("internal-ranges")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var default_ = new InternalRange("default", InternalRangeArgs.builder()
 *             .name("basic")
 *             .description("Test internal range")
 *             .network(defaultNetwork.selfLink())
 *             .usage("FOR_VPC")
 *             .peering("FOR_SELF")
 *             .ipCidrRange("10.0.0.0/24")
 *             .labels(Map.of("label-a", "b"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkconnectivity:InternalRange
 *     properties:
 *       name: basic
 *       description: Test internal range
 *       network: ${defaultNetwork.selfLink}
 *       usage: FOR_VPC
 *       peering: FOR_SELF
 *       ipCidrRange: 10.0.0.0/24
 *       labels:
 *         label-a: b
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: internal-ranges
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ### Network Connectivity Internal Ranges Automatic Reservation
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "internal-ranges",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.networkconnectivity.InternalRange("default", {
 *     name: "automatic-reservation",
 *     network: defaultNetwork.id,
 *     usage: "FOR_VPC",
 *     peering: "FOR_SELF",
 *     prefixLength: 24,
 *     targetCidrRanges: ["192.16.0.0/16"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="internal-ranges",
 *     auto_create_subnetworks=False)
 * default = gcp.networkconnectivity.InternalRange("default",
 *     name="automatic-reservation",
 *     network=default_network.id,
 *     usage="FOR_VPC",
 *     peering="FOR_SELF",
 *     prefix_length=24,
 *     target_cidr_ranges=["192.16.0.0/16"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "internal-ranges",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.InternalRange("default", new()
 *     {
 *         Name = "automatic-reservation",
 *         Network = defaultNetwork.Id,
 *         Usage = "FOR_VPC",
 *         Peering = "FOR_SELF",
 *         PrefixLength = 24,
 *         TargetCidrRanges = new[]
 *         {
 *             "192.16.0.0/16",
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("internal-ranges"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkconnectivity.NewInternalRange(ctx, "default", &networkconnectivity.InternalRangeArgs{
 * 			Name:         pulumi.String("automatic-reservation"),
 * 			Network:      defaultNetwork.ID(),
 * 			Usage:        pulumi.String("FOR_VPC"),
 * 			Peering:      pulumi.String("FOR_SELF"),
 * 			PrefixLength: pulumi.Int(24),
 * 			TargetCidrRanges: pulumi.StringArray{
 * 				pulumi.String("192.16.0.0/16"),
 * 			},
 * 		})
 * 		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.InternalRange;
 * import com.pulumi.gcp.networkconnectivity.InternalRangeArgs;
 * 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .name("internal-ranges")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var default_ = new InternalRange("default", InternalRangeArgs.builder()
 *             .name("automatic-reservation")
 *             .network(defaultNetwork.id())
 *             .usage("FOR_VPC")
 *             .peering("FOR_SELF")
 *             .prefixLength(24)
 *             .targetCidrRanges("192.16.0.0/16")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkconnectivity:InternalRange
 *     properties:
 *       name: automatic-reservation
 *       network: ${defaultNetwork.id}
 *       usage: FOR_VPC
 *       peering: FOR_SELF
 *       prefixLength: 24
 *       targetCidrRanges:
 *         - 192.16.0.0/16
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: internal-ranges
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ### Network Connectivity Internal Ranges External Ranges
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "internal-ranges",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.networkconnectivity.InternalRange("default", {
 *     name: "external-ranges",
 *     network: defaultNetwork.id,
 *     usage: "EXTERNAL_TO_VPC",
 *     peering: "FOR_SELF",
 *     ipCidrRange: "172.16.0.0/24",
 *     labels: {
 *         "external-reserved-range": "on-premises",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="internal-ranges",
 *     auto_create_subnetworks=False)
 * default = gcp.networkconnectivity.InternalRange("default",
 *     name="external-ranges",
 *     network=default_network.id,
 *     usage="EXTERNAL_TO_VPC",
 *     peering="FOR_SELF",
 *     ip_cidr_range="172.16.0.0/24",
 *     labels={
 *         "external-reserved-range": "on-premises",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "internal-ranges",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.InternalRange("default", new()
 *     {
 *         Name = "external-ranges",
 *         Network = defaultNetwork.Id,
 *         Usage = "EXTERNAL_TO_VPC",
 *         Peering = "FOR_SELF",
 *         IpCidrRange = "172.16.0.0/24",
 *         Labels =
 *         {
 *             { "external-reserved-range", "on-premises" },
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("internal-ranges"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkconnectivity.NewInternalRange(ctx, "default", &networkconnectivity.InternalRangeArgs{
 * 			Name:        pulumi.String("external-ranges"),
 * 			Network:     defaultNetwork.ID(),
 * 			Usage:       pulumi.String("EXTERNAL_TO_VPC"),
 * 			Peering:     pulumi.String("FOR_SELF"),
 * 			IpCidrRange: pulumi.String("172.16.0.0/24"),
 * 			Labels: pulumi.StringMap{
 * 				"external-reserved-range": pulumi.String("on-premises"),
 * 			},
 * 		})
 * 		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.InternalRange;
 * import com.pulumi.gcp.networkconnectivity.InternalRangeArgs;
 * 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .name("internal-ranges")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var default_ = new InternalRange("default", InternalRangeArgs.builder()
 *             .name("external-ranges")
 *             .network(defaultNetwork.id())
 *             .usage("EXTERNAL_TO_VPC")
 *             .peering("FOR_SELF")
 *             .ipCidrRange("172.16.0.0/24")
 *             .labels(Map.of("external-reserved-range", "on-premises"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkconnectivity:InternalRange
 *     properties:
 *       name: external-ranges
 *       network: ${defaultNetwork.id}
 *       usage: EXTERNAL_TO_VPC
 *       peering: FOR_SELF
 *       ipCidrRange: 172.16.0.0/24
 *       labels:
 *         external-reserved-range: on-premises
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: internal-ranges
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ### Network Connectivity Internal Ranges Reserve With Overlap
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultNetwork = new gcp.compute.Network("default", {
 *     name: "internal-ranges",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.networkconnectivity.InternalRange("default", {
 *     name: "overlap-range",
 *     description: "Test internal range",
 *     network: defaultNetwork.id,
 *     usage: "FOR_VPC",
 *     peering: "FOR_SELF",
 *     ipCidrRange: "10.0.0.0/30",
 *     overlaps: ["OVERLAP_EXISTING_SUBNET_RANGE"],
 * });
 * const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
 *     name: "overlapping-subnet",
 *     ipCidrRange: "10.0.0.0/24",
 *     region: "us-central1",
 *     network: defaultNetwork.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="internal-ranges",
 *     auto_create_subnetworks=False)
 * default = gcp.networkconnectivity.InternalRange("default",
 *     name="overlap-range",
 *     description="Test internal range",
 *     network=default_network.id,
 *     usage="FOR_VPC",
 *     peering="FOR_SELF",
 *     ip_cidr_range="10.0.0.0/30",
 *     overlaps=["OVERLAP_EXISTING_SUBNET_RANGE"])
 * default_subnetwork = gcp.compute.Subnetwork("default",
 *     name="overlapping-subnet",
 *     ip_cidr_range="10.0.0.0/24",
 *     region="us-central1",
 *     network=default_network.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "internal-ranges",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var @default = new Gcp.NetworkConnectivity.InternalRange("default", new()
 *     {
 *         Name = "overlap-range",
 *         Description = "Test internal range",
 *         Network = defaultNetwork.Id,
 *         Usage = "FOR_VPC",
 *         Peering = "FOR_SELF",
 *         IpCidrRange = "10.0.0.0/30",
 *         Overlaps = new[]
 *         {
 *             "OVERLAP_EXISTING_SUBNET_RANGE",
 *         },
 *     });
 *     var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
 *     {
 *         Name = "overlapping-subnet",
 *         IpCidrRange = "10.0.0.0/24",
 *         Region = "us-central1",
 *         Network = defaultNetwork.Id,
 *     });
 * });
 * ```
 * ```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 {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("internal-ranges"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkconnectivity.NewInternalRange(ctx, "default", &networkconnectivity.InternalRangeArgs{
 * 			Name:        pulumi.String("overlap-range"),
 * 			Description: pulumi.String("Test internal range"),
 * 			Network:     defaultNetwork.ID(),
 * 			Usage:       pulumi.String("FOR_VPC"),
 * 			Peering:     pulumi.String("FOR_SELF"),
 * 			IpCidrRange: pulumi.String("10.0.0.0/30"),
 * 			Overlaps: pulumi.StringArray{
 * 				pulumi.String("OVERLAP_EXISTING_SUBNET_RANGE"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("overlapping-subnet"),
 * 			IpCidrRange: pulumi.String("10.0.0.0/24"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     defaultNetwork.ID(),
 * 		})
 * 		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.InternalRange;
 * import com.pulumi.gcp.networkconnectivity.InternalRangeArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * 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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
 *             .name("internal-ranges")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var default_ = new InternalRange("default", InternalRangeArgs.builder()
 *             .name("overlap-range")
 *             .description("Test internal range")
 *             .network(defaultNetwork.id())
 *             .usage("FOR_VPC")
 *             .peering("FOR_SELF")
 *             .ipCidrRange("10.0.0.0/30")
 *             .overlaps("OVERLAP_EXISTING_SUBNET_RANGE")
 *             .build());
 *         var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
 *             .name("overlapping-subnet")
 *             .ipCidrRange("10.0.0.0/24")
 *             .region("us-central1")
 *             .network(defaultNetwork.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkconnectivity:InternalRange
 *     properties:
 *       name: overlap-range
 *       description: Test internal range
 *       network: ${defaultNetwork.id}
 *       usage: FOR_VPC
 *       peering: FOR_SELF
 *       ipCidrRange: 10.0.0.0/30
 *       overlaps:
 *         - OVERLAP_EXISTING_SUBNET_RANGE
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: internal-ranges
 *       autoCreateSubnetworks: false
 *   defaultSubnetwork:
 *     type: gcp:compute:Subnetwork
 *     name: default
 *     properties:
 *       name: overlapping-subnet
 *       ipCidrRange: 10.0.0.0/24
 *       region: us-central1
 *       network: ${defaultNetwork.id}
 * ```
 * 
 * ## Import
 * InternalRange can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/global/internalRanges/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, InternalRange can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:networkconnectivity/internalRange:InternalRange default projects/{{project}}/locations/global/internalRanges/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkconnectivity/internalRange:InternalRange default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkconnectivity/internalRange:InternalRange default {{name}}
 * ```
 * @property description An optional description of this resource.
 * @property ipCidrRange The IP range that this internal range defines.
 * @property labels User-defined 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.
 * @property name The name of the policy based route.
 * @property network Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
 * @property overlaps Optional. Types of resources that are allowed to overlap with the current internal range.
 * Each value may be one of: `OVERLAP_ROUTE_RANGE`, `OVERLAP_EXISTING_SUBNET_RANGE`.
 * @property peering The type of peering set for this internal range.
 * Possible values are: `FOR_SELF`, `FOR_PEER`, `NOT_SHARED`.
 * - - -
 * @property prefixLength An alternate to ipCidrRange. Can be set when trying to create a reservation that automatically finds a free range of the given size.
 * If both ipCidrRange and prefixLength are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property targetCidrRanges Optional. Can be set to narrow down or pick a different address space while searching for a free range.
 * If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
 * @property usage The type of usage set for this InternalRange.
 * Possible values are: `FOR_VPC`, `EXTERNAL_TO_VPC`.
 */
public data class InternalRangeArgs(
    public val description: Output? = null,
    public val ipCidrRange: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val network: Output? = null,
    public val overlaps: Output>? = null,
    public val peering: Output? = null,
    public val prefixLength: Output? = null,
    public val project: Output? = null,
    public val targetCidrRanges: Output>? = null,
    public val usage: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkconnectivity.InternalRangeArgs =
        com.pulumi.gcp.networkconnectivity.InternalRangeArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .ipCidrRange(ipCidrRange?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .network(network?.applyValue({ args0 -> args0 }))
            .overlaps(overlaps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .peering(peering?.applyValue({ args0 -> args0 }))
            .prefixLength(prefixLength?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .targetCidrRanges(targetCidrRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .usage(usage?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InternalRangeArgs].
 */
@PulumiTagMarker
public class InternalRangeArgsBuilder internal constructor() {
    private var description: Output? = null

    private var ipCidrRange: Output? = null

    private var labels: Output>? = null

    private var name: Output? = null

    private var network: Output? = null

    private var overlaps: Output>? = null

    private var peering: Output? = null

    private var prefixLength: Output? = null

    private var project: Output? = null

    private var targetCidrRanges: Output>? = null

    private var usage: Output? = null

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

    /**
     * @param value The IP range that this internal range defines.
     */
    @JvmName("pdkcsmjrrlnvpivr")
    public suspend fun ipCidrRange(`value`: Output) {
        this.ipCidrRange = value
    }

    /**
     * @param value User-defined 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.
     */
    @JvmName("gfmphmhxvvofulmg")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The name of the policy based route.
     */
    @JvmName("kvxupdxbulnlwpxm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
     */
    @JvmName("dkrpqgsnbmqjevnc")
    public suspend fun network(`value`: Output) {
        this.network = value
    }

    /**
     * @param value Optional. Types of resources that are allowed to overlap with the current internal range.
     * Each value may be one of: `OVERLAP_ROUTE_RANGE`, `OVERLAP_EXISTING_SUBNET_RANGE`.
     */
    @JvmName("pryokargqfotweab")
    public suspend fun overlaps(`value`: Output>) {
        this.overlaps = value
    }

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

    /**
     * @param values Optional. Types of resources that are allowed to overlap with the current internal range.
     * Each value may be one of: `OVERLAP_ROUTE_RANGE`, `OVERLAP_EXISTING_SUBNET_RANGE`.
     */
    @JvmName("bddwjnfrwjgjepmt")
    public suspend fun overlaps(values: List>) {
        this.overlaps = Output.all(values)
    }

    /**
     * @param value The type of peering set for this internal range.
     * Possible values are: `FOR_SELF`, `FOR_PEER`, `NOT_SHARED`.
     * - - -
     */
    @JvmName("qhpbeltyjyeldijw")
    public suspend fun peering(`value`: Output) {
        this.peering = value
    }

    /**
     * @param value An alternate to ipCidrRange. Can be set when trying to create a reservation that automatically finds a free range of the given size.
     * If both ipCidrRange and prefixLength are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.
     */
    @JvmName("cxpxidftjxspyiay")
    public suspend fun prefixLength(`value`: Output) {
        this.prefixLength = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("amgopmryntluhodt")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. Can be set to narrow down or pick a different address space while searching for a free range.
     * If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
     */
    @JvmName("xqraufuqrqidwsww")
    public suspend fun targetCidrRanges(`value`: Output>) {
        this.targetCidrRanges = value
    }

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

    /**
     * @param values Optional. Can be set to narrow down or pick a different address space while searching for a free range.
     * If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
     */
    @JvmName("ulbbifatgsfkndqy")
    public suspend fun targetCidrRanges(values: List>) {
        this.targetCidrRanges = Output.all(values)
    }

    /**
     * @param value The type of usage set for this InternalRange.
     * Possible values are: `FOR_VPC`, `EXTERNAL_TO_VPC`.
     */
    @JvmName("epmynvedkgsechys")
    public suspend fun usage(`value`: Output) {
        this.usage = value
    }

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

    /**
     * @param value The IP range that this internal range defines.
     */
    @JvmName("ksepulqywhauaqmw")
    public suspend fun ipCidrRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipCidrRange = mapped
    }

    /**
     * @param value User-defined 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.
     */
    @JvmName("mntnwqhooviiexmp")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values User-defined 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.
     */
    @JvmName("jebseqohjdhwoxri")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The name of the policy based route.
     */
    @JvmName("bfpjulqmfmtkayrd")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
     */
    @JvmName("ahgluurkpawkqsog")
    public suspend fun network(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.network = mapped
    }

    /**
     * @param value Optional. Types of resources that are allowed to overlap with the current internal range.
     * Each value may be one of: `OVERLAP_ROUTE_RANGE`, `OVERLAP_EXISTING_SUBNET_RANGE`.
     */
    @JvmName("jdarnwxmjoahahwy")
    public suspend fun overlaps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.overlaps = mapped
    }

    /**
     * @param values Optional. Types of resources that are allowed to overlap with the current internal range.
     * Each value may be one of: `OVERLAP_ROUTE_RANGE`, `OVERLAP_EXISTING_SUBNET_RANGE`.
     */
    @JvmName("anisnbwkhrlhtfnu")
    public suspend fun overlaps(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.overlaps = mapped
    }

    /**
     * @param value The type of peering set for this internal range.
     * Possible values are: `FOR_SELF`, `FOR_PEER`, `NOT_SHARED`.
     * - - -
     */
    @JvmName("svuhsqpgblkgudce")
    public suspend fun peering(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.peering = mapped
    }

    /**
     * @param value An alternate to ipCidrRange. Can be set when trying to create a reservation that automatically finds a free range of the given size.
     * If both ipCidrRange and prefixLength are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.
     */
    @JvmName("fdjuaokxschtsodv")
    public suspend fun prefixLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefixLength = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("wgbblcwsxiirkbrt")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. Can be set to narrow down or pick a different address space while searching for a free range.
     * If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
     */
    @JvmName("wlqdxkelyovyiqwk")
    public suspend fun targetCidrRanges(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetCidrRanges = mapped
    }

    /**
     * @param values Optional. Can be set to narrow down or pick a different address space while searching for a free range.
     * If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
     */
    @JvmName("tnpswuemjuohmamq")
    public suspend fun targetCidrRanges(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetCidrRanges = mapped
    }

    /**
     * @param value The type of usage set for this InternalRange.
     * Possible values are: `FOR_VPC`, `EXTERNAL_TO_VPC`.
     */
    @JvmName("vqmocqpndhrmslai")
    public suspend fun usage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usage = mapped
    }

    internal fun build(): InternalRangeArgs = InternalRangeArgs(
        description = description,
        ipCidrRange = ipCidrRange,
        labels = labels,
        name = name,
        network = network,
        overlaps = overlaps,
        peering = peering,
        prefixLength = prefixLength,
        project = project,
        targetCidrRanges = targetCidrRanges,
        usage = usage,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy