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 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)
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,
});
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
The TunnelPolicy resource accepts the following input properties:
- Domains
List<Pulumi.
Azure Native. Cdn. Inputs. Activated Resource Reference> - Domains referenced by this tunnel policy.
- Profile
Name string - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- Resource
Group stringName - Name of the Resource group within the Azure subscription.
- Target
Groups List<Pulumi.Azure Native. Cdn. Inputs. Resource Reference> - Target Groups referenced by this tunnel policy.
- Tunnel
Policy stringName - Name of the Tunnel Policy under the profile.
- Tunnel
Type string | Pulumi.Azure Native. Cdn. Tunnel Type - Protocol this tunnel will use for allowing traffic to backends.
- Domains
[]Activated
Resource Reference Args - Domains referenced by this tunnel policy.
- Profile
Name string - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- Resource
Group stringName - Name of the Resource group within the Azure subscription.
- Target
Groups []ResourceReference Args - Target Groups referenced by this tunnel policy.
- Tunnel
Policy stringName - Name of the Tunnel Policy under the profile.
- Tunnel
Type string | TunnelType - Protocol this tunnel will use for allowing traffic to backends.
- domains
List<Activated
Resource Reference> - Domains referenced by this tunnel policy.
- profile
Name String - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resource
Group StringName - Name of the Resource group within the Azure subscription.
- target
Groups List<ResourceReference> - Target Groups referenced by this tunnel policy.
- tunnel
Policy StringName - Name of the Tunnel Policy under the profile.
- tunnel
Type String | TunnelType - Protocol this tunnel will use for allowing traffic to backends.
- domains
Activated
Resource Reference[] - Domains referenced by this tunnel policy.
- profile
Name string - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resource
Group stringName - Name of the Resource group within the Azure subscription.
- target
Groups ResourceReference[] - Target Groups referenced by this tunnel policy.
- tunnel
Policy stringName - Name of the Tunnel Policy under the profile.
- tunnel
Type string | TunnelType - Protocol this tunnel will use for allowing traffic to backends.
- domains
Sequence[Activated
Resource 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.
- profile
Name String - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
- resource
Group StringName - Name of the Resource group within the Azure subscription.
- target
Groups List<Property Map> - Target Groups referenced by this tunnel policy.
- tunnel
Policy StringName - Name of the Tunnel Policy under the profile.
- tunnel
Type 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:
- Deployment
Status string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Provisioning
State string - Provisioning status
- System
Data Pulumi.Azure Native. Cdn. Outputs. System Data Response - Read only system data
- Type string
- Resource type.
- Deployment
Status string - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- Provisioning
State string - Provisioning status
- System
Data SystemData Response - Read only system data
- Type string
- Resource type.
- deployment
Status String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioning
State String - Provisioning status
- system
Data SystemData Response - Read only system data
- type String
- Resource type.
- deployment
Status string - id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- provisioning
State string - Provisioning status
- system
Data 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.
- deployment
Status String - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- provisioning
State String - Provisioning status
- system
Data 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
- Created
At string - The timestamp of resource creation (UTC)
- Created
By string - An identifier for the identity that created the resource
- Created
By stringType - The type of identity that created the resource
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - An identifier for the identity that last modified the resource
- Last
Modified stringBy Type - The type of identity that last modified the resource
- Created
At string - The timestamp of resource creation (UTC)
- Created
By string - An identifier for the identity that created the resource
- Created
By stringType - The type of identity that created the resource
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - An identifier for the identity that last modified the resource
- Last
Modified stringBy Type - The type of identity that last modified the resource
- created
At String - The timestamp of resource creation (UTC)
- created
By String - An identifier for the identity that created the resource
- created
By StringType - The type of identity that created the resource
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - An identifier for the identity that last modified the resource
- last
Modified StringBy Type - The type of identity that last modified the resource
- created
At string - The timestamp of resource creation (UTC)
- created
By string - An identifier for the identity that created the resource
- created
By stringType - The type of identity that created the resource
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - An identifier for the identity that last modified the resource
- last
Modified 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
- created
At String - The timestamp of resource creation (UTC)
- created
By String - An identifier for the identity that created the resource
- created
By StringType - The type of identity that created the resource
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - An identifier for the identity that last modified the resource
- last
Modified StringBy Type - The type of identity that last modified the resource
TunnelType, TunnelTypeArgs
- Http
Connect - HttpConnect
- Tunnel
Type Http Connect - HttpConnect
- Http
Connect - HttpConnect
- Http
Connect - HttpConnect
- HTTP_CONNECT
- HttpConnect
- "Http
Connect" - 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