We recommend using Azure Native.
azure.frontdoor.RulesEngine
Explore with Pulumi AI
!> IMPORTANT This deploys an Azure Front Door (classic) resource which has been deprecated and will receive security updates only. Please migrate your existing Azure Front Door (classic) deployments to the new Azure Front Door (standard/premium) resources. For your convenience, the service team has exposed a Front Door Classic to Front Door Standard/Premium migration tool to allow you to migrate your existing Front Door Classic instances to the new Front Door Standard/Premium product tiers.
Manages an Azure Front Door (classic) Rules Engine configuration and rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
    name: "example-rg",
    location: "West Europe",
});
const exampleFrontdoor = new azure.frontdoor.Frontdoor("example", {
    name: "example",
    resourceGroupName: example.name,
    backendPools: [{
        name: "exampleBackendBing",
        loadBalancingName: "exampleLoadBalancingSettings1",
        healthProbeName: "exampleHealthProbeSetting1",
        backends: [{
            hostHeader: "www.bing.com",
            address: "www.bing.com",
            httpPort: 80,
            httpsPort: 443,
        }],
    }],
    backendPoolHealthProbes: [{
        name: "exampleHealthProbeSetting1",
    }],
    backendPoolLoadBalancings: [{
        name: "exampleLoadBalancingSettings1",
    }],
    frontendEndpoints: [{
        name: "exampleFrontendEndpoint1",
        hostName: "example-FrontDoor.azurefd.net",
    }],
    routingRules: [{
        name: "exampleRoutingRule1",
        acceptedProtocols: [
            "Http",
            "Https",
        ],
        patternsToMatches: ["/*"],
        frontendEndpoints: ["exampleFrontendEndpoint1"],
    }],
});
const exampleRulesEngine = new azure.frontdoor.RulesEngine("example_rules_engine", {
    name: "exampleRulesEngineConfig1",
    frontdoorName: exampleFrontdoor.name,
    resourceGroupName: exampleFrontdoor.resourceGroupName,
    rules: [
        {
            name: "debuggingoutput",
            priority: 1,
            action: {
                responseHeaders: [{
                    headerActionType: "Append",
                    headerName: "X-TEST-HEADER",
                    value: "Append Header Rule",
                }],
            },
        },
        {
            name: "overwriteorigin",
            priority: 2,
            matchConditions: [{
                variable: "RequestMethod",
                operator: "Equal",
                values: [
                    "GET",
                    "POST",
                ],
            }],
            action: {
                responseHeaders: [
                    {
                        headerActionType: "Overwrite",
                        headerName: "Access-Control-Allow-Origin",
                        value: "*",
                    },
                    {
                        headerActionType: "Overwrite",
                        headerName: "Access-Control-Allow-Credentials",
                        value: "true",
                    },
                ],
            },
        },
    ],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="example-rg",
    location="West Europe")
example_frontdoor = azure.frontdoor.Frontdoor("example",
    name="example",
    resource_group_name=example.name,
    backend_pools=[{
        "name": "exampleBackendBing",
        "load_balancing_name": "exampleLoadBalancingSettings1",
        "health_probe_name": "exampleHealthProbeSetting1",
        "backends": [{
            "host_header": "www.bing.com",
            "address": "www.bing.com",
            "http_port": 80,
            "https_port": 443,
        }],
    }],
    backend_pool_health_probes=[{
        "name": "exampleHealthProbeSetting1",
    }],
    backend_pool_load_balancings=[{
        "name": "exampleLoadBalancingSettings1",
    }],
    frontend_endpoints=[{
        "name": "exampleFrontendEndpoint1",
        "host_name": "example-FrontDoor.azurefd.net",
    }],
    routing_rules=[{
        "name": "exampleRoutingRule1",
        "accepted_protocols": [
            "Http",
            "Https",
        ],
        "patterns_to_matches": ["/*"],
        "frontend_endpoints": ["exampleFrontendEndpoint1"],
    }])
example_rules_engine = azure.frontdoor.RulesEngine("example_rules_engine",
    name="exampleRulesEngineConfig1",
    frontdoor_name=example_frontdoor.name,
    resource_group_name=example_frontdoor.resource_group_name,
    rules=[
        {
            "name": "debuggingoutput",
            "priority": 1,
            "action": {
                "response_headers": [{
                    "header_action_type": "Append",
                    "header_name": "X-TEST-HEADER",
                    "value": "Append Header Rule",
                }],
            },
        },
        {
            "name": "overwriteorigin",
            "priority": 2,
            "match_conditions": [{
                "variable": "RequestMethod",
                "operator": "Equal",
                "values": [
                    "GET",
                    "POST",
                ],
            }],
            "action": {
                "response_headers": [
                    {
                        "header_action_type": "Overwrite",
                        "header_name": "Access-Control-Allow-Origin",
                        "value": "*",
                    },
                    {
                        "header_action_type": "Overwrite",
                        "header_name": "Access-Control-Allow-Credentials",
                        "value": "true",
                    },
                ],
            },
        },
    ])
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/frontdoor"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-rg"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleFrontdoor, err := frontdoor.NewFrontdoor(ctx, "example", &frontdoor.FrontdoorArgs{
			Name:              pulumi.String("example"),
			ResourceGroupName: example.Name,
			BackendPools: frontdoor.FrontdoorBackendPoolArray{
				&frontdoor.FrontdoorBackendPoolArgs{
					Name:              pulumi.String("exampleBackendBing"),
					LoadBalancingName: pulumi.String("exampleLoadBalancingSettings1"),
					HealthProbeName:   pulumi.String("exampleHealthProbeSetting1"),
					Backends: frontdoor.FrontdoorBackendPoolBackendArray{
						&frontdoor.FrontdoorBackendPoolBackendArgs{
							HostHeader: pulumi.String("www.bing.com"),
							Address:    pulumi.String("www.bing.com"),
							HttpPort:   pulumi.Int(80),
							HttpsPort:  pulumi.Int(443),
						},
					},
				},
			},
			BackendPoolHealthProbes: frontdoor.FrontdoorBackendPoolHealthProbeArray{
				&frontdoor.FrontdoorBackendPoolHealthProbeArgs{
					Name: pulumi.String("exampleHealthProbeSetting1"),
				},
			},
			BackendPoolLoadBalancings: frontdoor.FrontdoorBackendPoolLoadBalancingArray{
				&frontdoor.FrontdoorBackendPoolLoadBalancingArgs{
					Name: pulumi.String("exampleLoadBalancingSettings1"),
				},
			},
			FrontendEndpoints: frontdoor.FrontdoorFrontendEndpointArray{
				&frontdoor.FrontdoorFrontendEndpointArgs{
					Name:     pulumi.String("exampleFrontendEndpoint1"),
					HostName: pulumi.String("example-FrontDoor.azurefd.net"),
				},
			},
			RoutingRules: frontdoor.FrontdoorRoutingRuleArray{
				&frontdoor.FrontdoorRoutingRuleArgs{
					Name: pulumi.String("exampleRoutingRule1"),
					AcceptedProtocols: pulumi.StringArray{
						pulumi.String("Http"),
						pulumi.String("Https"),
					},
					PatternsToMatches: pulumi.StringArray{
						pulumi.String("/*"),
					},
					FrontendEndpoints: pulumi.StringArray{
						pulumi.String("exampleFrontendEndpoint1"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = frontdoor.NewRulesEngine(ctx, "example_rules_engine", &frontdoor.RulesEngineArgs{
			Name:              pulumi.String("exampleRulesEngineConfig1"),
			FrontdoorName:     exampleFrontdoor.Name,
			ResourceGroupName: exampleFrontdoor.ResourceGroupName,
			Rules: frontdoor.RulesEngineRuleArray{
				&frontdoor.RulesEngineRuleArgs{
					Name:     pulumi.String("debuggingoutput"),
					Priority: pulumi.Int(1),
					Action: &frontdoor.RulesEngineRuleActionArgs{
						ResponseHeaders: frontdoor.RulesEngineRuleActionResponseHeaderArray{
							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
								HeaderActionType: pulumi.String("Append"),
								HeaderName:       pulumi.String("X-TEST-HEADER"),
								Value:            pulumi.String("Append Header Rule"),
							},
						},
					},
				},
				&frontdoor.RulesEngineRuleArgs{
					Name:     pulumi.String("overwriteorigin"),
					Priority: pulumi.Int(2),
					MatchConditions: frontdoor.RulesEngineRuleMatchConditionArray{
						&frontdoor.RulesEngineRuleMatchConditionArgs{
							Variable: pulumi.String("RequestMethod"),
							Operator: pulumi.String("Equal"),
							Values: pulumi.StringArray{
								pulumi.String("GET"),
								pulumi.String("POST"),
							},
						},
					},
					Action: &frontdoor.RulesEngineRuleActionArgs{
						ResponseHeaders: frontdoor.RulesEngineRuleActionResponseHeaderArray{
							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
								HeaderActionType: pulumi.String("Overwrite"),
								HeaderName:       pulumi.String("Access-Control-Allow-Origin"),
								Value:            pulumi.String("*"),
							},
							&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
								HeaderActionType: pulumi.String("Overwrite"),
								HeaderName:       pulumi.String("Access-Control-Allow-Credentials"),
								Value:            pulumi.String("true"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-rg",
        Location = "West Europe",
    });
    var exampleFrontdoor = new Azure.FrontDoor.Frontdoor("example", new()
    {
        Name = "example",
        ResourceGroupName = example.Name,
        BackendPools = new[]
        {
            new Azure.FrontDoor.Inputs.FrontdoorBackendPoolArgs
            {
                Name = "exampleBackendBing",
                LoadBalancingName = "exampleLoadBalancingSettings1",
                HealthProbeName = "exampleHealthProbeSetting1",
                Backends = new[]
                {
                    new Azure.FrontDoor.Inputs.FrontdoorBackendPoolBackendArgs
                    {
                        HostHeader = "www.bing.com",
                        Address = "www.bing.com",
                        HttpPort = 80,
                        HttpsPort = 443,
                    },
                },
            },
        },
        BackendPoolHealthProbes = new[]
        {
            new Azure.FrontDoor.Inputs.FrontdoorBackendPoolHealthProbeArgs
            {
                Name = "exampleHealthProbeSetting1",
            },
        },
        BackendPoolLoadBalancings = new[]
        {
            new Azure.FrontDoor.Inputs.FrontdoorBackendPoolLoadBalancingArgs
            {
                Name = "exampleLoadBalancingSettings1",
            },
        },
        FrontendEndpoints = new[]
        {
            new Azure.FrontDoor.Inputs.FrontdoorFrontendEndpointArgs
            {
                Name = "exampleFrontendEndpoint1",
                HostName = "example-FrontDoor.azurefd.net",
            },
        },
        RoutingRules = new[]
        {
            new Azure.FrontDoor.Inputs.FrontdoorRoutingRuleArgs
            {
                Name = "exampleRoutingRule1",
                AcceptedProtocols = new[]
                {
                    "Http",
                    "Https",
                },
                PatternsToMatches = new[]
                {
                    "/*",
                },
                FrontendEndpoints = new[]
                {
                    "exampleFrontendEndpoint1",
                },
            },
        },
    });
    var exampleRulesEngine = new Azure.FrontDoor.RulesEngine("example_rules_engine", new()
    {
        Name = "exampleRulesEngineConfig1",
        FrontdoorName = exampleFrontdoor.Name,
        ResourceGroupName = exampleFrontdoor.ResourceGroupName,
        Rules = new[]
        {
            new Azure.FrontDoor.Inputs.RulesEngineRuleArgs
            {
                Name = "debuggingoutput",
                Priority = 1,
                Action = new Azure.FrontDoor.Inputs.RulesEngineRuleActionArgs
                {
                    ResponseHeaders = new[]
                    {
                        new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                        {
                            HeaderActionType = "Append",
                            HeaderName = "X-TEST-HEADER",
                            Value = "Append Header Rule",
                        },
                    },
                },
            },
            new Azure.FrontDoor.Inputs.RulesEngineRuleArgs
            {
                Name = "overwriteorigin",
                Priority = 2,
                MatchConditions = new[]
                {
                    new Azure.FrontDoor.Inputs.RulesEngineRuleMatchConditionArgs
                    {
                        Variable = "RequestMethod",
                        Operator = "Equal",
                        Values = new[]
                        {
                            "GET",
                            "POST",
                        },
                    },
                },
                Action = new Azure.FrontDoor.Inputs.RulesEngineRuleActionArgs
                {
                    ResponseHeaders = new[]
                    {
                        new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                        {
                            HeaderActionType = "Overwrite",
                            HeaderName = "Access-Control-Allow-Origin",
                            Value = "*",
                        },
                        new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                        {
                            HeaderActionType = "Overwrite",
                            HeaderName = "Access-Control-Allow-Credentials",
                            Value = "true",
                        },
                    },
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.frontdoor.Frontdoor;
import com.pulumi.azure.frontdoor.FrontdoorArgs;
import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolArgs;
import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolHealthProbeArgs;
import com.pulumi.azure.frontdoor.inputs.FrontdoorBackendPoolLoadBalancingArgs;
import com.pulumi.azure.frontdoor.inputs.FrontdoorFrontendEndpointArgs;
import com.pulumi.azure.frontdoor.inputs.FrontdoorRoutingRuleArgs;
import com.pulumi.azure.frontdoor.RulesEngine;
import com.pulumi.azure.frontdoor.RulesEngineArgs;
import com.pulumi.azure.frontdoor.inputs.RulesEngineRuleArgs;
import com.pulumi.azure.frontdoor.inputs.RulesEngineRuleActionArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-rg")
            .location("West Europe")
            .build());
        var exampleFrontdoor = new Frontdoor("exampleFrontdoor", FrontdoorArgs.builder()
            .name("example")
            .resourceGroupName(example.name())
            .backendPools(FrontdoorBackendPoolArgs.builder()
                .name("exampleBackendBing")
                .loadBalancingName("exampleLoadBalancingSettings1")
                .healthProbeName("exampleHealthProbeSetting1")
                .backends(FrontdoorBackendPoolBackendArgs.builder()
                    .hostHeader("www.bing.com")
                    .address("www.bing.com")
                    .httpPort(80)
                    .httpsPort(443)
                    .build())
                .build())
            .backendPoolHealthProbes(FrontdoorBackendPoolHealthProbeArgs.builder()
                .name("exampleHealthProbeSetting1")
                .build())
            .backendPoolLoadBalancings(FrontdoorBackendPoolLoadBalancingArgs.builder()
                .name("exampleLoadBalancingSettings1")
                .build())
            .frontendEndpoints(FrontdoorFrontendEndpointArgs.builder()
                .name("exampleFrontendEndpoint1")
                .hostName("example-FrontDoor.azurefd.net")
                .build())
            .routingRules(FrontdoorRoutingRuleArgs.builder()
                .name("exampleRoutingRule1")
                .acceptedProtocols(                
                    "Http",
                    "Https")
                .patternsToMatches("/*")
                .frontendEndpoints("exampleFrontendEndpoint1")
                .build())
            .build());
        var exampleRulesEngine = new RulesEngine("exampleRulesEngine", RulesEngineArgs.builder()
            .name("exampleRulesEngineConfig1")
            .frontdoorName(exampleFrontdoor.name())
            .resourceGroupName(exampleFrontdoor.resourceGroupName())
            .rules(            
                RulesEngineRuleArgs.builder()
                    .name("debuggingoutput")
                    .priority(1)
                    .action(RulesEngineRuleActionArgs.builder()
                        .responseHeaders(RulesEngineRuleActionResponseHeaderArgs.builder()
                            .headerActionType("Append")
                            .headerName("X-TEST-HEADER")
                            .value("Append Header Rule")
                            .build())
                        .build())
                    .build(),
                RulesEngineRuleArgs.builder()
                    .name("overwriteorigin")
                    .priority(2)
                    .matchConditions(RulesEngineRuleMatchConditionArgs.builder()
                        .variable("RequestMethod")
                        .operator("Equal")
                        .values(                        
                            "GET",
                            "POST")
                        .build())
                    .action(RulesEngineRuleActionArgs.builder()
                        .responseHeaders(                        
                            RulesEngineRuleActionResponseHeaderArgs.builder()
                                .headerActionType("Overwrite")
                                .headerName("Access-Control-Allow-Origin")
                                .value("*")
                                .build(),
                            RulesEngineRuleActionResponseHeaderArgs.builder()
                                .headerActionType("Overwrite")
                                .headerName("Access-Control-Allow-Credentials")
                                .value("true")
                                .build())
                        .build())
                    .build())
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-rg
      location: West Europe
  exampleFrontdoor:
    type: azure:frontdoor:Frontdoor
    name: example
    properties:
      name: example
      resourceGroupName: ${example.name}
      backendPools:
        - name: exampleBackendBing
          loadBalancingName: exampleLoadBalancingSettings1
          healthProbeName: exampleHealthProbeSetting1
          backends:
            - hostHeader: www.bing.com
              address: www.bing.com
              httpPort: 80
              httpsPort: 443
      backendPoolHealthProbes:
        - name: exampleHealthProbeSetting1
      backendPoolLoadBalancings:
        - name: exampleLoadBalancingSettings1
      frontendEndpoints:
        - name: exampleFrontendEndpoint1
          hostName: example-FrontDoor.azurefd.net
      routingRules:
        - name: exampleRoutingRule1
          acceptedProtocols:
            - Http
            - Https
          patternsToMatches:
            - /*
          frontendEndpoints:
            - exampleFrontendEndpoint1
  exampleRulesEngine:
    type: azure:frontdoor:RulesEngine
    name: example_rules_engine
    properties:
      name: exampleRulesEngineConfig1
      frontdoorName: ${exampleFrontdoor.name}
      resourceGroupName: ${exampleFrontdoor.resourceGroupName}
      rules:
        - name: debuggingoutput
          priority: 1
          action:
            responseHeaders:
              - headerActionType: Append
                headerName: X-TEST-HEADER
                value: Append Header Rule
        - name: overwriteorigin
          priority: 2
          matchConditions:
            - variable: RequestMethod
              operator: Equal
              values:
                - GET
                - POST
          action:
            responseHeaders:
              - headerActionType: Overwrite
                headerName: Access-Control-Allow-Origin
                value: '*'
              - headerActionType: Overwrite
                headerName: Access-Control-Allow-Credentials
                value: 'true'
Create RulesEngine Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RulesEngine(name: string, args: RulesEngineArgs, opts?: CustomResourceOptions);@overload
def RulesEngine(resource_name: str,
                args: RulesEngineArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def RulesEngine(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                frontdoor_name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                enabled: Optional[bool] = None,
                name: Optional[str] = None,
                rules: Optional[Sequence[RulesEngineRuleArgs]] = None)func NewRulesEngine(ctx *Context, name string, args RulesEngineArgs, opts ...ResourceOption) (*RulesEngine, error)public RulesEngine(string name, RulesEngineArgs args, CustomResourceOptions? opts = null)
public RulesEngine(String name, RulesEngineArgs args)
public RulesEngine(String name, RulesEngineArgs args, CustomResourceOptions options)
type: azure:frontdoor:RulesEngine
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 RulesEngineArgs
- 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 RulesEngineArgs
- 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 RulesEngineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RulesEngineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RulesEngineArgs
- 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 rulesEngineResource = new Azure.FrontDoor.RulesEngine("rulesEngineResource", new()
{
    FrontdoorName = "string",
    ResourceGroupName = "string",
    Enabled = false,
    Name = "string",
    Rules = new[]
    {
        new Azure.FrontDoor.Inputs.RulesEngineRuleArgs
        {
            Name = "string",
            Priority = 0,
            Action = new Azure.FrontDoor.Inputs.RulesEngineRuleActionArgs
            {
                RequestHeaders = new[]
                {
                    new Azure.FrontDoor.Inputs.RulesEngineRuleActionRequestHeaderArgs
                    {
                        HeaderActionType = "string",
                        HeaderName = "string",
                        Value = "string",
                    },
                },
                ResponseHeaders = new[]
                {
                    new Azure.FrontDoor.Inputs.RulesEngineRuleActionResponseHeaderArgs
                    {
                        HeaderActionType = "string",
                        HeaderName = "string",
                        Value = "string",
                    },
                },
            },
            MatchConditions = new[]
            {
                new Azure.FrontDoor.Inputs.RulesEngineRuleMatchConditionArgs
                {
                    Operator = "string",
                    NegateCondition = false,
                    Selector = "string",
                    Transforms = new[]
                    {
                        "string",
                    },
                    Values = new[]
                    {
                        "string",
                    },
                    Variable = "string",
                },
            },
        },
    },
});
example, err := frontdoor.NewRulesEngine(ctx, "rulesEngineResource", &frontdoor.RulesEngineArgs{
	FrontdoorName:     pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	Enabled:           pulumi.Bool(false),
	Name:              pulumi.String("string"),
	Rules: frontdoor.RulesEngineRuleArray{
		&frontdoor.RulesEngineRuleArgs{
			Name:     pulumi.String("string"),
			Priority: pulumi.Int(0),
			Action: &frontdoor.RulesEngineRuleActionArgs{
				RequestHeaders: frontdoor.RulesEngineRuleActionRequestHeaderArray{
					&frontdoor.RulesEngineRuleActionRequestHeaderArgs{
						HeaderActionType: pulumi.String("string"),
						HeaderName:       pulumi.String("string"),
						Value:            pulumi.String("string"),
					},
				},
				ResponseHeaders: frontdoor.RulesEngineRuleActionResponseHeaderArray{
					&frontdoor.RulesEngineRuleActionResponseHeaderArgs{
						HeaderActionType: pulumi.String("string"),
						HeaderName:       pulumi.String("string"),
						Value:            pulumi.String("string"),
					},
				},
			},
			MatchConditions: frontdoor.RulesEngineRuleMatchConditionArray{
				&frontdoor.RulesEngineRuleMatchConditionArgs{
					Operator:        pulumi.String("string"),
					NegateCondition: pulumi.Bool(false),
					Selector:        pulumi.String("string"),
					Transforms: pulumi.StringArray{
						pulumi.String("string"),
					},
					Values: pulumi.StringArray{
						pulumi.String("string"),
					},
					Variable: pulumi.String("string"),
				},
			},
		},
	},
})
var rulesEngineResource = new RulesEngine("rulesEngineResource", RulesEngineArgs.builder()
    .frontdoorName("string")
    .resourceGroupName("string")
    .enabled(false)
    .name("string")
    .rules(RulesEngineRuleArgs.builder()
        .name("string")
        .priority(0)
        .action(RulesEngineRuleActionArgs.builder()
            .requestHeaders(RulesEngineRuleActionRequestHeaderArgs.builder()
                .headerActionType("string")
                .headerName("string")
                .value("string")
                .build())
            .responseHeaders(RulesEngineRuleActionResponseHeaderArgs.builder()
                .headerActionType("string")
                .headerName("string")
                .value("string")
                .build())
            .build())
        .matchConditions(RulesEngineRuleMatchConditionArgs.builder()
            .operator("string")
            .negateCondition(false)
            .selector("string")
            .transforms("string")
            .values("string")
            .variable("string")
            .build())
        .build())
    .build());
rules_engine_resource = azure.frontdoor.RulesEngine("rulesEngineResource",
    frontdoor_name="string",
    resource_group_name="string",
    enabled=False,
    name="string",
    rules=[{
        "name": "string",
        "priority": 0,
        "action": {
            "request_headers": [{
                "header_action_type": "string",
                "header_name": "string",
                "value": "string",
            }],
            "response_headers": [{
                "header_action_type": "string",
                "header_name": "string",
                "value": "string",
            }],
        },
        "match_conditions": [{
            "operator": "string",
            "negate_condition": False,
            "selector": "string",
            "transforms": ["string"],
            "values": ["string"],
            "variable": "string",
        }],
    }])
const rulesEngineResource = new azure.frontdoor.RulesEngine("rulesEngineResource", {
    frontdoorName: "string",
    resourceGroupName: "string",
    enabled: false,
    name: "string",
    rules: [{
        name: "string",
        priority: 0,
        action: {
            requestHeaders: [{
                headerActionType: "string",
                headerName: "string",
                value: "string",
            }],
            responseHeaders: [{
                headerActionType: "string",
                headerName: "string",
                value: "string",
            }],
        },
        matchConditions: [{
            operator: "string",
            negateCondition: false,
            selector: "string",
            transforms: ["string"],
            values: ["string"],
            variable: "string",
        }],
    }],
});
type: azure:frontdoor:RulesEngine
properties:
    enabled: false
    frontdoorName: string
    name: string
    resourceGroupName: string
    rules:
        - action:
            requestHeaders:
                - headerActionType: string
                  headerName: string
                  value: string
            responseHeaders:
                - headerActionType: string
                  headerName: string
                  value: string
          matchConditions:
            - negateCondition: false
              operator: string
              selector: string
              transforms:
                - string
              values:
                - string
              variable: string
          name: string
          priority: 0
RulesEngine 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 RulesEngine resource accepts the following input properties:
- FrontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- Enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- Name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- Rules
List<RulesEngine Rule> 
- A ruleblock as defined below.
- FrontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- Enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- Name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- Rules
[]RulesEngine Rule Args 
- A ruleblock as defined below.
- frontdoorName String
- The name of the Front Door instance. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group. Changing this forces a new resource to be created.
- enabled Boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- name String
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- rules
List<RulesEngine Rule> 
- A ruleblock as defined below.
- frontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- resourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- enabled boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- rules
RulesEngine Rule[] 
- A ruleblock as defined below.
- frontdoor_name str
- The name of the Front Door instance. Changing this forces a new resource to be created.
- resource_group_ strname 
- The name of the resource group. Changing this forces a new resource to be created.
- enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- name str
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- rules
Sequence[RulesEngine Rule Args] 
- A ruleblock as defined below.
- frontdoorName String
- The name of the Front Door instance. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group. Changing this forces a new resource to be created.
- enabled Boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- name String
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- rules List<Property Map>
- A ruleblock as defined below.
Outputs
All input properties are implicitly available as output properties. Additionally, the RulesEngine resource produces the following output properties:
Look up Existing RulesEngine Resource
Get an existing RulesEngine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RulesEngineState, opts?: CustomResourceOptions): RulesEngine@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        frontdoor_name: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        rules: Optional[Sequence[RulesEngineRuleArgs]] = None) -> RulesEnginefunc GetRulesEngine(ctx *Context, name string, id IDInput, state *RulesEngineState, opts ...ResourceOption) (*RulesEngine, error)public static RulesEngine Get(string name, Input<string> id, RulesEngineState? state, CustomResourceOptions? opts = null)public static RulesEngine get(String name, Output<String> id, RulesEngineState state, CustomResourceOptions options)resources:  _:    type: azure:frontdoor:RulesEngine    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- FrontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- Location string
- Name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- Rules
List<RulesEngine Rule> 
- A ruleblock as defined below.
- Enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- FrontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- Location string
- Name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- Rules
[]RulesEngine Rule Args 
- A ruleblock as defined below.
- enabled Boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- frontdoorName String
- The name of the Front Door instance. Changing this forces a new resource to be created.
- location String
- name String
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group. Changing this forces a new resource to be created.
- rules
List<RulesEngine Rule> 
- A ruleblock as defined below.
- enabled boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- frontdoorName string
- The name of the Front Door instance. Changing this forces a new resource to be created.
- location string
- name string
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- resourceGroup stringName 
- The name of the resource group. Changing this forces a new resource to be created.
- rules
RulesEngine Rule[] 
- A ruleblock as defined below.
- enabled bool
- Whether this Rules engine configuration is enabled? Defaults to true.
- frontdoor_name str
- The name of the Front Door instance. Changing this forces a new resource to be created.
- location str
- name str
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- resource_group_ strname 
- The name of the resource group. Changing this forces a new resource to be created.
- rules
Sequence[RulesEngine Rule Args] 
- A ruleblock as defined below.
- enabled Boolean
- Whether this Rules engine configuration is enabled? Defaults to true.
- frontdoorName String
- The name of the Front Door instance. Changing this forces a new resource to be created.
- location String
- name String
- The name of the Rules engine configuration. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group. Changing this forces a new resource to be created.
- rules List<Property Map>
- A ruleblock as defined below.
Supporting Types
RulesEngineRule, RulesEngineRuleArgs      
- Name string
- The name of the rule.
- Priority int
- Priority of the rule, must be unique per rules engine definition.
- Action
RulesEngine Rule Action 
- An actionblock as defined below.
- MatchConditions List<RulesEngine Rule Match Condition> 
- One or more match_conditionblock as defined below.
- Name string
- The name of the rule.
- Priority int
- Priority of the rule, must be unique per rules engine definition.
- Action
RulesEngine Rule Action 
- An actionblock as defined below.
- MatchConditions []RulesEngine Rule Match Condition 
- One or more match_conditionblock as defined below.
- name String
- The name of the rule.
- priority Integer
- Priority of the rule, must be unique per rules engine definition.
- action
RulesEngine Rule Action 
- An actionblock as defined below.
- matchConditions List<RulesEngine Rule Match Condition> 
- One or more match_conditionblock as defined below.
- name string
- The name of the rule.
- priority number
- Priority of the rule, must be unique per rules engine definition.
- action
RulesEngine Rule Action 
- An actionblock as defined below.
- matchConditions RulesEngine Rule Match Condition[] 
- One or more match_conditionblock as defined below.
- name str
- The name of the rule.
- priority int
- Priority of the rule, must be unique per rules engine definition.
- action
RulesEngine Rule Action 
- An actionblock as defined below.
- match_conditions Sequence[RulesEngine Rule Match Condition] 
- One or more match_conditionblock as defined below.
- name String
- The name of the rule.
- priority Number
- Priority of the rule, must be unique per rules engine definition.
- action Property Map
- An actionblock as defined below.
- matchConditions List<Property Map>
- One or more match_conditionblock as defined below.
RulesEngineRuleAction, RulesEngineRuleActionArgs        
- RequestHeaders List<RulesEngine Rule Action Request Header> 
- A request_headerblock as defined below.
- ResponseHeaders List<RulesEngine Rule Action Response Header> 
- A response_headerblock as defined below.
- RequestHeaders []RulesEngine Rule Action Request Header 
- A request_headerblock as defined below.
- ResponseHeaders []RulesEngine Rule Action Response Header 
- A response_headerblock as defined below.
- requestHeaders List<RulesEngine Rule Action Request Header> 
- A request_headerblock as defined below.
- responseHeaders List<RulesEngine Rule Action Response Header> 
- A response_headerblock as defined below.
- requestHeaders RulesEngine Rule Action Request Header[] 
- A request_headerblock as defined below.
- responseHeaders RulesEngine Rule Action Response Header[] 
- A response_headerblock as defined below.
- request_headers Sequence[RulesEngine Rule Action Request Header] 
- A request_headerblock as defined below.
- response_headers Sequence[RulesEngine Rule Action Response Header] 
- A response_headerblock as defined below.
- requestHeaders List<Property Map>
- A request_headerblock as defined below.
- responseHeaders List<Property Map>
- A response_headerblock as defined below.
RulesEngineRuleActionRequestHeader, RulesEngineRuleActionRequestHeaderArgs            
- HeaderAction stringType 
- can be set to Overwrite,AppendorDelete.
- HeaderName string
- header name (string).
- Value string
- value name (string).
- HeaderAction stringType 
- can be set to Overwrite,AppendorDelete.
- HeaderName string
- header name (string).
- Value string
- value name (string).
- headerAction StringType 
- can be set to Overwrite,AppendorDelete.
- headerName String
- header name (string).
- value String
- value name (string).
- headerAction stringType 
- can be set to Overwrite,AppendorDelete.
- headerName string
- header name (string).
- value string
- value name (string).
- header_action_ strtype 
- can be set to Overwrite,AppendorDelete.
- header_name str
- header name (string).
- value str
- value name (string).
- headerAction StringType 
- can be set to Overwrite,AppendorDelete.
- headerName String
- header name (string).
- value String
- value name (string).
RulesEngineRuleActionResponseHeader, RulesEngineRuleActionResponseHeaderArgs            
- HeaderAction stringType 
- can be set to Overwrite,AppendorDelete.
- HeaderName string
- header name (string).
- Value string
- value name (string).
- HeaderAction stringType 
- can be set to Overwrite,AppendorDelete.
- HeaderName string
- header name (string).
- Value string
- value name (string).
- headerAction StringType 
- can be set to Overwrite,AppendorDelete.
- headerName String
- header name (string).
- value String
- value name (string).
- headerAction stringType 
- can be set to Overwrite,AppendorDelete.
- headerName string
- header name (string).
- value string
- value name (string).
- header_action_ strtype 
- can be set to Overwrite,AppendorDelete.
- header_name str
- header name (string).
- value str
- value name (string).
- headerAction StringType 
- can be set to Overwrite,AppendorDelete.
- headerName String
- header name (string).
- value String
- value name (string).
RulesEngineRuleMatchCondition, RulesEngineRuleMatchConditionArgs          
- Operator string
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- NegateCondition bool
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- Selector string
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- Transforms List<string>
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- Values List<string>
- (array) can contain one or more strings.
- Variable string
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
- Operator string
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- NegateCondition bool
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- Selector string
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- Transforms []string
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- Values []string
- (array) can contain one or more strings.
- Variable string
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
- operator String
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- negateCondition Boolean
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- selector String
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- transforms List<String>
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- values List<String>
- (array) can contain one or more strings.
- variable String
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
- operator string
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- negateCondition boolean
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- selector string
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- transforms string[]
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- values string[]
- (array) can contain one or more strings.
- variable string
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
- operator str
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- negate_condition bool
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- selector str
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- transforms Sequence[str]
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- values Sequence[str]
- (array) can contain one or more strings.
- variable str
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
- operator String
- can be set to Any,IPMatch,GeoMatch,Equal,Contains,LessThan,GreaterThan,LessThanOrEqual,GreaterThanOrEqual,BeginsWithorEndsWith
- negateCondition Boolean
- can be set to trueorfalseto negate the given condition. Defaults tofalse.
- selector String
- match against a specific key when variableis set toPostArgsorRequestHeader. It cannot be used withQueryStringandRequestMethod.
- transforms List<String>
- can be set to one or more values out of Lowercase,RemoveNulls,Trim,Uppercase,UrlDecodeandUrlEncode
- values List<String>
- (array) can contain one or more strings.
- variable String
- can be set to IsMobile,RemoteAddr,RequestMethod,QueryString,PostArgs,RequestURI,RequestPath,RequestFilename,RequestFilenameExtension,RequestHeader,RequestBodyorRequestScheme.
Import
Azure Front Door Rules Engine’s can be imported using the resource id, e.g.
$ pulumi import azure:frontdoor/rulesEngine:RulesEngine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/frontdoors/frontdoor1/rulesEngines/rule1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.