azure-native.cdn.TunnelPolicy
Explore with Pulumi AI
Tunnel Policy maps domains to target endpoints to process traffic over the tunnelling protocol. Azure REST 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,
    });
});
package main
import (
	cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v2"
	"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
	})
}
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());
    }
}
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,
});
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)
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
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 string
- The unique name of the resource.
- args TunnelPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args TunnelPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TunnelPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
const tunnelPolicyResource = new azure_native.cdn.TunnelPolicy("tunnelPolicyResource", {
    domains: [{
        id: "string",
    }],
    profileName: "string",
    resourceGroupName: "string",
    targetGroups: [{
        id: "string",
    }],
    tunnelPolicyName: "string",
    tunnelType: "string",
});
type: azure-native:cdn:TunnelPolicy
properties:
    domains:
        - id: string
    profileName: string
    resourceGroupName: string
    targetGroups:
        - id: string
    tunnelPolicyName: string
    tunnelType: string
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
List<Pulumi.Azure Native. Cdn. Inputs. Activated Resource Reference> 
- Domains referenced by this tunnel policy.
- ProfileName string
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- ResourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- TargetGroups List<Pulumi.Azure Native. Cdn. Inputs. Resource Reference> 
- Target Groups referenced by this tunnel policy.
- TunnelPolicy stringName 
- Name of the Tunnel Policy under the profile.
- TunnelType string | Pulumi.Azure Native. Cdn. Tunnel Type 
- Protocol this tunnel will use for allowing traffic to backends.
- Domains
[]ActivatedResource Reference Args 
- Domains referenced by this tunnel policy.
- ProfileName string
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- ResourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- TargetGroups []ResourceReference Args 
- Target Groups referenced by this tunnel policy.
- TunnelPolicy stringName 
- Name of the Tunnel Policy under the profile.
- TunnelType string | TunnelType 
- Protocol this tunnel will use for allowing traffic to backends.
- domains
List<ActivatedResource Reference> 
- Domains referenced by this tunnel policy.
- profileName String
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resourceGroup StringName 
- Name of the Resource group within the Azure subscription.
- targetGroups List<ResourceReference> 
- Target Groups referenced by this tunnel policy.
- tunnelPolicy StringName 
- Name of the Tunnel Policy under the profile.
- tunnelType String | TunnelType 
- Protocol this tunnel will use for allowing traffic to backends.
- domains
ActivatedResource Reference[] 
- Domains referenced by this tunnel policy.
- profileName string
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resourceGroup stringName 
- Name of the Resource group within the Azure subscription.
- targetGroups ResourceReference[] 
- Target Groups referenced by this tunnel policy.
- tunnelPolicy stringName 
- Name of the Tunnel Policy under the profile.
- tunnelType string | TunnelType 
- Protocol this tunnel will use for allowing traffic to backends.
- domains
Sequence[ActivatedResource Reference Args] 
- Domains referenced by this tunnel policy.
- profile_name str
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resource_group_ strname 
- Name of the Resource group within the Azure subscription.
- target_groups Sequence[ResourceReference Args] 
- Target Groups referenced by this tunnel policy.
- tunnel_policy_ strname 
- Name of the Tunnel Policy under the profile.
- tunnel_type str | TunnelType 
- Protocol this tunnel will use for allowing traffic to backends.
- domains List<Property Map>
- Domains referenced by this tunnel policy.
- profileName String
- Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resourceGroup StringName 
- Name of the Resource group within the Azure subscription.
- targetGroups List<Property Map>
- Target Groups referenced by this tunnel policy.
- tunnelPolicy StringName 
- 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:
- DeploymentStatus string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- ProvisioningState string
- Provisioning status
- SystemData Pulumi.Azure Native. Cdn. Outputs. System Data Response 
- Read only system data
- Type string
- Resource type.
- DeploymentStatus string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- ProvisioningState string
- Provisioning status
- SystemData SystemData Response 
- Read only system data
- Type string
- Resource type.
- deploymentStatus String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioningState String
- Provisioning status
- systemData SystemData Response 
- Read only system data
- type String
- Resource type.
- deploymentStatus string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- provisioningState string
- Provisioning status
- systemData SystemData Response 
- Read only system data
- type string
- Resource type.
- 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 SystemData Response 
- Read only system data
- type str
- Resource type.
- 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        
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
- CreatedBy stringType 
- The type of identity that created the resource
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- An identifier for the identity that last modified the resource
- LastModified stringBy Type 
- 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
- CreatedBy stringType 
- The type of identity that created the resource
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- An identifier for the identity that last modified the resource
- LastModified stringBy Type 
- 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
- createdBy StringType 
- The type of identity that created the resource
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- An identifier for the identity that last modified the resource
- lastModified StringBy Type 
- 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
- createdBy stringType 
- The type of identity that created the resource
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- An identifier for the identity that last modified the resource
- lastModified stringBy Type 
- 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_ strtype 
- The type of identity that created the resource
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- An identifier for the identity that last modified the resource
- last_modified_ strby_ type 
- 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
- createdBy StringType 
- The type of identity that created the resource
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- An identifier for the identity that last modified the resource
- lastModified StringBy Type 
- The type of identity that last modified the resource
TunnelType, TunnelTypeArgs    
- HttpConnect 
- HttpConnect
- TunnelType Http Connect 
- 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} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0