com.pulumi.gcp.compute.kotlin.SubnetworkArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.SubnetworkArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.SubnetworkLogConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.SubnetworkLogConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.SubnetworkSecondaryIpRangeArgs
import com.pulumi.gcp.compute.kotlin.inputs.SubnetworkSecondaryIpRangeArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* A VPC network is a virtual version of the traditional physical networks
* that exist within and between physical data centers. A VPC network
* provides connectivity for your Compute Engine virtual machine (VM)
* instances, Container Engine containers, App Engine Flex services, and
* other network-related resources.
* Each GCP project contains one or more VPC networks. Each VPC network is a
* global entity spanning all GCP regions. This global VPC network allows VM
* instances and other resources to communicate with each other via internal,
* private IP addresses.
* Each VPC network is subdivided into subnets, and each subnet is contained
* within a single region. You can have more than one subnet in a region for
* a given VPC network. Each subnet has a contiguous private RFC1918 IP
* space. You create instances, containers, and the like in these subnets.
* When you create an instance, you must create it in a subnet, and the
* instance draws its internal IP address from that subnet.
* Virtual machine (VM) instances in a VPC network can communicate with
* instances in all other subnets of the same VPC network, regardless of
* region, using their RFC1918 private IP addresses. You can isolate portions
* of the network, even entire subnets, using firewall rules.
* To get more information about Subnetwork, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks)
* * How-to Guides
* * [Private Google Access](https://cloud.google.com/vpc/docs/configure-private-google-access)
* * [Cloud Networking](https://cloud.google.com/vpc/docs/using-vpc)
* ## Example Usage
* ### Subnetwork Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "test-network",
* autoCreateSubnetworks: false,
* });
* const network_with_private_secondary_ip_ranges = new gcp.compute.Subnetwork("network-with-private-secondary-ip-ranges", {
* name: "test-subnetwork",
* ipCidrRange: "10.2.0.0/16",
* region: "us-central1",
* network: custom_test.id,
* secondaryIpRanges: [{
* rangeName: "tf-test-secondary-range-update1",
* ipCidrRange: "192.168.10.0/24",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="test-network",
* auto_create_subnetworks=False)
* network_with_private_secondary_ip_ranges = gcp.compute.Subnetwork("network-with-private-secondary-ip-ranges",
* name="test-subnetwork",
* ip_cidr_range="10.2.0.0/16",
* region="us-central1",
* network=custom_test.id,
* secondary_ip_ranges=[gcp.compute.SubnetworkSecondaryIpRangeArgs(
* range_name="tf-test-secondary-range-update1",
* ip_cidr_range="192.168.10.0/24",
* )])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "test-network",
* AutoCreateSubnetworks = false,
* });
* var network_with_private_secondary_ip_ranges = new Gcp.Compute.Subnetwork("network-with-private-secondary-ip-ranges", new()
* {
* Name = "test-subnetwork",
* IpCidrRange = "10.2.0.0/16",
* Region = "us-central1",
* Network = custom_test.Id,
* SecondaryIpRanges = new[]
* {
* new Gcp.Compute.Inputs.SubnetworkSecondaryIpRangeArgs
* {
* RangeName = "tf-test-secondary-range-update1",
* IpCidrRange = "192.168.10.0/24",
* },
* },
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "network-with-private-secondary-ip-ranges", &compute.SubnetworkArgs{
* Name: pulumi.String("test-subnetwork"),
* IpCidrRange: pulumi.String("10.2.0.0/16"),
* Region: pulumi.String("us-central1"),
* Network: custom_test.ID(),
* SecondaryIpRanges: compute.SubnetworkSecondaryIpRangeArray{
* &compute.SubnetworkSecondaryIpRangeArgs{
* RangeName: pulumi.String("tf-test-secondary-range-update1"),
* IpCidrRange: pulumi.String("192.168.10.0/24"),
* },
* },
* })
* 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.inputs.SubnetworkSecondaryIpRangeArgs;
* 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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("test-network")
* .autoCreateSubnetworks(false)
* .build());
* var network_with_private_secondary_ip_ranges = new Subnetwork("network-with-private-secondary-ip-ranges", SubnetworkArgs.builder()
* .name("test-subnetwork")
* .ipCidrRange("10.2.0.0/16")
* .region("us-central1")
* .network(custom_test.id())
* .secondaryIpRanges(SubnetworkSecondaryIpRangeArgs.builder()
* .rangeName("tf-test-secondary-range-update1")
* .ipCidrRange("192.168.10.0/24")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* network-with-private-secondary-ip-ranges:
* type: gcp:compute:Subnetwork
* properties:
* name: test-subnetwork
* ipCidrRange: 10.2.0.0/16
* region: us-central1
* network: ${["custom-test"].id}
* secondaryIpRanges:
* - rangeName: tf-test-secondary-range-update1
* ipCidrRange: 192.168.10.0/24
* custom-test:
* type: gcp:compute:Network
* properties:
* name: test-network
* autoCreateSubnetworks: false
* ```
*
* ### Subnetwork Logging Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "log-test-network",
* autoCreateSubnetworks: false,
* });
* const subnet_with_logging = new gcp.compute.Subnetwork("subnet-with-logging", {
* name: "log-test-subnetwork",
* ipCidrRange: "10.2.0.0/16",
* region: "us-central1",
* network: custom_test.id,
* logConfig: {
* aggregationInterval: "INTERVAL_10_MIN",
* flowSampling: 0.5,
* metadata: "INCLUDE_ALL_METADATA",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="log-test-network",
* auto_create_subnetworks=False)
* subnet_with_logging = gcp.compute.Subnetwork("subnet-with-logging",
* name="log-test-subnetwork",
* ip_cidr_range="10.2.0.0/16",
* region="us-central1",
* network=custom_test.id,
* log_config=gcp.compute.SubnetworkLogConfigArgs(
* aggregation_interval="INTERVAL_10_MIN",
* flow_sampling=0.5,
* metadata="INCLUDE_ALL_METADATA",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "log-test-network",
* AutoCreateSubnetworks = false,
* });
* var subnet_with_logging = new Gcp.Compute.Subnetwork("subnet-with-logging", new()
* {
* Name = "log-test-subnetwork",
* IpCidrRange = "10.2.0.0/16",
* Region = "us-central1",
* Network = custom_test.Id,
* LogConfig = new Gcp.Compute.Inputs.SubnetworkLogConfigArgs
* {
* AggregationInterval = "INTERVAL_10_MIN",
* FlowSampling = 0.5,
* Metadata = "INCLUDE_ALL_METADATA",
* },
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("log-test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "subnet-with-logging", &compute.SubnetworkArgs{
* Name: pulumi.String("log-test-subnetwork"),
* IpCidrRange: pulumi.String("10.2.0.0/16"),
* Region: pulumi.String("us-central1"),
* Network: custom_test.ID(),
* LogConfig: &compute.SubnetworkLogConfigArgs{
* AggregationInterval: pulumi.String("INTERVAL_10_MIN"),
* FlowSampling: pulumi.Float64(0.5),
* Metadata: pulumi.String("INCLUDE_ALL_METADATA"),
* },
* })
* 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.inputs.SubnetworkLogConfigArgs;
* 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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("log-test-network")
* .autoCreateSubnetworks(false)
* .build());
* var subnet_with_logging = new Subnetwork("subnet-with-logging", SubnetworkArgs.builder()
* .name("log-test-subnetwork")
* .ipCidrRange("10.2.0.0/16")
* .region("us-central1")
* .network(custom_test.id())
* .logConfig(SubnetworkLogConfigArgs.builder()
* .aggregationInterval("INTERVAL_10_MIN")
* .flowSampling(0.5)
* .metadata("INCLUDE_ALL_METADATA")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* subnet-with-logging:
* type: gcp:compute:Subnetwork
* properties:
* name: log-test-subnetwork
* ipCidrRange: 10.2.0.0/16
* region: us-central1
* network: ${["custom-test"].id}
* logConfig:
* aggregationInterval: INTERVAL_10_MIN
* flowSampling: 0.5
* metadata: INCLUDE_ALL_METADATA
* custom-test:
* type: gcp:compute:Network
* properties:
* name: log-test-network
* autoCreateSubnetworks: false
* ```
*
* ### Subnetwork Internal L7lb
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "l7lb-test-network",
* autoCreateSubnetworks: false,
* });
* const network_for_l7lb = new gcp.compute.Subnetwork("network-for-l7lb", {
* name: "l7lb-test-subnetwork",
* ipCidrRange: "10.0.0.0/22",
* region: "us-central1",
* purpose: "REGIONAL_MANAGED_PROXY",
* role: "ACTIVE",
* network: custom_test.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="l7lb-test-network",
* auto_create_subnetworks=False)
* network_for_l7lb = gcp.compute.Subnetwork("network-for-l7lb",
* name="l7lb-test-subnetwork",
* ip_cidr_range="10.0.0.0/22",
* region="us-central1",
* purpose="REGIONAL_MANAGED_PROXY",
* role="ACTIVE",
* network=custom_test.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "l7lb-test-network",
* AutoCreateSubnetworks = false,
* });
* var network_for_l7lb = new Gcp.Compute.Subnetwork("network-for-l7lb", new()
* {
* Name = "l7lb-test-subnetwork",
* IpCidrRange = "10.0.0.0/22",
* Region = "us-central1",
* Purpose = "REGIONAL_MANAGED_PROXY",
* Role = "ACTIVE",
* Network = custom_test.Id,
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("l7lb-test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "network-for-l7lb", &compute.SubnetworkArgs{
* Name: pulumi.String("l7lb-test-subnetwork"),
* IpCidrRange: pulumi.String("10.0.0.0/22"),
* Region: pulumi.String("us-central1"),
* Purpose: pulumi.String("REGIONAL_MANAGED_PROXY"),
* Role: pulumi.String("ACTIVE"),
* Network: custom_test.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.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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("l7lb-test-network")
* .autoCreateSubnetworks(false)
* .build());
* var network_for_l7lb = new Subnetwork("network-for-l7lb", SubnetworkArgs.builder()
* .name("l7lb-test-subnetwork")
* .ipCidrRange("10.0.0.0/22")
* .region("us-central1")
* .purpose("REGIONAL_MANAGED_PROXY")
* .role("ACTIVE")
* .network(custom_test.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* network-for-l7lb:
* type: gcp:compute:Subnetwork
* properties:
* name: l7lb-test-subnetwork
* ipCidrRange: 10.0.0.0/22
* region: us-central1
* purpose: REGIONAL_MANAGED_PROXY
* role: ACTIVE
* network: ${["custom-test"].id}
* custom-test:
* type: gcp:compute:Network
* properties:
* name: l7lb-test-network
* autoCreateSubnetworks: false
* ```
*
* ### Subnetwork Ipv6
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "ipv6-test-network",
* autoCreateSubnetworks: false,
* });
* const subnetwork_ipv6 = new gcp.compute.Subnetwork("subnetwork-ipv6", {
* name: "ipv6-test-subnetwork",
* ipCidrRange: "10.0.0.0/22",
* region: "us-west2",
* stackType: "IPV4_IPV6",
* ipv6AccessType: "EXTERNAL",
* network: custom_test.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="ipv6-test-network",
* auto_create_subnetworks=False)
* subnetwork_ipv6 = gcp.compute.Subnetwork("subnetwork-ipv6",
* name="ipv6-test-subnetwork",
* ip_cidr_range="10.0.0.0/22",
* region="us-west2",
* stack_type="IPV4_IPV6",
* ipv6_access_type="EXTERNAL",
* network=custom_test.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "ipv6-test-network",
* AutoCreateSubnetworks = false,
* });
* var subnetwork_ipv6 = new Gcp.Compute.Subnetwork("subnetwork-ipv6", new()
* {
* Name = "ipv6-test-subnetwork",
* IpCidrRange = "10.0.0.0/22",
* Region = "us-west2",
* StackType = "IPV4_IPV6",
* Ipv6AccessType = "EXTERNAL",
* Network = custom_test.Id,
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("ipv6-test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "subnetwork-ipv6", &compute.SubnetworkArgs{
* Name: pulumi.String("ipv6-test-subnetwork"),
* IpCidrRange: pulumi.String("10.0.0.0/22"),
* Region: pulumi.String("us-west2"),
* StackType: pulumi.String("IPV4_IPV6"),
* Ipv6AccessType: pulumi.String("EXTERNAL"),
* Network: custom_test.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.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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("ipv6-test-network")
* .autoCreateSubnetworks(false)
* .build());
* var subnetwork_ipv6 = new Subnetwork("subnetwork-ipv6", SubnetworkArgs.builder()
* .name("ipv6-test-subnetwork")
* .ipCidrRange("10.0.0.0/22")
* .region("us-west2")
* .stackType("IPV4_IPV6")
* .ipv6AccessType("EXTERNAL")
* .network(custom_test.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* subnetwork-ipv6:
* type: gcp:compute:Subnetwork
* properties:
* name: ipv6-test-subnetwork
* ipCidrRange: 10.0.0.0/22
* region: us-west2
* stackType: IPV4_IPV6
* ipv6AccessType: EXTERNAL
* network: ${["custom-test"].id}
* custom-test:
* type: gcp:compute:Network
* properties:
* name: ipv6-test-network
* autoCreateSubnetworks: false
* ```
*
* ### Subnetwork Internal Ipv6
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "internal-ipv6-test-network",
* autoCreateSubnetworks: false,
* enableUlaInternalIpv6: true,
* });
* const subnetwork_internal_ipv6 = new gcp.compute.Subnetwork("subnetwork-internal-ipv6", {
* name: "internal-ipv6-test-subnetwork",
* ipCidrRange: "10.0.0.0/22",
* region: "us-west2",
* stackType: "IPV4_IPV6",
* ipv6AccessType: "INTERNAL",
* network: custom_test.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="internal-ipv6-test-network",
* auto_create_subnetworks=False,
* enable_ula_internal_ipv6=True)
* subnetwork_internal_ipv6 = gcp.compute.Subnetwork("subnetwork-internal-ipv6",
* name="internal-ipv6-test-subnetwork",
* ip_cidr_range="10.0.0.0/22",
* region="us-west2",
* stack_type="IPV4_IPV6",
* ipv6_access_type="INTERNAL",
* network=custom_test.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "internal-ipv6-test-network",
* AutoCreateSubnetworks = false,
* EnableUlaInternalIpv6 = true,
* });
* var subnetwork_internal_ipv6 = new Gcp.Compute.Subnetwork("subnetwork-internal-ipv6", new()
* {
* Name = "internal-ipv6-test-subnetwork",
* IpCidrRange = "10.0.0.0/22",
* Region = "us-west2",
* StackType = "IPV4_IPV6",
* Ipv6AccessType = "INTERNAL",
* Network = custom_test.Id,
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("internal-ipv6-test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* EnableUlaInternalIpv6: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "subnetwork-internal-ipv6", &compute.SubnetworkArgs{
* Name: pulumi.String("internal-ipv6-test-subnetwork"),
* IpCidrRange: pulumi.String("10.0.0.0/22"),
* Region: pulumi.String("us-west2"),
* StackType: pulumi.String("IPV4_IPV6"),
* Ipv6AccessType: pulumi.String("INTERNAL"),
* Network: custom_test.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.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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("internal-ipv6-test-network")
* .autoCreateSubnetworks(false)
* .enableUlaInternalIpv6(true)
* .build());
* var subnetwork_internal_ipv6 = new Subnetwork("subnetwork-internal-ipv6", SubnetworkArgs.builder()
* .name("internal-ipv6-test-subnetwork")
* .ipCidrRange("10.0.0.0/22")
* .region("us-west2")
* .stackType("IPV4_IPV6")
* .ipv6AccessType("INTERNAL")
* .network(custom_test.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* subnetwork-internal-ipv6:
* type: gcp:compute:Subnetwork
* properties:
* name: internal-ipv6-test-subnetwork
* ipCidrRange: 10.0.0.0/22
* region: us-west2
* stackType: IPV4_IPV6
* ipv6AccessType: INTERNAL
* network: ${["custom-test"].id}
* custom-test:
* type: gcp:compute:Network
* properties:
* name: internal-ipv6-test-network
* autoCreateSubnetworks: false
* enableUlaInternalIpv6: true
* ```
*
* ### Subnetwork Purpose Private Nat
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const custom_test = new gcp.compute.Network("custom-test", {
* name: "subnet-purpose-test-network",
* autoCreateSubnetworks: false,
* });
* const subnetwork_purpose_private_nat = new gcp.compute.Subnetwork("subnetwork-purpose-private-nat", {
* name: "subnet-purpose-test-subnetwork",
* region: "us-west2",
* ipCidrRange: "192.168.1.0/24",
* purpose: "PRIVATE_NAT",
* network: custom_test.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* custom_test = gcp.compute.Network("custom-test",
* name="subnet-purpose-test-network",
* auto_create_subnetworks=False)
* subnetwork_purpose_private_nat = gcp.compute.Subnetwork("subnetwork-purpose-private-nat",
* name="subnet-purpose-test-subnetwork",
* region="us-west2",
* ip_cidr_range="192.168.1.0/24",
* purpose="PRIVATE_NAT",
* network=custom_test.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var custom_test = new Gcp.Compute.Network("custom-test", new()
* {
* Name = "subnet-purpose-test-network",
* AutoCreateSubnetworks = false,
* });
* var subnetwork_purpose_private_nat = new Gcp.Compute.Subnetwork("subnetwork-purpose-private-nat", new()
* {
* Name = "subnet-purpose-test-subnetwork",
* Region = "us-west2",
* IpCidrRange = "192.168.1.0/24",
* Purpose = "PRIVATE_NAT",
* Network = custom_test.Id,
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "custom-test", &compute.NetworkArgs{
* Name: pulumi.String("subnet-purpose-test-network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "subnetwork-purpose-private-nat", &compute.SubnetworkArgs{
* Name: pulumi.String("subnet-purpose-test-subnetwork"),
* Region: pulumi.String("us-west2"),
* IpCidrRange: pulumi.String("192.168.1.0/24"),
* Purpose: pulumi.String("PRIVATE_NAT"),
* Network: custom_test.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.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 custom_test = new Network("custom-test", NetworkArgs.builder()
* .name("subnet-purpose-test-network")
* .autoCreateSubnetworks(false)
* .build());
* var subnetwork_purpose_private_nat = new Subnetwork("subnetwork-purpose-private-nat", SubnetworkArgs.builder()
* .name("subnet-purpose-test-subnetwork")
* .region("us-west2")
* .ipCidrRange("192.168.1.0/24")
* .purpose("PRIVATE_NAT")
* .network(custom_test.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* subnetwork-purpose-private-nat:
* type: gcp:compute:Subnetwork
* properties:
* name: subnet-purpose-test-subnetwork
* region: us-west2
* ipCidrRange: 192.168.1.0/24
* purpose: PRIVATE_NAT
* network: ${["custom-test"].id}
* custom-test:
* type: gcp:compute:Network
* properties:
* name: subnet-purpose-test-network
* autoCreateSubnetworks: false
* ```
*
* ### Subnetwork Cidr Overlap
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const net_cidr_overlap = new gcp.compute.Network("net-cidr-overlap", {
* name: "net-cidr-overlap",
* autoCreateSubnetworks: false,
* });
* const subnetwork_cidr_overlap = new gcp.compute.Subnetwork("subnetwork-cidr-overlap", {
* name: "subnet-cidr-overlap",
* region: "us-west2",
* ipCidrRange: "192.168.1.0/24",
* allowSubnetCidrRoutesOverlap: true,
* network: net_cidr_overlap.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* net_cidr_overlap = gcp.compute.Network("net-cidr-overlap",
* name="net-cidr-overlap",
* auto_create_subnetworks=False)
* subnetwork_cidr_overlap = gcp.compute.Subnetwork("subnetwork-cidr-overlap",
* name="subnet-cidr-overlap",
* region="us-west2",
* ip_cidr_range="192.168.1.0/24",
* allow_subnet_cidr_routes_overlap=True,
* network=net_cidr_overlap.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var net_cidr_overlap = new Gcp.Compute.Network("net-cidr-overlap", new()
* {
* Name = "net-cidr-overlap",
* AutoCreateSubnetworks = false,
* });
* var subnetwork_cidr_overlap = new Gcp.Compute.Subnetwork("subnetwork-cidr-overlap", new()
* {
* Name = "subnet-cidr-overlap",
* Region = "us-west2",
* IpCidrRange = "192.168.1.0/24",
* AllowSubnetCidrRoutesOverlap = true,
* Network = net_cidr_overlap.Id,
* });
* });
* ```
* ```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 {
* _, err := compute.NewNetwork(ctx, "net-cidr-overlap", &compute.NetworkArgs{
* Name: pulumi.String("net-cidr-overlap"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewSubnetwork(ctx, "subnetwork-cidr-overlap", &compute.SubnetworkArgs{
* Name: pulumi.String("subnet-cidr-overlap"),
* Region: pulumi.String("us-west2"),
* IpCidrRange: pulumi.String("192.168.1.0/24"),
* AllowSubnetCidrRoutesOverlap: pulumi.Bool(true),
* Network: net_cidr_overlap.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.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 net_cidr_overlap = new Network("net-cidr-overlap", NetworkArgs.builder()
* .name("net-cidr-overlap")
* .autoCreateSubnetworks(false)
* .build());
* var subnetwork_cidr_overlap = new Subnetwork("subnetwork-cidr-overlap", SubnetworkArgs.builder()
* .name("subnet-cidr-overlap")
* .region("us-west2")
* .ipCidrRange("192.168.1.0/24")
* .allowSubnetCidrRoutesOverlap(true)
* .network(net_cidr_overlap.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* subnetwork-cidr-overlap:
* type: gcp:compute:Subnetwork
* properties:
* name: subnet-cidr-overlap
* region: us-west2
* ipCidrRange: 192.168.1.0/24
* allowSubnetCidrRoutesOverlap: true
* network: ${["net-cidr-overlap"].id}
* net-cidr-overlap:
* type: gcp:compute:Network
* properties:
* name: net-cidr-overlap
* autoCreateSubnetworks: false
* ```
*
* ## Import
* Subnetwork can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/subnetworks/{{name}}`
* * `{{project}}/{{region}}/{{name}}`
* * `{{region}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, Subnetwork can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/subnetwork:Subnetwork default projects/{{project}}/regions/{{region}}/subnetworks/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/subnetwork:Subnetwork default {{project}}/{{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/subnetwork:Subnetwork default {{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/subnetwork:Subnetwork default {{name}}
* ```
* @property allowSubnetCidrRoutesOverlap Typically packets destined to IPs within the subnetwork range that do not match
* existing resources are dropped and prevented from leaving the VPC.
* Setting this field to true will allow these packets to match dynamic routes injected
* via BGP even if their destinations match existing subnet ranges.
* @property description An optional description of this resource. Provide this property when
* you create the resource. This field can be set only at resource
* creation time.
* @property externalIpv6Prefix The range of external IPv6 addresses that are owned by this subnetwork.
* @property ipCidrRange The range of internal addresses that are owned by this subnetwork.
* Provide this property when you create the subnetwork. For example,
* 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
* non-overlapping within a network. Only IPv4 is supported.
* @property ipv6AccessType The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation
* or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
* cannot enable direct path.
* Possible values are: `EXTERNAL`, `INTERNAL`.
* @property logConfig This field denotes the VPC flow logging options for this subnetwork. If
* logging is enabled, logs are exported to Cloud Logging. Flow logging
* isn't supported if the subnet `purpose` field is set to subnetwork is
* `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
* Structure is documented below.
* @property name The name of the resource, provided by the client when initially
* creating the resource. 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 network The network this subnet belongs to.
* Only networks that are in the distributed mode can have subnetworks.
* - - -
* @property privateIpGoogleAccess When enabled, VMs in this subnetwork without external IP addresses can
* access Google APIs and services by using Private Google Access.
* @property privateIpv6GoogleAccess The private IPv6 google access type for the VMs in this subnet.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property purpose The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, `PRIVATE_SERVICE_CONNECT` or `PRIVATE_NAT`.
* A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
* A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
* A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
* A subnetwork with purpose set to `PRIVATE_NAT` is used as source range for Private NAT gateways.
* Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
* If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
* @property region The GCP region for this subnetwork.
* @property role The role of subnetwork.
* Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
* The value can be set to `ACTIVE` or `BACKUP`.
* An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
* A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
* Possible values are: `ACTIVE`, `BACKUP`.
* @property secondaryIpRanges An array of configurations for secondary IP ranges for VM instances
* contained in this subnetwork. The primary IP of such VM must belong
* to the primary ipCidrRange of the subnetwork. The alias IPs may belong
* to either primary or secondary ranges.
* Structure is documented below.
* @property stackType The stack type for this subnet to identify whether the IPv6 feature is enabled or not.
* If not specified IPV4_ONLY will be used.
* Possible values are: `IPV4_ONLY`, `IPV4_IPV6`.
*/
public data class SubnetworkArgs(
public val allowSubnetCidrRoutesOverlap: Output? = null,
public val description: Output? = null,
public val externalIpv6Prefix: Output? = null,
public val ipCidrRange: Output? = null,
public val ipv6AccessType: Output? = null,
public val logConfig: Output? = null,
public val name: Output? = null,
public val network: Output? = null,
public val privateIpGoogleAccess: Output? = null,
public val privateIpv6GoogleAccess: Output? = null,
public val project: Output? = null,
public val purpose: Output? = null,
public val region: Output? = null,
public val role: Output? = null,
public val secondaryIpRanges: Output>? = null,
public val stackType: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.SubnetworkArgs =
com.pulumi.gcp.compute.SubnetworkArgs.builder()
.allowSubnetCidrRoutesOverlap(allowSubnetCidrRoutesOverlap?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.externalIpv6Prefix(externalIpv6Prefix?.applyValue({ args0 -> args0 }))
.ipCidrRange(ipCidrRange?.applyValue({ args0 -> args0 }))
.ipv6AccessType(ipv6AccessType?.applyValue({ args0 -> args0 }))
.logConfig(logConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.network(network?.applyValue({ args0 -> args0 }))
.privateIpGoogleAccess(privateIpGoogleAccess?.applyValue({ args0 -> args0 }))
.privateIpv6GoogleAccess(privateIpv6GoogleAccess?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.purpose(purpose?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.role(role?.applyValue({ args0 -> args0 }))
.secondaryIpRanges(
secondaryIpRanges?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.stackType(stackType?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SubnetworkArgs].
*/
@PulumiTagMarker
public class SubnetworkArgsBuilder internal constructor() {
private var allowSubnetCidrRoutesOverlap: Output? = null
private var description: Output? = null
private var externalIpv6Prefix: Output? = null
private var ipCidrRange: Output? = null
private var ipv6AccessType: Output? = null
private var logConfig: Output? = null
private var name: Output? = null
private var network: Output? = null
private var privateIpGoogleAccess: Output? = null
private var privateIpv6GoogleAccess: Output? = null
private var project: Output? = null
private var purpose: Output? = null
private var region: Output? = null
private var role: Output? = null
private var secondaryIpRanges: Output>? = null
private var stackType: Output? = null
/**
* @param value Typically packets destined to IPs within the subnetwork range that do not match
* existing resources are dropped and prevented from leaving the VPC.
* Setting this field to true will allow these packets to match dynamic routes injected
* via BGP even if their destinations match existing subnet ranges.
*/
@JvmName("laxcphigbljrraqw")
public suspend fun allowSubnetCidrRoutesOverlap(`value`: Output) {
this.allowSubnetCidrRoutesOverlap = value
}
/**
* @param value An optional description of this resource. Provide this property when
* you create the resource. This field can be set only at resource
* creation time.
*/
@JvmName("ropsrpdytqouieat")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The range of external IPv6 addresses that are owned by this subnetwork.
*/
@JvmName("rhrlmtfllyfrhhtv")
public suspend fun externalIpv6Prefix(`value`: Output) {
this.externalIpv6Prefix = value
}
/**
* @param value The range of internal addresses that are owned by this subnetwork.
* Provide this property when you create the subnetwork. For example,
* 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
* non-overlapping within a network. Only IPv4 is supported.
*/
@JvmName("iiolmdpjqudsnuvc")
public suspend fun ipCidrRange(`value`: Output) {
this.ipCidrRange = value
}
/**
* @param value The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation
* or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet
* cannot enable direct path.
* Possible values are: `EXTERNAL`, `INTERNAL`.
*/
@JvmName("qmjilihnkttqbqsi")
public suspend fun ipv6AccessType(`value`: Output) {
this.ipv6AccessType = value
}
/**
* @param value This field denotes the VPC flow logging options for this subnetwork. If
* logging is enabled, logs are exported to Cloud Logging. Flow logging
* isn't supported if the subnet `purpose` field is set to subnetwork is
* `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.
* Structure is documented below.
*/
@JvmName("prnllrolgctibylq")
public suspend fun logConfig(`value`: Output) {
this.logConfig = value
}
/**
* @param value The name of the resource, provided by the client when initially
* creating the resource. 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("bfunghgqjssdrkwt")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The network this subnet belongs to.
* Only networks that are in the distributed mode can have subnetworks.
* - - -
*/
@JvmName("sgpxqmuludgemnli")
public suspend fun network(`value`: Output) {
this.network = value
}
/**
* @param value When enabled, VMs in this subnetwork without external IP addresses can
* access Google APIs and services by using Private Google Access.
*/
@JvmName("ngffuuitbqltlyvg")
public suspend fun privateIpGoogleAccess(`value`: Output) {
this.privateIpGoogleAccess = value
}
/**
* @param value The private IPv6 google access type for the VMs in this subnet.
*/
@JvmName("igbyvihcrqtmyoml")
public suspend fun privateIpv6GoogleAccess(`value`: Output) {
this.privateIpv6GoogleAccess = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("vkmmmahjptbseams")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY`, `PRIVATE_SERVICE_CONNECT` or `PRIVATE_NAT`.
* A subnet with purpose set to `REGIONAL_MANAGED_PROXY` is a user-created subnetwork that is reserved for regional Envoy-based load balancers.
* A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
* A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
* A subnetwork with purpose set to `PRIVATE_NAT` is used as source range for Private NAT gateways.
* Note that `REGIONAL_MANAGED_PROXY` is the preferred setting for all regional Envoy load balancers.
* If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
*/
@JvmName("oiscwaovjefytmfy")
public suspend fun purpose(`value`: Output) {
this.purpose = value
}
/**
* @param value The GCP region for this subnetwork.
*/
@JvmName("avcvatdlmixswgdr")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value The role of subnetwork.
* Currently, this field is only used when `purpose` is `REGIONAL_MANAGED_PROXY`.
* The value can be set to `ACTIVE` or `BACKUP`.
* An `ACTIVE` subnetwork is one that is currently being used for Envoy-based load balancers in a region.
* A `BACKUP` subnetwork is one that is ready to be promoted to `ACTIVE` or is currently draining.
* Possible values are: `ACTIVE`, `BACKUP`.
*/
@JvmName("fwjclumbmbpqbrdo")
public suspend fun role(`value`: Output) {
this.role = value
}
/**
* @param value An array of configurations for secondary IP ranges for VM instances
* contained in this subnetwork. The primary IP of such VM must belong
* to the primary ipCidrRange of the subnetwork. The alias IPs may belong
* to either primary or secondary ranges.
* Structure is documented below.
*/
@JvmName("xigbmkfnckuheudr")
public suspend fun secondaryIpRanges(`value`: Output>) {
this.secondaryIpRanges = value
}
@JvmName("dhqbfnsswbqdicqy")
public suspend fun secondaryIpRanges(vararg values: Output) {
this.secondaryIpRanges = Output.all(values.asList())
}
/**
* @param values An array of configurations for secondary IP ranges for VM instances
* contained in this subnetwork. The primary IP of such VM must belong
* to the primary ipCidrRange of the subnetwork. The alias IPs may belong
* to either primary or secondary ranges.
* Structure is documented below.
*/
@JvmName("cqmdgsdmhdrshlhx")
public suspend fun secondaryIpRanges(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy