com.pulumi.gcp.compute.kotlin.NetworkArgs.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.NetworkArgs.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.jvm.JvmName
/**
* Manages a VPC network or legacy network resource on GCP.
* To get more information about Network, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/networks)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/vpc/docs/vpc)
* ## Example Usage
* ### Network Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {name: "vpc-network"});
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network", name="vpc-network")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Name = "vpc-network",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Name: pulumi.String("vpc-network"),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .name("vpc-network")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* name: vpc-network
* ```
*
* ### Network Custom Mtu
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {
* project: "my-project-name",
* name: "vpc-network",
* autoCreateSubnetworks: true,
* mtu: 1460,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network",
* project="my-project-name",
* name="vpc-network",
* auto_create_subnetworks=True,
* mtu=1460)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Project = "my-project-name",
* Name = "vpc-network",
* AutoCreateSubnetworks = true,
* Mtu = 1460,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("vpc-network"),
* AutoCreateSubnetworks: pulumi.Bool(true),
* Mtu: pulumi.Int(1460),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .project("my-project-name")
* .name("vpc-network")
* .autoCreateSubnetworks(true)
* .mtu(1460)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* project: my-project-name
* name: vpc-network
* autoCreateSubnetworks: true
* mtu: 1460
* ```
*
* ### Network Custom Firewall Enforcement Order
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {
* project: "my-project-name",
* name: "vpc-network",
* autoCreateSubnetworks: true,
* networkFirewallPolicyEnforcementOrder: "BEFORE_CLASSIC_FIREWALL",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network",
* project="my-project-name",
* name="vpc-network",
* auto_create_subnetworks=True,
* network_firewall_policy_enforcement_order="BEFORE_CLASSIC_FIREWALL")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Project = "my-project-name",
* Name = "vpc-network",
* AutoCreateSubnetworks = true,
* NetworkFirewallPolicyEnforcementOrder = "BEFORE_CLASSIC_FIREWALL",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("vpc-network"),
* AutoCreateSubnetworks: pulumi.Bool(true),
* NetworkFirewallPolicyEnforcementOrder: pulumi.String("BEFORE_CLASSIC_FIREWALL"),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .project("my-project-name")
* .name("vpc-network")
* .autoCreateSubnetworks(true)
* .networkFirewallPolicyEnforcementOrder("BEFORE_CLASSIC_FIREWALL")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* project: my-project-name
* name: vpc-network
* autoCreateSubnetworks: true
* networkFirewallPolicyEnforcementOrder: BEFORE_CLASSIC_FIREWALL
* ```
*
* ### Network Bgp Best Path Selection Mode
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {
* project: "my-project-name",
* name: "vpc-network",
* routingMode: "GLOBAL",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network",
* project="my-project-name",
* name="vpc-network",
* routing_mode="GLOBAL")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Project = "my-project-name",
* Name = "vpc-network",
* RoutingMode = "GLOBAL",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("vpc-network"),
* RoutingMode: pulumi.String("GLOBAL"),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .project("my-project-name")
* .name("vpc-network")
* .routingMode("GLOBAL")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* project: my-project-name
* name: vpc-network
* routingMode: GLOBAL
* ```
*
* ### Network Bgp Best Path Selection Mode Standard
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {
* project: "my-project-name",
* name: "vpc-network",
* routingMode: "GLOBAL",
* bgpBestPathSelectionMode: "STANDARD",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network",
* project="my-project-name",
* name="vpc-network",
* routing_mode="GLOBAL",
* bgp_best_path_selection_mode="STANDARD")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Project = "my-project-name",
* Name = "vpc-network",
* RoutingMode = "GLOBAL",
* BgpBestPathSelectionMode = "STANDARD",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("vpc-network"),
* RoutingMode: pulumi.String("GLOBAL"),
* BgpBestPathSelectionMode: pulumi.String("STANDARD"),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .project("my-project-name")
* .name("vpc-network")
* .routingMode("GLOBAL")
* .bgpBestPathSelectionMode("STANDARD")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* project: my-project-name
* name: vpc-network
* routingMode: GLOBAL
* bgpBestPathSelectionMode: STANDARD
* ```
*
* ### Network Bgp Best Path Selection Mode Standard Custom Fields
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const vpcNetwork = new gcp.compute.Network("vpc_network", {
* project: "my-project-name",
* name: "vpc-network",
* routingMode: "GLOBAL",
* bgpBestPathSelectionMode: "STANDARD",
* bgpAlwaysCompareMed: true,
* bgpInterRegionCost: "ADD_COST_TO_MED",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* vpc_network = gcp.compute.Network("vpc_network",
* project="my-project-name",
* name="vpc-network",
* routing_mode="GLOBAL",
* bgp_best_path_selection_mode="STANDARD",
* bgp_always_compare_med=True,
* bgp_inter_region_cost="ADD_COST_TO_MED")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var vpcNetwork = new Gcp.Compute.Network("vpc_network", new()
* {
* Project = "my-project-name",
* Name = "vpc-network",
* RoutingMode = "GLOBAL",
* BgpBestPathSelectionMode = "STANDARD",
* BgpAlwaysCompareMed = true,
* BgpInterRegionCost = "ADD_COST_TO_MED",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "vpc_network", &compute.NetworkArgs{
* Project: pulumi.String("my-project-name"),
* Name: pulumi.String("vpc-network"),
* RoutingMode: pulumi.String("GLOBAL"),
* BgpBestPathSelectionMode: pulumi.String("STANDARD"),
* BgpAlwaysCompareMed: pulumi.Bool(true),
* BgpInterRegionCost: pulumi.String("ADD_COST_TO_MED"),
* })
* 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 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 vpcNetwork = new Network("vpcNetwork", NetworkArgs.builder()
* .project("my-project-name")
* .name("vpc-network")
* .routingMode("GLOBAL")
* .bgpBestPathSelectionMode("STANDARD")
* .bgpAlwaysCompareMed(true)
* .bgpInterRegionCost("ADD_COST_TO_MED")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcNetwork:
* type: gcp:compute:Network
* name: vpc_network
* properties:
* project: my-project-name
* name: vpc-network
* routingMode: GLOBAL
* bgpBestPathSelectionMode: STANDARD
* bgpAlwaysCompareMed: true
* bgpInterRegionCost: ADD_COST_TO_MED
* ```
*
* ## Import
* Network can be imported using any of these accepted formats:
* * `projects/{{project}}/global/networks/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, Network can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/network:Network default projects/{{project}}/global/networks/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/network:Network default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/network:Network default {{name}}
* ```
* @property autoCreateSubnetworks When set to `true`, the network is created in "auto subnet mode" and
* it will create a subnet for each region automatically across the
* `10.128.0.0/9` address range.
* When set to `false`, the network is created in "custom subnet mode" so
* the user can explicitly connect subnetwork resources.
* @property bgpAlwaysCompareMed Enables/disables the comparison of MED across routes with different Neighbor ASNs.
* This value can only be set if the --bgp-best-path-selection-mode is STANDARD
* @property bgpBestPathSelectionMode The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD.
* Possible values are: `LEGACY`, `STANDARD`.
* @property bgpInterRegionCost Choice of the behavior of inter-regional cost and MED in the BPS algorithm.
* Possible values are: `DEFAULT`, `ADD_COST_TO_MED`.
* @property deleteDefaultRoutesOnCreate If set to `true`, default routes (`0.0.0.0/0`) will be deleted
* immediately after network creation. Defaults to `false`.
* @property description An optional description of this resource. The resource must be
* recreated to modify this field.
* @property enableUlaInternalIpv6 Enable ULA internal ipv6 on this network. Enabling this feature will assign
* a /48 from google defined ULA prefix fd20::/20.
* @property internalIpv6Range When enabling ula internal ipv6, caller optionally can specify the /48 range
* they want from the google defined ULA prefix fd20::/20. The input must be a
* valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
* fail if the speficied /48 is already in used by another resource.
* If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
* @property mtu Maximum Transmission Unit in bytes. The default value is 1460 bytes.
* The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
* Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
* with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
* with varying MTUs.
* @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 networkFirewallPolicyEnforcementOrder Set the order that Firewall Rules and Firewall Policies are evaluated.
* Default value is `AFTER_CLASSIC_FIREWALL`.
* Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
* @property networkProfile A full or partial URL of the network profile to apply to this network.
* This field can be set only at resource creation time. For example, the
* following are valid URLs:
* * https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
* * projects/{projectId}/global/networkProfiles/{network_profile_name}
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property routingMode The network-wide routing mode to use. If set to `REGIONAL`, this
* network's cloud routers will only advertise routes with subnetworks
* of this network in the same region as the router. If set to `GLOBAL`,
* this network's cloud routers will advertise routes with all
* subnetworks of this network, across regions.
* Possible values are: `REGIONAL`, `GLOBAL`.
*/
public data class NetworkArgs(
public val autoCreateSubnetworks: Output? = null,
public val bgpAlwaysCompareMed: Output? = null,
public val bgpBestPathSelectionMode: Output? = null,
public val bgpInterRegionCost: Output? = null,
public val deleteDefaultRoutesOnCreate: Output? = null,
public val description: Output? = null,
public val enableUlaInternalIpv6: Output? = null,
public val internalIpv6Range: Output? = null,
public val mtu: Output? = null,
public val name: Output? = null,
public val networkFirewallPolicyEnforcementOrder: Output? = null,
public val networkProfile: Output? = null,
public val project: Output? = null,
public val routingMode: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.NetworkArgs =
com.pulumi.gcp.compute.NetworkArgs.builder()
.autoCreateSubnetworks(autoCreateSubnetworks?.applyValue({ args0 -> args0 }))
.bgpAlwaysCompareMed(bgpAlwaysCompareMed?.applyValue({ args0 -> args0 }))
.bgpBestPathSelectionMode(bgpBestPathSelectionMode?.applyValue({ args0 -> args0 }))
.bgpInterRegionCost(bgpInterRegionCost?.applyValue({ args0 -> args0 }))
.deleteDefaultRoutesOnCreate(deleteDefaultRoutesOnCreate?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.enableUlaInternalIpv6(enableUlaInternalIpv6?.applyValue({ args0 -> args0 }))
.internalIpv6Range(internalIpv6Range?.applyValue({ args0 -> args0 }))
.mtu(mtu?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.networkFirewallPolicyEnforcementOrder(
networkFirewallPolicyEnforcementOrder?.applyValue({ args0 ->
args0
}),
)
.networkProfile(networkProfile?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.routingMode(routingMode?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [NetworkArgs].
*/
@PulumiTagMarker
public class NetworkArgsBuilder internal constructor() {
private var autoCreateSubnetworks: Output? = null
private var bgpAlwaysCompareMed: Output? = null
private var bgpBestPathSelectionMode: Output? = null
private var bgpInterRegionCost: Output? = null
private var deleteDefaultRoutesOnCreate: Output? = null
private var description: Output? = null
private var enableUlaInternalIpv6: Output? = null
private var internalIpv6Range: Output? = null
private var mtu: Output? = null
private var name: Output? = null
private var networkFirewallPolicyEnforcementOrder: Output? = null
private var networkProfile: Output? = null
private var project: Output? = null
private var routingMode: Output? = null
/**
* @param value When set to `true`, the network is created in "auto subnet mode" and
* it will create a subnet for each region automatically across the
* `10.128.0.0/9` address range.
* When set to `false`, the network is created in "custom subnet mode" so
* the user can explicitly connect subnetwork resources.
*/
@JvmName("ljslhkypgmikhjbi")
public suspend fun autoCreateSubnetworks(`value`: Output) {
this.autoCreateSubnetworks = value
}
/**
* @param value Enables/disables the comparison of MED across routes with different Neighbor ASNs.
* This value can only be set if the --bgp-best-path-selection-mode is STANDARD
*/
@JvmName("ciqjpobbqumntkdt")
public suspend fun bgpAlwaysCompareMed(`value`: Output) {
this.bgpAlwaysCompareMed = value
}
/**
* @param value The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD.
* Possible values are: `LEGACY`, `STANDARD`.
*/
@JvmName("wooojhxidayvaeey")
public suspend fun bgpBestPathSelectionMode(`value`: Output) {
this.bgpBestPathSelectionMode = value
}
/**
* @param value Choice of the behavior of inter-regional cost and MED in the BPS algorithm.
* Possible values are: `DEFAULT`, `ADD_COST_TO_MED`.
*/
@JvmName("fpljdavkjnehvdaq")
public suspend fun bgpInterRegionCost(`value`: Output) {
this.bgpInterRegionCost = value
}
/**
* @param value If set to `true`, default routes (`0.0.0.0/0`) will be deleted
* immediately after network creation. Defaults to `false`.
*/
@JvmName("bgaoctydebcvnbyo")
public suspend fun deleteDefaultRoutesOnCreate(`value`: Output) {
this.deleteDefaultRoutesOnCreate = value
}
/**
* @param value An optional description of this resource. The resource must be
* recreated to modify this field.
*/
@JvmName("edggcqpgkgykidbq")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Enable ULA internal ipv6 on this network. Enabling this feature will assign
* a /48 from google defined ULA prefix fd20::/20.
*/
@JvmName("nnsbsoepaytraoeu")
public suspend fun enableUlaInternalIpv6(`value`: Output) {
this.enableUlaInternalIpv6 = value
}
/**
* @param value When enabling ula internal ipv6, caller optionally can specify the /48 range
* they want from the google defined ULA prefix fd20::/20. The input must be a
* valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
* fail if the speficied /48 is already in used by another resource.
* If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
*/
@JvmName("qhrrwgmyecjwrvvc")
public suspend fun internalIpv6Range(`value`: Output) {
this.internalIpv6Range = value
}
/**
* @param value Maximum Transmission Unit in bytes. The default value is 1460 bytes.
* The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
* Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
* with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
* with varying MTUs.
*/
@JvmName("wmbmqlnllwkrhfws")
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("tfhmoetvuafonopa")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Set the order that Firewall Rules and Firewall Policies are evaluated.
* Default value is `AFTER_CLASSIC_FIREWALL`.
* Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
*/
@JvmName("nfwmcknennwnyyah")
public suspend fun networkFirewallPolicyEnforcementOrder(`value`: Output) {
this.networkFirewallPolicyEnforcementOrder = value
}
/**
* @param value A full or partial URL of the network profile to apply to this network.
* This field can be set only at resource creation time. For example, the
* following are valid URLs:
* * https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
* * projects/{projectId}/global/networkProfiles/{network_profile_name}
*/
@JvmName("kagqljmxxfmkwbrf")
public suspend fun networkProfile(`value`: Output) {
this.networkProfile = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("towasxtyojvohmxv")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The network-wide routing mode to use. If set to `REGIONAL`, this
* network's cloud routers will only advertise routes with subnetworks
* of this network in the same region as the router. If set to `GLOBAL`,
* this network's cloud routers will advertise routes with all
* subnetworks of this network, across regions.
* Possible values are: `REGIONAL`, `GLOBAL`.
*/
@JvmName("sbjseewyerajtmcg")
public suspend fun routingMode(`value`: Output) {
this.routingMode = value
}
/**
* @param value When set to `true`, the network is created in "auto subnet mode" and
* it will create a subnet for each region automatically across the
* `10.128.0.0/9` address range.
* When set to `false`, the network is created in "custom subnet mode" so
* the user can explicitly connect subnetwork resources.
*/
@JvmName("alaxqsccmqgnpgwy")
public suspend fun autoCreateSubnetworks(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.autoCreateSubnetworks = mapped
}
/**
* @param value Enables/disables the comparison of MED across routes with different Neighbor ASNs.
* This value can only be set if the --bgp-best-path-selection-mode is STANDARD
*/
@JvmName("ejyjtwtvwackwthv")
public suspend fun bgpAlwaysCompareMed(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bgpAlwaysCompareMed = mapped
}
/**
* @param value The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD.
* Possible values are: `LEGACY`, `STANDARD`.
*/
@JvmName("iccvqmyifvqbapmi")
public suspend fun bgpBestPathSelectionMode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bgpBestPathSelectionMode = mapped
}
/**
* @param value Choice of the behavior of inter-regional cost and MED in the BPS algorithm.
* Possible values are: `DEFAULT`, `ADD_COST_TO_MED`.
*/
@JvmName("ldkrmwfcxdkmvlht")
public suspend fun bgpInterRegionCost(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bgpInterRegionCost = mapped
}
/**
* @param value If set to `true`, default routes (`0.0.0.0/0`) will be deleted
* immediately after network creation. Defaults to `false`.
*/
@JvmName("urlajonvbudrdygk")
public suspend fun deleteDefaultRoutesOnCreate(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteDefaultRoutesOnCreate = mapped
}
/**
* @param value An optional description of this resource. The resource must be
* recreated to modify this field.
*/
@JvmName("rhsravfhftdtrbyr")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Enable ULA internal ipv6 on this network. Enabling this feature will assign
* a /48 from google defined ULA prefix fd20::/20.
*/
@JvmName("lkkgdhrcuduielgw")
public suspend fun enableUlaInternalIpv6(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableUlaInternalIpv6 = mapped
}
/**
* @param value When enabling ula internal ipv6, caller optionally can specify the /48 range
* they want from the google defined ULA prefix fd20::/20. The input must be a
* valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will
* fail if the speficied /48 is already in used by another resource.
* If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field.
*/
@JvmName("yvbgpwhyeluytltp")
public suspend fun internalIpv6Range(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.internalIpv6Range = mapped
}
/**
* @param value Maximum Transmission Unit in bytes. The default value is 1460 bytes.
* The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames).
* Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped
* with an ICMP `Fragmentation-Needed` message if the packets are routed to the Internet or other VPCs
* with varying MTUs.
*/
@JvmName("axfptnvyavmyrusi")
public suspend fun mtu(`value`: Int?) {
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("kteoljjqhobotenw")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Set the order that Firewall Rules and Firewall Policies are evaluated.
* Default value is `AFTER_CLASSIC_FIREWALL`.
* Possible values are: `BEFORE_CLASSIC_FIREWALL`, `AFTER_CLASSIC_FIREWALL`.
*/
@JvmName("qxalcaryqtvjjhwx")
public suspend fun networkFirewallPolicyEnforcementOrder(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkFirewallPolicyEnforcementOrder = mapped
}
/**
* @param value A full or partial URL of the network profile to apply to this network.
* This field can be set only at resource creation time. For example, the
* following are valid URLs:
* * https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
* * projects/{projectId}/global/networkProfiles/{network_profile_name}
*/
@JvmName("lpwxewhqsimecybx")
public suspend fun networkProfile(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkProfile = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("jmscaqwrjbgumtqa")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value The network-wide routing mode to use. If set to `REGIONAL`, this
* network's cloud routers will only advertise routes with subnetworks
* of this network in the same region as the router. If set to `GLOBAL`,
* this network's cloud routers will advertise routes with all
* subnetworks of this network, across regions.
* Possible values are: `REGIONAL`, `GLOBAL`.
*/
@JvmName("oatsbsugtooseuom")
public suspend fun routingMode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.routingMode = mapped
}
internal fun build(): NetworkArgs = NetworkArgs(
autoCreateSubnetworks = autoCreateSubnetworks,
bgpAlwaysCompareMed = bgpAlwaysCompareMed,
bgpBestPathSelectionMode = bgpBestPathSelectionMode,
bgpInterRegionCost = bgpInterRegionCost,
deleteDefaultRoutesOnCreate = deleteDefaultRoutesOnCreate,
description = description,
enableUlaInternalIpv6 = enableUlaInternalIpv6,
internalIpv6Range = internalIpv6Range,
mtu = mtu,
name = name,
networkFirewallPolicyEnforcementOrder = networkFirewallPolicyEnforcementOrder,
networkProfile = networkProfile,
project = project,
routingMode = routingMode,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy