1. Packages
  2. Azure Native
  3. API Docs
  4. cdn
  5. TunnelPolicy
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.cdn.TunnelPolicy

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Tunnel Policy maps domains to target endpoints to process traffic over the tunnelling protocol.

Uses Azure REST API version 2024-06-01-preview. In version 2.x of the Azure Native provider, it used API version 2024-06-01-preview.

Example Usage

TunnelPolicies_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var tunnelPolicy = new AzureNative.Cdn.TunnelPolicy("tunnelPolicy", new()
    {
        Domains = new[]
        {
            new AzureNative.Cdn.Inputs.ActivatedResourceReferenceArgs
            {
                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1",
            },
            new AzureNative.Cdn.Inputs.ActivatedResourceReferenceArgs
            {
                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2",
            },
        },
        ProfileName = "profile1",
        ResourceGroupName = "RG",
        TargetGroups = new[]
        {
            new AzureNative.Cdn.Inputs.ResourceReferenceArgs
            {
                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1",
            },
            new AzureNative.Cdn.Inputs.ResourceReferenceArgs
            {
                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2",
            },
        },
        TunnelPolicyName = "tunnelPolicy1",
        TunnelType = AzureNative.Cdn.TunnelType.HttpConnect,
    });

});
Copy
package main

import (
	cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cdn.NewTunnelPolicy(ctx, "tunnelPolicy", &cdn.TunnelPolicyArgs{
			Domains: cdn.ActivatedResourceReferenceArray{
				&cdn.ActivatedResourceReferenceArgs{
					Id: pulumi.String("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"),
				},
				&cdn.ActivatedResourceReferenceArgs{
					Id: pulumi.String("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"),
				},
			},
			ProfileName:       pulumi.String("profile1"),
			ResourceGroupName: pulumi.String("RG"),
			TargetGroups: cdn.ResourceReferenceArray{
				&cdn.ResourceReferenceArgs{
					Id: pulumi.String("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1"),
				},
				&cdn.ResourceReferenceArgs{
					Id: pulumi.String("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2"),
				},
			},
			TunnelPolicyName: pulumi.String("tunnelPolicy1"),
			TunnelType:       pulumi.String(cdn.TunnelTypeHttpConnect),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cdn.TunnelPolicy;
import com.pulumi.azurenative.cdn.TunnelPolicyArgs;
import com.pulumi.azurenative.cdn.inputs.ActivatedResourceReferenceArgs;
import com.pulumi.azurenative.cdn.inputs.ResourceReferenceArgs;
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 tunnelPolicy = new TunnelPolicy("tunnelPolicy", TunnelPolicyArgs.builder()
            .domains(            
                ActivatedResourceReferenceArgs.builder()
                    .id("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1")
                    .build(),
                ActivatedResourceReferenceArgs.builder()
                    .id("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2")
                    .build())
            .profileName("profile1")
            .resourceGroupName("RG")
            .targetGroups(            
                ResourceReferenceArgs.builder()
                    .id("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1")
                    .build(),
                ResourceReferenceArgs.builder()
                    .id("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2")
                    .build())
            .tunnelPolicyName("tunnelPolicy1")
            .tunnelType("HttpConnect")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const tunnelPolicy = new azure_native.cdn.TunnelPolicy("tunnelPolicy", {
    domains: [
        {
            id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1",
        },
        {
            id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2",
        },
    ],
    profileName: "profile1",
    resourceGroupName: "RG",
    targetGroups: [
        {
            id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1",
        },
        {
            id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2",
        },
    ],
    tunnelPolicyName: "tunnelPolicy1",
    tunnelType: azure_native.cdn.TunnelType.HttpConnect,
});
Copy
import pulumi
import pulumi_azure_native as azure_native

tunnel_policy = azure_native.cdn.TunnelPolicy("tunnelPolicy",
    domains=[
        {
            "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1",
        },
        {
            "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2",
        },
    ],
    profile_name="profile1",
    resource_group_name="RG",
    target_groups=[
        {
            "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1",
        },
        {
            "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2",
        },
    ],
    tunnel_policy_name="tunnelPolicy1",
    tunnel_type=azure_native.cdn.TunnelType.HTTP_CONNECT)
Copy
resources:
  tunnelPolicy:
    type: azure-native:cdn:TunnelPolicy
    properties:
      domains:
        - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1
        - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2
      profileName: profile1
      resourceGroupName: RG
      targetGroups:
        - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup1
        - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/targetgroups/targetgroup2
      tunnelPolicyName: tunnelPolicy1
      tunnelType: HttpConnect
Copy

Create TunnelPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TunnelPolicy(name: string, args: TunnelPolicyArgs, opts?: CustomResourceOptions);
@overload
def TunnelPolicy(resource_name: str,
                 args: TunnelPolicyArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def TunnelPolicy(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 domains: Optional[Sequence[ActivatedResourceReferenceArgs]] = None,
                 profile_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 target_groups: Optional[Sequence[ResourceReferenceArgs]] = None,
                 tunnel_policy_name: Optional[str] = None,
                 tunnel_type: Optional[Union[str, TunnelType]] = None)
func NewTunnelPolicy(ctx *Context, name string, args TunnelPolicyArgs, opts ...ResourceOption) (*TunnelPolicy, error)
public TunnelPolicy(string name, TunnelPolicyArgs args, CustomResourceOptions? opts = null)
public TunnelPolicy(String name, TunnelPolicyArgs args)
public TunnelPolicy(String name, TunnelPolicyArgs args, CustomResourceOptions options)
type: azure-native:cdn:TunnelPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TunnelPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TunnelPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TunnelPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TunnelPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TunnelPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var tunnelPolicyResource = new AzureNative.Cdn.TunnelPolicy("tunnelPolicyResource", new()
{
    Domains = new[]
    {
        new AzureNative.Cdn.Inputs.ActivatedResourceReferenceArgs
        {
            Id = "string",
        },
    },
    ProfileName = "string",
    ResourceGroupName = "string",
    TargetGroups = new[]
    {
        new AzureNative.Cdn.Inputs.ResourceReferenceArgs
        {
            Id = "string",
        },
    },
    TunnelPolicyName = "string",
    TunnelType = "string",
});
Copy
example, err := cdn.NewTunnelPolicy(ctx, "tunnelPolicyResource", &cdn.TunnelPolicyArgs{
	Domains: cdn.ActivatedResourceReferenceArray{
		&cdn.ActivatedResourceReferenceArgs{
			Id: pulumi.String("string"),
		},
	},
	ProfileName:       pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	TargetGroups: cdn.ResourceReferenceArray{
		&cdn.ResourceReferenceArgs{
			Id: pulumi.String("string"),
		},
	},
	TunnelPolicyName: pulumi.String("string"),
	TunnelType:       pulumi.String("string"),
})
Copy
var tunnelPolicyResource = new TunnelPolicy("tunnelPolicyResource", TunnelPolicyArgs.builder()
    .domains(ActivatedResourceReferenceArgs.builder()
        .id("string")
        .build())
    .profileName("string")
    .resourceGroupName("string")
    .targetGroups(ResourceReferenceArgs.builder()
        .id("string")
        .build())
    .tunnelPolicyName("string")
    .tunnelType("string")
    .build());
Copy
tunnel_policy_resource = azure_native.cdn.TunnelPolicy("tunnelPolicyResource",
    domains=[{
        "id": "string",
    }],
    profile_name="string",
    resource_group_name="string",
    target_groups=[{
        "id": "string",
    }],
    tunnel_policy_name="string",
    tunnel_type="string")
Copy
const tunnelPolicyResource = new azure_native.cdn.TunnelPolicy("tunnelPolicyResource", {
    domains: [{
        id: "string",
    }],
    profileName: "string",
    resourceGroupName: "string",
    targetGroups: [{
        id: "string",
    }],
    tunnelPolicyName: "string",
    tunnelType: "string",
});
Copy
type: azure-native:cdn:TunnelPolicy
properties:
    domains:
        - id: string
    profileName: string
    resourceGroupName: string
    targetGroups:
        - id: string
    tunnelPolicyName: string
    tunnelType: string
Copy

TunnelPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TunnelPolicy resource accepts the following input properties:

Domains This property is required. List<Pulumi.AzureNative.Cdn.Inputs.ActivatedResourceReference>
Domains referenced by this tunnel policy.
ProfileName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
TargetGroups List<Pulumi.AzureNative.Cdn.Inputs.ResourceReference>
Target Groups referenced by this tunnel policy.
TunnelPolicyName Changes to this property will trigger replacement. string
Name of the Tunnel Policy under the profile.
TunnelType string | Pulumi.AzureNative.Cdn.TunnelType
Protocol this tunnel will use for allowing traffic to backends.
Domains This property is required. []ActivatedResourceReferenceArgs
Domains referenced by this tunnel policy.
ProfileName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
TargetGroups []ResourceReferenceArgs
Target Groups referenced by this tunnel policy.
TunnelPolicyName Changes to this property will trigger replacement. string
Name of the Tunnel Policy under the profile.
TunnelType string | TunnelType
Protocol this tunnel will use for allowing traffic to backends.
domains This property is required. List<ActivatedResourceReference>
Domains referenced by this tunnel policy.
profileName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource group within the Azure subscription.
targetGroups List<ResourceReference>
Target Groups referenced by this tunnel policy.
tunnelPolicyName Changes to this property will trigger replacement. String
Name of the Tunnel Policy under the profile.
tunnelType String | TunnelType
Protocol this tunnel will use for allowing traffic to backends.
domains This property is required. ActivatedResourceReference[]
Domains referenced by this tunnel policy.
profileName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
targetGroups ResourceReference[]
Target Groups referenced by this tunnel policy.
tunnelPolicyName Changes to this property will trigger replacement. string
Name of the Tunnel Policy under the profile.
tunnelType string | TunnelType
Protocol this tunnel will use for allowing traffic to backends.
domains This property is required. Sequence[ActivatedResourceReferenceArgs]
Domains referenced by this tunnel policy.
profile_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the Resource group within the Azure subscription.
target_groups Sequence[ResourceReferenceArgs]
Target Groups referenced by this tunnel policy.
tunnel_policy_name Changes to this property will trigger replacement. str
Name of the Tunnel Policy under the profile.
tunnel_type str | TunnelType
Protocol this tunnel will use for allowing traffic to backends.
domains This property is required. List<Property Map>
Domains referenced by this tunnel policy.
profileName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource group within the Azure subscription.
targetGroups List<Property Map>
Target Groups referenced by this tunnel policy.
tunnelPolicyName Changes to this property will trigger replacement. String
Name of the Tunnel Policy under the profile.
tunnelType String | "HttpConnect"
Protocol this tunnel will use for allowing traffic to backends.

Outputs

All input properties are implicitly available as output properties. Additionally, the TunnelPolicy resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
DeploymentStatus string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
Provisioning status
SystemData Pulumi.AzureNative.Cdn.Outputs.SystemDataResponse
Read only system data
Type string
Resource type.
AzureApiVersion string
The Azure API version of the resource.
DeploymentStatus string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
Provisioning status
SystemData SystemDataResponse
Read only system data
Type string
Resource type.
azureApiVersion String
The Azure API version of the resource.
deploymentStatus String
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
Provisioning status
systemData SystemDataResponse
Read only system data
type String
Resource type.
azureApiVersion string
The Azure API version of the resource.
deploymentStatus string
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
provisioningState string
Provisioning status
systemData SystemDataResponse
Read only system data
type string
Resource type.
azure_api_version str
The Azure API version of the resource.
deployment_status str
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
provisioning_state str
Provisioning status
system_data SystemDataResponse
Read only system data
type str
Resource type.
azureApiVersion String
The Azure API version of the resource.
deploymentStatus String
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
Provisioning status
systemData Property Map
Read only system data
type String
Resource type.

Supporting Types

ActivatedResourceReference
, ActivatedResourceReferenceArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

ActivatedResourceReferenceResponse
, ActivatedResourceReferenceResponseArgs

IsActive This property is required. bool
Whether the resource is active or inactive
Id string
Resource ID.
IsActive This property is required. bool
Whether the resource is active or inactive
Id string
Resource ID.
isActive This property is required. Boolean
Whether the resource is active or inactive
id String
Resource ID.
isActive This property is required. boolean
Whether the resource is active or inactive
id string
Resource ID.
is_active This property is required. bool
Whether the resource is active or inactive
id str
Resource ID.
isActive This property is required. Boolean
Whether the resource is active or inactive
id String
Resource ID.

ResourceReference
, ResourceReferenceArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

ResourceReferenceResponse
, ResourceReferenceResponseArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC)
CreatedBy string
An identifier for the identity that created the resource
CreatedByType string
The type of identity that created the resource
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
An identifier for the identity that last modified the resource
LastModifiedByType string
The type of identity that last modified the resource
CreatedAt string
The timestamp of resource creation (UTC)
CreatedBy string
An identifier for the identity that created the resource
CreatedByType string
The type of identity that created the resource
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
An identifier for the identity that last modified the resource
LastModifiedByType string
The type of identity that last modified the resource
createdAt String
The timestamp of resource creation (UTC)
createdBy String
An identifier for the identity that created the resource
createdByType String
The type of identity that created the resource
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
An identifier for the identity that last modified the resource
lastModifiedByType String
The type of identity that last modified the resource
createdAt string
The timestamp of resource creation (UTC)
createdBy string
An identifier for the identity that created the resource
createdByType string
The type of identity that created the resource
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
An identifier for the identity that last modified the resource
lastModifiedByType string
The type of identity that last modified the resource
created_at str
The timestamp of resource creation (UTC)
created_by str
An identifier for the identity that created the resource
created_by_type str
The type of identity that created the resource
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
An identifier for the identity that last modified the resource
last_modified_by_type str
The type of identity that last modified the resource
createdAt String
The timestamp of resource creation (UTC)
createdBy String
An identifier for the identity that created the resource
createdByType String
The type of identity that created the resource
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
An identifier for the identity that last modified the resource
lastModifiedByType String
The type of identity that last modified the resource

TunnelType
, TunnelTypeArgs

HttpConnect
HttpConnect
TunnelTypeHttpConnect
HttpConnect
HttpConnect
HttpConnect
HttpConnect
HttpConnect
HTTP_CONNECT
HttpConnect
"HttpConnect"
HttpConnect

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:cdn:TunnelPolicy tunnelPolicy1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/tunnelPolicies/{tunnelPolicyName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi