Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.network.kotlin.RouteServerArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.RouteServerArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Azure Route Server
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
* name: "example-vn",
* addressSpaces: ["10.0.0.0/16"],
* resourceGroupName: example.name,
* location: example.location,
* tags: {
* environment: "Production",
* },
* });
* const exampleSubnet = new azure.network.Subnet("example", {
* name: "RouteServerSubnet",
* virtualNetworkName: exampleVirtualNetwork.name,
* resourceGroupName: example.name,
* addressPrefixes: ["10.0.1.0/24"],
* });
* const examplePublicIp = new azure.network.PublicIp("example", {
* name: "example-pip",
* resourceGroupName: example.name,
* location: example.location,
* allocationMethod: "Static",
* sku: "Standard",
* });
* const exampleRouteServer = new azure.network.RouteServer("example", {
* name: "example-routerserver",
* resourceGroupName: example.name,
* location: example.location,
* sku: "Standard",
* publicIpAddressId: examplePublicIp.id,
* subnetId: exampleSubnet.id,
* branchToBranchTrafficEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_virtual_network = azure.network.VirtualNetwork("example",
* name="example-vn",
* address_spaces=["10.0.0.0/16"],
* resource_group_name=example.name,
* location=example.location,
* tags={
* "environment": "Production",
* })
* example_subnet = azure.network.Subnet("example",
* name="RouteServerSubnet",
* virtual_network_name=example_virtual_network.name,
* resource_group_name=example.name,
* address_prefixes=["10.0.1.0/24"])
* example_public_ip = azure.network.PublicIp("example",
* name="example-pip",
* resource_group_name=example.name,
* location=example.location,
* allocation_method="Static",
* sku="Standard")
* example_route_server = azure.network.RouteServer("example",
* name="example-routerserver",
* resource_group_name=example.name,
* location=example.location,
* sku="Standard",
* public_ip_address_id=example_public_ip.id,
* subnet_id=example_subnet.id,
* branch_to_branch_traffic_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
* {
* Name = "example-vn",
* AddressSpaces = new[]
* {
* "10.0.0.0/16",
* },
* ResourceGroupName = example.Name,
* Location = example.Location,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* var exampleSubnet = new Azure.Network.Subnet("example", new()
* {
* Name = "RouteServerSubnet",
* VirtualNetworkName = exampleVirtualNetwork.Name,
* ResourceGroupName = example.Name,
* AddressPrefixes = new[]
* {
* "10.0.1.0/24",
* },
* });
* var examplePublicIp = new Azure.Network.PublicIp("example", new()
* {
* Name = "example-pip",
* ResourceGroupName = example.Name,
* Location = example.Location,
* AllocationMethod = "Static",
* Sku = "Standard",
* });
* var exampleRouteServer = new Azure.Network.RouteServer("example", new()
* {
* Name = "example-routerserver",
* ResourceGroupName = example.Name,
* Location = example.Location,
* Sku = "Standard",
* PublicIpAddressId = examplePublicIp.Id,
* SubnetId = exampleSubnet.Id,
* BranchToBranchTrafficEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
* Name: pulumi.String("example-vn"),
* AddressSpaces: pulumi.StringArray{
* pulumi.String("10.0.0.0/16"),
* },
* ResourceGroupName: example.Name,
* Location: example.Location,
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* if err != nil {
* return err
* }
* exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
* Name: pulumi.String("RouteServerSubnet"),
* VirtualNetworkName: exampleVirtualNetwork.Name,
* ResourceGroupName: example.Name,
* AddressPrefixes: pulumi.StringArray{
* pulumi.String("10.0.1.0/24"),
* },
* })
* if err != nil {
* return err
* }
* examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
* Name: pulumi.String("example-pip"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* AllocationMethod: pulumi.String("Static"),
* Sku: pulumi.String("Standard"),
* })
* if err != nil {
* return err
* }
* _, err = network.NewRouteServer(ctx, "example", &network.RouteServerArgs{
* Name: pulumi.String("example-routerserver"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* Sku: pulumi.String("Standard"),
* PublicIpAddressId: examplePublicIp.ID(),
* SubnetId: exampleSubnet.ID(),
* BranchToBranchTrafficEnabled: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.network.VirtualNetwork;
* import com.pulumi.azure.network.VirtualNetworkArgs;
* import com.pulumi.azure.network.Subnet;
* import com.pulumi.azure.network.SubnetArgs;
* import com.pulumi.azure.network.PublicIp;
* import com.pulumi.azure.network.PublicIpArgs;
* import com.pulumi.azure.network.RouteServer;
* import com.pulumi.azure.network.RouteServerArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
* .name("example-vn")
* .addressSpaces("10.0.0.0/16")
* .resourceGroupName(example.name())
* .location(example.location())
* .tags(Map.of("environment", "Production"))
* .build());
* var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
* .name("RouteServerSubnet")
* .virtualNetworkName(exampleVirtualNetwork.name())
* .resourceGroupName(example.name())
* .addressPrefixes("10.0.1.0/24")
* .build());
* var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
* .name("example-pip")
* .resourceGroupName(example.name())
* .location(example.location())
* .allocationMethod("Static")
* .sku("Standard")
* .build());
* var exampleRouteServer = new RouteServer("exampleRouteServer", RouteServerArgs.builder()
* .name("example-routerserver")
* .resourceGroupName(example.name())
* .location(example.location())
* .sku("Standard")
* .publicIpAddressId(examplePublicIp.id())
* .subnetId(exampleSubnet.id())
* .branchToBranchTrafficEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleVirtualNetwork:
* type: azure:network:VirtualNetwork
* name: example
* properties:
* name: example-vn
* addressSpaces:
* - 10.0.0.0/16
* resourceGroupName: ${example.name}
* location: ${example.location}
* tags:
* environment: Production
* exampleSubnet:
* type: azure:network:Subnet
* name: example
* properties:
* name: RouteServerSubnet
* virtualNetworkName: ${exampleVirtualNetwork.name}
* resourceGroupName: ${example.name}
* addressPrefixes:
* - 10.0.1.0/24
* examplePublicIp:
* type: azure:network:PublicIp
* name: example
* properties:
* name: example-pip
* resourceGroupName: ${example.name}
* location: ${example.location}
* allocationMethod: Static
* sku: Standard
* exampleRouteServer:
* type: azure:network:RouteServer
* name: example
* properties:
* name: example-routerserver
* resourceGroupName: ${example.name}
* location: ${example.location}
* sku: Standard
* publicIpAddressId: ${examplePublicIp.id}
* subnetId: ${exampleSubnet.id}
* branchToBranchTrafficEnabled: true
* ```
*
* ## Import
* Route Server can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/routeServer:RouteServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/routeServer1
* ```
* @property branchToBranchTrafficEnabled Whether to enable route exchange between Azure Route Server and the gateway(s)
* @property location Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created.
* @property name The name of the Route Server. Changing this forces a new resource to be created.
* @property publicIpAddressId The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.
* @property resourceGroupName Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created.
* @property sku The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created.
* @property subnetId The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created.
* > **NOTE:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server
* @property tags A mapping of tags to assign to the resource.
*/
public data class RouteServerArgs(
public val branchToBranchTrafficEnabled: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val publicIpAddressId: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val subnetId: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.RouteServerArgs =
com.pulumi.azure.network.RouteServerArgs.builder()
.branchToBranchTrafficEnabled(branchToBranchTrafficEnabled?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.publicIpAddressId(publicIpAddressId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0 }))
.subnetId(subnetId?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [RouteServerArgs].
*/
@PulumiTagMarker
public class RouteServerArgsBuilder internal constructor() {
private var branchToBranchTrafficEnabled: Output? = null
private var location: Output? = null
private var name: Output? = null
private var publicIpAddressId: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var subnetId: Output? = null
private var tags: Output>? = null
/**
* @param value Whether to enable route exchange between Azure Route Server and the gateway(s)
*/
@JvmName("mcsoxkqkxcxvigvp")
public suspend fun branchToBranchTrafficEnabled(`value`: Output) {
this.branchToBranchTrafficEnabled = value
}
/**
* @param value Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created.
*/
@JvmName("buuttaxrmrhwlvgf")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the Route Server. Changing this forces a new resource to be created.
*/
@JvmName("tsmyhisnkfftyltf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.
*/
@JvmName("vtryaamcppvfuqqn")
public suspend fun publicIpAddressId(`value`: Output) {
this.publicIpAddressId = value
}
/**
* @param value Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created.
*/
@JvmName("ejwybkorlamrajpu")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created.
*/
@JvmName("epqqcsfbmcpsbeew")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created.
* > **NOTE:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server
*/
@JvmName("nhpxpgbjxoibvdig")
public suspend fun subnetId(`value`: Output) {
this.subnetId = value
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("jfnbirtfoytuxdtu")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Whether to enable route exchange between Azure Route Server and the gateway(s)
*/
@JvmName("vtanfyfmdhapuktp")
public suspend fun branchToBranchTrafficEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.branchToBranchTrafficEnabled = mapped
}
/**
* @param value Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created.
*/
@JvmName("gkylsmudyqjbiyaa")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the Route Server. Changing this forces a new resource to be created.
*/
@JvmName("hlwecbeotkuncmte")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created.
*/
@JvmName("rvohwtjvymldcdmi")
public suspend fun publicIpAddressId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicIpAddressId = mapped
}
/**
* @param value Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created.
*/
@JvmName("pmlrqbqhnalcxaje")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created.
*/
@JvmName("aaaclnesnagksswl")
public suspend fun sku(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param value The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created.
* > **NOTE:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server
*/
@JvmName("jwdwanlqdeoulixi")
public suspend fun subnetId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetId = mapped
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("ecxgcfthwdpkctmh")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags to assign to the resource.
*/
@JvmName("tjumtwnhrfolrqfj")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): RouteServerArgs = RouteServerArgs(
branchToBranchTrafficEnabled = branchToBranchTrafficEnabled,
location = location,
name = name,
publicIpAddressId = publicIpAddressId,
resourceGroupName = resourceGroupName,
sku = sku,
subnetId = subnetId,
tags = tags,
)
}