![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.network.kotlin.ExpressRouteCircuitPeering.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-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.azure.network.kotlin
import com.pulumi.azure.network.kotlin.outputs.ExpressRouteCircuitPeeringIpv6
import com.pulumi.azure.network.kotlin.outputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfig
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.network.kotlin.outputs.ExpressRouteCircuitPeeringIpv6.Companion.toKotlin as expressRouteCircuitPeeringIpv6ToKotlin
import com.pulumi.azure.network.kotlin.outputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfig.Companion.toKotlin as expressRouteCircuitPeeringMicrosoftPeeringConfigToKotlin
/**
* Builder for [ExpressRouteCircuitPeering].
*/
@PulumiTagMarker
public class ExpressRouteCircuitPeeringResourceBuilder internal constructor() {
public var name: String? = null
public var args: ExpressRouteCircuitPeeringArgs = ExpressRouteCircuitPeeringArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ExpressRouteCircuitPeeringArgsBuilder.() -> Unit) {
val builder = ExpressRouteCircuitPeeringArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): ExpressRouteCircuitPeering {
val builtJavaResource =
com.pulumi.azure.network.ExpressRouteCircuitPeering(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ExpressRouteCircuitPeering(builtJavaResource)
}
}
/**
* Manages an ExpressRoute Circuit Peering.
* ## Example Usage
* ### Creating A Microsoft Peering)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "exprtTest",
* location: "West Europe",
* });
* const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("example", {
* name: "expressRoute1",
* resourceGroupName: example.name,
* location: example.location,
* serviceProviderName: "Equinix",
* peeringLocation: "Silicon Valley",
* bandwidthInMbps: 50,
* sku: {
* tier: "Standard",
* family: "MeteredData",
* },
* allowClassicOperations: false,
* tags: {
* environment: "Production",
* },
* });
* const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("example", {
* peeringType: "MicrosoftPeering",
* expressRouteCircuitName: exampleExpressRouteCircuit.name,
* resourceGroupName: example.name,
* peerAsn: 100,
* primaryPeerAddressPrefix: "123.0.0.0/30",
* secondaryPeerAddressPrefix: "123.0.0.4/30",
* ipv4Enabled: true,
* vlanId: 300,
* microsoftPeeringConfig: {
* advertisedPublicPrefixes: ["123.1.0.0/24"],
* },
* ipv6: {
* primaryPeerAddressPrefix: "2002:db01::/126",
* secondaryPeerAddressPrefix: "2003:db01::/126",
* enabled: true,
* microsoftPeering: {
* advertisedPublicPrefixes: ["2002:db01::/126"],
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="exprtTest",
* location="West Europe")
* example_express_route_circuit = azure.network.ExpressRouteCircuit("example",
* name="expressRoute1",
* resource_group_name=example.name,
* location=example.location,
* service_provider_name="Equinix",
* peering_location="Silicon Valley",
* bandwidth_in_mbps=50,
* sku={
* "tier": "Standard",
* "family": "MeteredData",
* },
* allow_classic_operations=False,
* tags={
* "environment": "Production",
* })
* example_express_route_circuit_peering = azure.network.ExpressRouteCircuitPeering("example",
* peering_type="MicrosoftPeering",
* express_route_circuit_name=example_express_route_circuit.name,
* resource_group_name=example.name,
* peer_asn=100,
* primary_peer_address_prefix="123.0.0.0/30",
* secondary_peer_address_prefix="123.0.0.4/30",
* ipv4_enabled=True,
* vlan_id=300,
* microsoft_peering_config={
* "advertised_public_prefixes": ["123.1.0.0/24"],
* },
* ipv6={
* "primary_peer_address_prefix": "2002:db01::/126",
* "secondary_peer_address_prefix": "2003:db01::/126",
* "enabled": True,
* "microsoft_peering": {
* "advertised_public_prefixes": ["2002:db01::/126"],
* },
* })
* ```
* ```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 = "exprtTest",
* Location = "West Europe",
* });
* var exampleExpressRouteCircuit = new Azure.Network.ExpressRouteCircuit("example", new()
* {
* Name = "expressRoute1",
* ResourceGroupName = example.Name,
* Location = example.Location,
* ServiceProviderName = "Equinix",
* PeeringLocation = "Silicon Valley",
* BandwidthInMbps = 50,
* Sku = new Azure.Network.Inputs.ExpressRouteCircuitSkuArgs
* {
* Tier = "Standard",
* Family = "MeteredData",
* },
* AllowClassicOperations = false,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* var exampleExpressRouteCircuitPeering = new Azure.Network.ExpressRouteCircuitPeering("example", new()
* {
* PeeringType = "MicrosoftPeering",
* ExpressRouteCircuitName = exampleExpressRouteCircuit.Name,
* ResourceGroupName = example.Name,
* PeerAsn = 100,
* PrimaryPeerAddressPrefix = "123.0.0.0/30",
* SecondaryPeerAddressPrefix = "123.0.0.4/30",
* Ipv4Enabled = true,
* VlanId = 300,
* MicrosoftPeeringConfig = new Azure.Network.Inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs
* {
* AdvertisedPublicPrefixes = new[]
* {
* "123.1.0.0/24",
* },
* },
* Ipv6 = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6Args
* {
* PrimaryPeerAddressPrefix = "2002:db01::/126",
* SecondaryPeerAddressPrefix = "2003:db01::/126",
* Enabled = true,
* MicrosoftPeering = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs
* {
* AdvertisedPublicPrefixes = new[]
* {
* "2002:db01::/126",
* },
* },
* },
* });
* });
* ```
* ```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("exprtTest"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{
* Name: pulumi.String("expressRoute1"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* ServiceProviderName: pulumi.String("Equinix"),
* PeeringLocation: pulumi.String("Silicon Valley"),
* BandwidthInMbps: pulumi.Int(50),
* Sku: &network.ExpressRouteCircuitSkuArgs{
* Tier: pulumi.String("Standard"),
* Family: pulumi.String("MeteredData"),
* },
* AllowClassicOperations: pulumi.Bool(false),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* if err != nil {
* return err
* }
* _, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{
* PeeringType: pulumi.String("MicrosoftPeering"),
* ExpressRouteCircuitName: exampleExpressRouteCircuit.Name,
* ResourceGroupName: example.Name,
* PeerAsn: pulumi.Int(100),
* PrimaryPeerAddressPrefix: pulumi.String("123.0.0.0/30"),
* SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"),
* Ipv4Enabled: pulumi.Bool(true),
* VlanId: pulumi.Int(300),
* MicrosoftPeeringConfig: &network.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs{
* AdvertisedPublicPrefixes: pulumi.StringArray{
* pulumi.String("123.1.0.0/24"),
* },
* },
* Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{
* PrimaryPeerAddressPrefix: pulumi.String("2002:db01::/126"),
* SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"),
* Enabled: pulumi.Bool(true),
* MicrosoftPeering: &network.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs{
* AdvertisedPublicPrefixes: pulumi.StringArray{
* pulumi.String("2002:db01::/126"),
* },
* },
* },
* })
* 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.ExpressRouteCircuit;
* import com.pulumi.azure.network.ExpressRouteCircuitArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
* import com.pulumi.azure.network.ExpressRouteCircuitPeering;
* import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6Args;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs;
* 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("exprtTest")
* .location("West Europe")
* .build());
* var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
* .name("expressRoute1")
* .resourceGroupName(example.name())
* .location(example.location())
* .serviceProviderName("Equinix")
* .peeringLocation("Silicon Valley")
* .bandwidthInMbps(50)
* .sku(ExpressRouteCircuitSkuArgs.builder()
* .tier("Standard")
* .family("MeteredData")
* .build())
* .allowClassicOperations(false)
* .tags(Map.of("environment", "Production"))
* .build());
* var exampleExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
* .peeringType("MicrosoftPeering")
* .expressRouteCircuitName(exampleExpressRouteCircuit.name())
* .resourceGroupName(example.name())
* .peerAsn(100)
* .primaryPeerAddressPrefix("123.0.0.0/30")
* .secondaryPeerAddressPrefix("123.0.0.4/30")
* .ipv4Enabled(true)
* .vlanId(300)
* .microsoftPeeringConfig(ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs.builder()
* .advertisedPublicPrefixes("123.1.0.0/24")
* .build())
* .ipv6(ExpressRouteCircuitPeeringIpv6Args.builder()
* .primaryPeerAddressPrefix("2002:db01::/126")
* .secondaryPeerAddressPrefix("2003:db01::/126")
* .enabled(true)
* .microsoftPeering(ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs.builder()
* .advertisedPublicPrefixes("2002:db01::/126")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: exprtTest
* location: West Europe
* exampleExpressRouteCircuit:
* type: azure:network:ExpressRouteCircuit
* name: example
* properties:
* name: expressRoute1
* resourceGroupName: ${example.name}
* location: ${example.location}
* serviceProviderName: Equinix
* peeringLocation: Silicon Valley
* bandwidthInMbps: 50
* sku:
* tier: Standard
* family: MeteredData
* allowClassicOperations: false
* tags:
* environment: Production
* exampleExpressRouteCircuitPeering:
* type: azure:network:ExpressRouteCircuitPeering
* name: example
* properties:
* peeringType: MicrosoftPeering
* expressRouteCircuitName: ${exampleExpressRouteCircuit.name}
* resourceGroupName: ${example.name}
* peerAsn: 100
* primaryPeerAddressPrefix: 123.0.0.0/30
* secondaryPeerAddressPrefix: 123.0.0.4/30
* ipv4Enabled: true
* vlanId: 300
* microsoftPeeringConfig:
* advertisedPublicPrefixes:
* - 123.1.0.0/24
* ipv6:
* primaryPeerAddressPrefix: 2002:db01::/126
* secondaryPeerAddressPrefix: 2003:db01::/126
* enabled: true
* microsoftPeering:
* advertisedPublicPrefixes:
* - 2002:db01::/126
* ```
*
* ### Creating Azure Private Peering)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "exprtTest",
* location: "West Europe",
* });
* const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("example", {
* name: "expressRoute1",
* resourceGroupName: example.name,
* location: example.location,
* serviceProviderName: "Equinix",
* peeringLocation: "Silicon Valley",
* bandwidthInMbps: 50,
* sku: {
* tier: "Standard",
* family: "MeteredData",
* },
* allowClassicOperations: false,
* tags: {
* environment: "Production",
* },
* });
* const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("example", {
* peeringType: "AzurePrivatePeering",
* expressRouteCircuitName: exampleExpressRouteCircuit.name,
* resourceGroupName: example.name,
* peerAsn: 100,
* primaryPeerAddressPrefix: "123.0.0.0/30",
* secondaryPeerAddressPrefix: "123.0.0.4/30",
* ipv4Enabled: true,
* vlanId: 300,
* ipv6: {
* primaryPeerAddressPrefix: "2002:db01::/126",
* secondaryPeerAddressPrefix: "2003:db01::/126",
* enabled: true,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="exprtTest",
* location="West Europe")
* example_express_route_circuit = azure.network.ExpressRouteCircuit("example",
* name="expressRoute1",
* resource_group_name=example.name,
* location=example.location,
* service_provider_name="Equinix",
* peering_location="Silicon Valley",
* bandwidth_in_mbps=50,
* sku={
* "tier": "Standard",
* "family": "MeteredData",
* },
* allow_classic_operations=False,
* tags={
* "environment": "Production",
* })
* example_express_route_circuit_peering = azure.network.ExpressRouteCircuitPeering("example",
* peering_type="AzurePrivatePeering",
* express_route_circuit_name=example_express_route_circuit.name,
* resource_group_name=example.name,
* peer_asn=100,
* primary_peer_address_prefix="123.0.0.0/30",
* secondary_peer_address_prefix="123.0.0.4/30",
* ipv4_enabled=True,
* vlan_id=300,
* ipv6={
* "primary_peer_address_prefix": "2002:db01::/126",
* "secondary_peer_address_prefix": "2003:db01::/126",
* "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 = "exprtTest",
* Location = "West Europe",
* });
* var exampleExpressRouteCircuit = new Azure.Network.ExpressRouteCircuit("example", new()
* {
* Name = "expressRoute1",
* ResourceGroupName = example.Name,
* Location = example.Location,
* ServiceProviderName = "Equinix",
* PeeringLocation = "Silicon Valley",
* BandwidthInMbps = 50,
* Sku = new Azure.Network.Inputs.ExpressRouteCircuitSkuArgs
* {
* Tier = "Standard",
* Family = "MeteredData",
* },
* AllowClassicOperations = false,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* var exampleExpressRouteCircuitPeering = new Azure.Network.ExpressRouteCircuitPeering("example", new()
* {
* PeeringType = "AzurePrivatePeering",
* ExpressRouteCircuitName = exampleExpressRouteCircuit.Name,
* ResourceGroupName = example.Name,
* PeerAsn = 100,
* PrimaryPeerAddressPrefix = "123.0.0.0/30",
* SecondaryPeerAddressPrefix = "123.0.0.4/30",
* Ipv4Enabled = true,
* VlanId = 300,
* Ipv6 = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6Args
* {
* PrimaryPeerAddressPrefix = "2002:db01::/126",
* SecondaryPeerAddressPrefix = "2003:db01::/126",
* Enabled = 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("exprtTest"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{
* Name: pulumi.String("expressRoute1"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* ServiceProviderName: pulumi.String("Equinix"),
* PeeringLocation: pulumi.String("Silicon Valley"),
* BandwidthInMbps: pulumi.Int(50),
* Sku: &network.ExpressRouteCircuitSkuArgs{
* Tier: pulumi.String("Standard"),
* Family: pulumi.String("MeteredData"),
* },
* AllowClassicOperations: pulumi.Bool(false),
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* if err != nil {
* return err
* }
* _, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{
* PeeringType: pulumi.String("AzurePrivatePeering"),
* ExpressRouteCircuitName: exampleExpressRouteCircuit.Name,
* ResourceGroupName: example.Name,
* PeerAsn: pulumi.Int(100),
* PrimaryPeerAddressPrefix: pulumi.String("123.0.0.0/30"),
* SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"),
* Ipv4Enabled: pulumi.Bool(true),
* VlanId: pulumi.Int(300),
* Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{
* PrimaryPeerAddressPrefix: pulumi.String("2002:db01::/126"),
* SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"),
* Enabled: 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.ExpressRouteCircuit;
* import com.pulumi.azure.network.ExpressRouteCircuitArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
* import com.pulumi.azure.network.ExpressRouteCircuitPeering;
* import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs;
* import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6Args;
* 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("exprtTest")
* .location("West Europe")
* .build());
* var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
* .name("expressRoute1")
* .resourceGroupName(example.name())
* .location(example.location())
* .serviceProviderName("Equinix")
* .peeringLocation("Silicon Valley")
* .bandwidthInMbps(50)
* .sku(ExpressRouteCircuitSkuArgs.builder()
* .tier("Standard")
* .family("MeteredData")
* .build())
* .allowClassicOperations(false)
* .tags(Map.of("environment", "Production"))
* .build());
* var exampleExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
* .peeringType("AzurePrivatePeering")
* .expressRouteCircuitName(exampleExpressRouteCircuit.name())
* .resourceGroupName(example.name())
* .peerAsn(100)
* .primaryPeerAddressPrefix("123.0.0.0/30")
* .secondaryPeerAddressPrefix("123.0.0.4/30")
* .ipv4Enabled(true)
* .vlanId(300)
* .ipv6(ExpressRouteCircuitPeeringIpv6Args.builder()
* .primaryPeerAddressPrefix("2002:db01::/126")
* .secondaryPeerAddressPrefix("2003:db01::/126")
* .enabled(true)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: exprtTest
* location: West Europe
* exampleExpressRouteCircuit:
* type: azure:network:ExpressRouteCircuit
* name: example
* properties:
* name: expressRoute1
* resourceGroupName: ${example.name}
* location: ${example.location}
* serviceProviderName: Equinix
* peeringLocation: Silicon Valley
* bandwidthInMbps: 50
* sku:
* tier: Standard
* family: MeteredData
* allowClassicOperations: false
* tags:
* environment: Production
* exampleExpressRouteCircuitPeering:
* type: azure:network:ExpressRouteCircuitPeering
* name: example
* properties:
* peeringType: AzurePrivatePeering
* expressRouteCircuitName: ${exampleExpressRouteCircuit.name}
* resourceGroupName: ${example.name}
* peerAsn: 100
* primaryPeerAddressPrefix: 123.0.0.0/30
* secondaryPeerAddressPrefix: 123.0.0.4/30
* ipv4Enabled: true
* vlanId: 300
* ipv6:
* primaryPeerAddressPrefix: 2002:db01::/126
* secondaryPeerAddressPrefix: 2003:db01::/126
* enabled: true
* ```
*
* ## Import
* ExpressRoute Circuit Peerings can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering peering1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute/peerings/peering1
* ```
*/
public class ExpressRouteCircuitPeering internal constructor(
override val javaResource: com.pulumi.azure.network.ExpressRouteCircuitPeering,
) : KotlinCustomResource(javaResource, ExpressRouteCircuitPeeringMapper) {
/**
* The ASN used by Azure.
*/
public val azureAsn: Output
get() = javaResource.azureAsn().applyValue({ args0 -> args0 })
/**
* The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created.
*/
public val expressRouteCircuitName: Output
get() = javaResource.expressRouteCircuitName().applyValue({ args0 -> args0 })
public val gatewayManagerEtag: Output
get() = javaResource.gatewayManagerEtag().applyValue({ args0 -> args0 })
/**
* A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`.
*/
public val ipv4Enabled: Output?
get() = javaResource.ipv4Enabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A `ipv6` block as defined below.
*/
public val ipv6: Output?
get() = javaResource.ipv6().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
expressRouteCircuitPeeringIpv6ToKotlin(args0)
})
}).orElse(null)
})
/**
* A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4.
*/
public val microsoftPeeringConfig: Output?
get() = javaResource.microsoftPeeringConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
expressRouteCircuitPeeringMicrosoftPeeringConfigToKotlin(args0)
})
}).orElse(null)
})
/**
* The Either a 16-bit or a 32-bit ASN. Can either be public or private.
*/
public val peerAsn: Output
get() = javaResource.peerAsn().applyValue({ args0 -> args0 })
/**
* The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`.
* > **NOTE:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering.
*/
public val peeringType: Output
get() = javaResource.peeringType().applyValue({ args0 -> args0 })
/**
* The Primary Port used by Azure for this Peering.
*/
public val primaryAzurePort: Output
get() = javaResource.primaryAzurePort().applyValue({ args0 -> args0 })
/**
* A subnet for the primary link.
*/
public val primaryPeerAddressPrefix: Output?
get() = javaResource.primaryPeerAddressPrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The ID of the Route Filter. Only available when `peering_type` is set to `MicrosoftPeering`.
* > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering`
*/
public val routeFilterId: Output?
get() = javaResource.routeFilterId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Secondary Port used by Azure for this Peering.
*/
public val secondaryAzurePort: Output
get() = javaResource.secondaryAzurePort().applyValue({ args0 -> args0 })
/**
* A subnet for the secondary link.
*/
public val secondaryPeerAddressPrefix: Output?
get() = javaResource.secondaryPeerAddressPrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The shared key. Can be a maximum of 25 characters.
*/
public val sharedKey: Output?
get() = javaResource.sharedKey().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* A valid VLAN ID to establish this peering on.
*/
public val vlanId: Output
get() = javaResource.vlanId().applyValue({ args0 -> args0 })
}
public object ExpressRouteCircuitPeeringMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.network.ExpressRouteCircuitPeering::class == javaResource::class
override fun map(javaResource: Resource): ExpressRouteCircuitPeering =
ExpressRouteCircuitPeering(
javaResource as
com.pulumi.azure.network.ExpressRouteCircuitPeering,
)
}
/**
* @see [ExpressRouteCircuitPeering].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ExpressRouteCircuitPeering].
*/
public suspend fun expressRouteCircuitPeering(
name: String,
block: suspend ExpressRouteCircuitPeeringResourceBuilder.() -> Unit,
): ExpressRouteCircuitPeering {
val builder = ExpressRouteCircuitPeeringResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ExpressRouteCircuitPeering].
* @param name The _unique_ name of the resulting resource.
*/
public fun expressRouteCircuitPeering(name: String): ExpressRouteCircuitPeering {
val builder = ExpressRouteCircuitPeeringResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy