
com.pulumi.azure.network.kotlin.VirtualHubConnectionArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.VirtualHubConnectionArgs.builder
import com.pulumi.azure.network.kotlin.inputs.VirtualHubConnectionRoutingArgs
import com.pulumi.azure.network.kotlin.inputs.VirtualHubConnectionRoutingArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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.jvm.JvmName
/**
* Manages a Connection for a Virtual Hub.
* ## 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-network",
* addressSpaces: ["172.16.0.0/12"],
* location: example.location,
* resourceGroupName: example.name,
* });
* const exampleVirtualWan = new azure.network.VirtualWan("example", {
* name: "example-vwan",
* resourceGroupName: example.name,
* location: example.location,
* });
* const exampleVirtualHub = new azure.network.VirtualHub("example", {
* name: "example-hub",
* resourceGroupName: example.name,
* location: example.location,
* virtualWanId: exampleVirtualWan.id,
* addressPrefix: "10.0.1.0/24",
* });
* const exampleVirtualHubConnection = new azure.network.VirtualHubConnection("example", {
* name: "example-vhub",
* virtualHubId: exampleVirtualHub.id,
* remoteVirtualNetworkId: exampleVirtualNetwork.id,
* });
* ```
* ```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-network",
* address_spaces=["172.16.0.0/12"],
* location=example.location,
* resource_group_name=example.name)
* example_virtual_wan = azure.network.VirtualWan("example",
* name="example-vwan",
* resource_group_name=example.name,
* location=example.location)
* example_virtual_hub = azure.network.VirtualHub("example",
* name="example-hub",
* resource_group_name=example.name,
* location=example.location,
* virtual_wan_id=example_virtual_wan.id,
* address_prefix="10.0.1.0/24")
* example_virtual_hub_connection = azure.network.VirtualHubConnection("example",
* name="example-vhub",
* virtual_hub_id=example_virtual_hub.id,
* remote_virtual_network_id=example_virtual_network.id)
* ```
* ```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-network",
* AddressSpaces = new[]
* {
* "172.16.0.0/12",
* },
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var exampleVirtualWan = new Azure.Network.VirtualWan("example", new()
* {
* Name = "example-vwan",
* ResourceGroupName = example.Name,
* Location = example.Location,
* });
* var exampleVirtualHub = new Azure.Network.VirtualHub("example", new()
* {
* Name = "example-hub",
* ResourceGroupName = example.Name,
* Location = example.Location,
* VirtualWanId = exampleVirtualWan.Id,
* AddressPrefix = "10.0.1.0/24",
* });
* var exampleVirtualHubConnection = new Azure.Network.VirtualHubConnection("example", new()
* {
* Name = "example-vhub",
* VirtualHubId = exampleVirtualHub.Id,
* RemoteVirtualNetworkId = exampleVirtualNetwork.Id,
* });
* });
* ```
* ```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-network"),
* AddressSpaces: pulumi.StringArray{
* pulumi.String("172.16.0.0/12"),
* },
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
* Name: pulumi.String("example-vwan"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* })
* if err != nil {
* return err
* }
* exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
* Name: pulumi.String("example-hub"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* VirtualWanId: exampleVirtualWan.ID(),
* AddressPrefix: pulumi.String("10.0.1.0/24"),
* })
* if err != nil {
* return err
* }
* _, err = network.NewVirtualHubConnection(ctx, "example", &network.VirtualHubConnectionArgs{
* Name: pulumi.String("example-vhub"),
* VirtualHubId: exampleVirtualHub.ID(),
* RemoteVirtualNetworkId: exampleVirtualNetwork.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.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.VirtualWan;
* import com.pulumi.azure.network.VirtualWanArgs;
* import com.pulumi.azure.network.VirtualHub;
* import com.pulumi.azure.network.VirtualHubArgs;
* import com.pulumi.azure.network.VirtualHubConnection;
* import com.pulumi.azure.network.VirtualHubConnectionArgs;
* 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-network")
* .addressSpaces("172.16.0.0/12")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
* .name("example-vwan")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
* var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
* .name("example-hub")
* .resourceGroupName(example.name())
* .location(example.location())
* .virtualWanId(exampleVirtualWan.id())
* .addressPrefix("10.0.1.0/24")
* .build());
* var exampleVirtualHubConnection = new VirtualHubConnection("exampleVirtualHubConnection", VirtualHubConnectionArgs.builder()
* .name("example-vhub")
* .virtualHubId(exampleVirtualHub.id())
* .remoteVirtualNetworkId(exampleVirtualNetwork.id())
* .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-network
* addressSpaces:
* - 172.16.0.0/12
* location: ${example.location}
* resourceGroupName: ${example.name}
* exampleVirtualWan:
* type: azure:network:VirtualWan
* name: example
* properties:
* name: example-vwan
* resourceGroupName: ${example.name}
* location: ${example.location}
* exampleVirtualHub:
* type: azure:network:VirtualHub
* name: example
* properties:
* name: example-hub
* resourceGroupName: ${example.name}
* location: ${example.location}
* virtualWanId: ${exampleVirtualWan.id}
* addressPrefix: 10.0.1.0/24
* exampleVirtualHubConnection:
* type: azure:network:VirtualHubConnection
* name: example
* properties:
* name: example-vhub
* virtualHubId: ${exampleVirtualHub.id}
* remoteVirtualNetworkId: ${exampleVirtualNetwork.id}
* ```
*
* ## Import
* Virtual Hub Connection's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/virtualHubConnection:VirtualHubConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/connection1
* ```
* @property internetSecurityEnabled Should Internet Security be enabled to secure internet traffic? Defaults to `false`.
* @property name The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
* @property remoteVirtualNetworkId The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
* @property routing A `routing` block as defined below.
* @property virtualHubId The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
*/
public data class VirtualHubConnectionArgs(
public val internetSecurityEnabled: Output? = null,
public val name: Output? = null,
public val remoteVirtualNetworkId: Output? = null,
public val routing: Output? = null,
public val virtualHubId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.VirtualHubConnectionArgs =
com.pulumi.azure.network.VirtualHubConnectionArgs.builder()
.internetSecurityEnabled(internetSecurityEnabled?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.remoteVirtualNetworkId(remoteVirtualNetworkId?.applyValue({ args0 -> args0 }))
.routing(routing?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.virtualHubId(virtualHubId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VirtualHubConnectionArgs].
*/
@PulumiTagMarker
public class VirtualHubConnectionArgsBuilder internal constructor() {
private var internetSecurityEnabled: Output? = null
private var name: Output? = null
private var remoteVirtualNetworkId: Output? = null
private var routing: Output? = null
private var virtualHubId: Output? = null
/**
* @param value Should Internet Security be enabled to secure internet traffic? Defaults to `false`.
*/
@JvmName("lrelofmmcdfguaff")
public suspend fun internetSecurityEnabled(`value`: Output) {
this.internetSecurityEnabled = value
}
/**
* @param value The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
*/
@JvmName("dksueranandtqrhr")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
*/
@JvmName("pvjoguwitucdbdsu")
public suspend fun remoteVirtualNetworkId(`value`: Output) {
this.remoteVirtualNetworkId = value
}
/**
* @param value A `routing` block as defined below.
*/
@JvmName("gnkadyccukbajqbd")
public suspend fun routing(`value`: Output) {
this.routing = value
}
/**
* @param value The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
*/
@JvmName("fnejnrsxissmwldq")
public suspend fun virtualHubId(`value`: Output) {
this.virtualHubId = value
}
/**
* @param value Should Internet Security be enabled to secure internet traffic? Defaults to `false`.
*/
@JvmName("lgqqwjuvtckmjusc")
public suspend fun internetSecurityEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.internetSecurityEnabled = mapped
}
/**
* @param value The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created.
*/
@JvmName("ilpdakwcodqhmyum")
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 Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created.
*/
@JvmName("bvtunqwihibupeok")
public suspend fun remoteVirtualNetworkId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.remoteVirtualNetworkId = mapped
}
/**
* @param value A `routing` block as defined below.
*/
@JvmName("kfaidrpkbjkqkhbw")
public suspend fun routing(`value`: VirtualHubConnectionRoutingArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.routing = mapped
}
/**
* @param argument A `routing` block as defined below.
*/
@JvmName("vtrwtriyvopslruf")
public suspend fun routing(argument: suspend VirtualHubConnectionRoutingArgsBuilder.() -> Unit) {
val toBeMapped = VirtualHubConnectionRoutingArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.routing = mapped
}
/**
* @param value The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created.
*/
@JvmName("tekfyvujcqjydvyg")
public suspend fun virtualHubId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualHubId = mapped
}
internal fun build(): VirtualHubConnectionArgs = VirtualHubConnectionArgs(
internetSecurityEnabled = internetSecurityEnabled,
name = name,
remoteVirtualNetworkId = remoteVirtualNetworkId,
routing = routing,
virtualHubId = virtualHubId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy