Vpn Site
VpnSite Resource. Uses Azure REST API version 2023-02-01. In version 1.x of the Azure Native provider, it used API version 2020-11-01. Other available API versions: 2018-07-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
The AddressSpace that contains an array of IP address ranges.
Link copied to clipboard
The set of bgp properties.
Link copied to clipboard
The device properties.
Link copied to clipboard
IsSecuritySite flag.
Link copied to clipboard
Office365 Policy.
Link copied to clipboard
The provisioning state of the VPN site resource.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The VirtualWAN to which the vpnSite belongs.
Link copied to clipboard
List of all vpn site links.