Vpn Site Args
VpnSite Resource. Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01. Other available API versions: 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-08-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
VpnSiteCreate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var vpnSite = new AzureNative.Network.VpnSite("vpnSite", new()
{
AddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
{
AddressPrefixes = new[]
{
"10.0.0.0/16",
},
},
IsSecuritySite = false,
Location = "West US",
O365Policy = new AzureNative.Network.Inputs.O365PolicyPropertiesArgs
{
BreakOutCategories = new AzureNative.Network.Inputs.O365BreakOutCategoryPoliciesArgs
{
Allow = true,
Default = false,
Optimize = true,
},
},
ResourceGroupName = "rg1",
Tags =
{
{ "key1", "value1" },
},
VirtualWan = new AzureNative.Network.Inputs.SubResourceArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1",
},
VpnSiteLinks = new[]
{
new AzureNative.Network.Inputs.VpnSiteLinkArgs
{
BgpProperties = new AzureNative.Network.Inputs.VpnLinkBgpSettingsArgs
{
Asn = 1234,
BgpPeeringAddress = "192.168.0.0",
},
Fqdn = "link1.vpnsite1.contoso.com",
IpAddress = "50.50.50.56",
LinkProperties = new AzureNative.Network.Inputs.VpnLinkProviderPropertiesArgs
{
LinkProviderName = "vendor1",
LinkSpeedInMbps = 0,
},
Name = "vpnSiteLink1",
},
},
VpnSiteName = "vpnSite1",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewVpnSite(ctx, "vpnSite", &network.VpnSiteArgs{
AddressSpace: &network.AddressSpaceArgs{
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
},
IsSecuritySite: pulumi.Bool(false),
Location: pulumi.String("West US"),
O365Policy: &network.O365PolicyPropertiesArgs{
BreakOutCategories: &network.O365BreakOutCategoryPoliciesArgs{
Allow: pulumi.Bool(true),
Default: pulumi.Bool(false),
Optimize: pulumi.Bool(true),
},
},
ResourceGroupName: pulumi.String("rg1"),
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
VirtualWan: &network.SubResourceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1"),
},
VpnSiteLinks: network.VpnSiteLinkArray{
&network.VpnSiteLinkArgs{
BgpProperties: &network.VpnLinkBgpSettingsArgs{
Asn: pulumi.Float64(1234),
BgpPeeringAddress: pulumi.String("192.168.0.0"),
},
Fqdn: pulumi.String("link1.vpnsite1.contoso.com"),
IpAddress: pulumi.String("50.50.50.56"),
LinkProperties: &network.VpnLinkProviderPropertiesArgs{
LinkProviderName: pulumi.String("vendor1"),
LinkSpeedInMbps: pulumi.Int(0),
},
Name: pulumi.String("vpnSiteLink1"),
},
},
VpnSiteName: pulumi.String("vpnSite1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.VpnSite;
import com.pulumi.azurenative.network.VpnSiteArgs;
import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
import com.pulumi.azurenative.network.inputs.O365PolicyPropertiesArgs;
import com.pulumi.azurenative.network.inputs.O365BreakOutCategoryPoliciesArgs;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
import com.pulumi.azurenative.network.inputs.VpnSiteLinkArgs;
import com.pulumi.azurenative.network.inputs.VpnLinkBgpSettingsArgs;
import com.pulumi.azurenative.network.inputs.VpnLinkProviderPropertiesArgs;
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 vpnSite = new VpnSite("vpnSite", VpnSiteArgs.builder()
.addressSpace(AddressSpaceArgs.builder()
.addressPrefixes("10.0.0.0/16")
.build())
.isSecuritySite(false)
.location("West US")
.o365Policy(O365PolicyPropertiesArgs.builder()
.breakOutCategories(O365BreakOutCategoryPoliciesArgs.builder()
.allow(true)
.default_(false)
.optimize(true)
.build())
.build())
.resourceGroupName("rg1")
.tags(Map.of("key1", "value1"))
.virtualWan(SubResourceArgs.builder()
.id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1")
.build())
.vpnSiteLinks(VpnSiteLinkArgs.builder()
.bgpProperties(VpnLinkBgpSettingsArgs.builder()
.asn(1234)
.bgpPeeringAddress("192.168.0.0")
.build())
.fqdn("link1.vpnsite1.contoso.com")
.ipAddress("50.50.50.56")
.linkProperties(VpnLinkProviderPropertiesArgs.builder()
.linkProviderName("vendor1")
.linkSpeedInMbps(0)
.build())
.name("vpnSiteLink1")
.build())
.vpnSiteName("vpnSite1")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:VpnSite vpnSite1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}
Constructors
Properties
The AddressSpace that contains an array of IP address ranges.
The set of bgp properties.
The device properties.
IsSecuritySite flag.
Office365 Policy.
The resource group name of the VpnSite.
The VirtualWAN to which the vpnSite belongs.
List of all vpn site links.
The name of the VpnSite being created or updated.