Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.30.0 published on Tuesday, Nov 30, 2021 by Pulumi

ResolverFirewallRule

Provides a Route 53 Resolver DNS Firewall rule resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResolverFirewallDomainList = new Aws.Route53.ResolverFirewallDomainList("exampleResolverFirewallDomainList", new Aws.Route53.ResolverFirewallDomainListArgs
        {
            Domains = 
            {
                "example.com",
            },
            Tags = ,
        });
        var exampleResolverFirewallRuleGroup = new Aws.Route53.ResolverFirewallRuleGroup("exampleResolverFirewallRuleGroup", new Aws.Route53.ResolverFirewallRuleGroupArgs
        {
            Tags = ,
        });
        var exampleResolverFirewallRule = new Aws.Route53.ResolverFirewallRule("exampleResolverFirewallRule", new Aws.Route53.ResolverFirewallRuleArgs
        {
            Action = "BLOCK",
            BlockOverrideDnsType = "CNAME",
            BlockOverrideDomain = "example.com",
            BlockOverrideTtl = 1,
            BlockResponse = "OVERRIDE",
            FirewallDomainListId = exampleResolverFirewallDomainList.Id,
            FirewallRuleGroupId = exampleResolverFirewallRuleGroup.Id,
            Priority = 100,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/route53"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResolverFirewallDomainList, err := route53.NewResolverFirewallDomainList(ctx, "exampleResolverFirewallDomainList", &route53.ResolverFirewallDomainListArgs{
			Domains: pulumi.StringArray{
				pulumi.String("example.com"),
			},
			Tags: nil,
		})
		if err != nil {
			return err
		}
		exampleResolverFirewallRuleGroup, err := route53.NewResolverFirewallRuleGroup(ctx, "exampleResolverFirewallRuleGroup", &route53.ResolverFirewallRuleGroupArgs{
			Tags: nil,
		})
		if err != nil {
			return err
		}
		_, err = route53.NewResolverFirewallRule(ctx, "exampleResolverFirewallRule", &route53.ResolverFirewallRuleArgs{
			Action:               pulumi.String("BLOCK"),
			BlockOverrideDnsType: pulumi.String("CNAME"),
			BlockOverrideDomain:  pulumi.String("example.com"),
			BlockOverrideTtl:     pulumi.Int(1),
			BlockResponse:        pulumi.String("OVERRIDE"),
			FirewallDomainListId: exampleResolverFirewallDomainList.ID(),
			FirewallRuleGroupId:  exampleResolverFirewallRuleGroup.ID(),
			Priority:             pulumi.Int(100),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example_resolver_firewall_domain_list = aws.route53.ResolverFirewallDomainList("exampleResolverFirewallDomainList",
    domains=["example.com"],
    tags={})
example_resolver_firewall_rule_group = aws.route53.ResolverFirewallRuleGroup("exampleResolverFirewallRuleGroup", tags={})
example_resolver_firewall_rule = aws.route53.ResolverFirewallRule("exampleResolverFirewallRule",
    action="BLOCK",
    block_override_dns_type="CNAME",
    block_override_domain="example.com",
    block_override_ttl=1,
    block_response="OVERRIDE",
    firewall_domain_list_id=example_resolver_firewall_domain_list.id,
    firewall_rule_group_id=example_resolver_firewall_rule_group.id,
    priority=100)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleResolverFirewallDomainList = new aws.route53.ResolverFirewallDomainList("exampleResolverFirewallDomainList", {
    domains: ["example.com"],
    tags: {},
});
const exampleResolverFirewallRuleGroup = new aws.route53.ResolverFirewallRuleGroup("exampleResolverFirewallRuleGroup", {tags: {}});
const exampleResolverFirewallRule = new aws.route53.ResolverFirewallRule("exampleResolverFirewallRule", {
    action: "BLOCK",
    blockOverrideDnsType: "CNAME",
    blockOverrideDomain: "example.com",
    blockOverrideTtl: 1,
    blockResponse: "OVERRIDE",
    firewallDomainListId: exampleResolverFirewallDomainList.id,
    firewallRuleGroupId: exampleResolverFirewallRuleGroup.id,
    priority: 100,
});

Create a ResolverFirewallRule Resource

new ResolverFirewallRule(name: string, args: ResolverFirewallRuleArgs, opts?: CustomResourceOptions);
@overload
def ResolverFirewallRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         action: Optional[str] = None,
                         block_override_dns_type: Optional[str] = None,
                         block_override_domain: Optional[str] = None,
                         block_override_ttl: Optional[int] = None,
                         block_response: Optional[str] = None,
                         firewall_domain_list_id: Optional[str] = None,
                         firewall_rule_group_id: Optional[str] = None,
                         name: Optional[str] = None,
                         priority: Optional[int] = None)
@overload
def ResolverFirewallRule(resource_name: str,
                         args: ResolverFirewallRuleArgs,
                         opts: Optional[ResourceOptions] = None)
func NewResolverFirewallRule(ctx *Context, name string, args ResolverFirewallRuleArgs, opts ...ResourceOption) (*ResolverFirewallRule, error)
public ResolverFirewallRule(string name, ResolverFirewallRuleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ResolverFirewallRuleArgs
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 ResolverFirewallRuleArgs
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 ResolverFirewallRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResolverFirewallRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ResolverFirewallRule 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 ResolverFirewallRule resource accepts the following input properties:

Action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
FirewallDomainListId string
The ID of the domain list that you want to use in the rule.
FirewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
Priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
BlockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
BlockOverrideDomain string
The custom DNS record to send back in response to the query.
BlockOverrideTtl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
BlockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
Name string
A name that lets you identify the rule, to manage and use it.
Action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
FirewallDomainListId string
The ID of the domain list that you want to use in the rule.
FirewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
Priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
BlockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
BlockOverrideDomain string
The custom DNS record to send back in response to the query.
BlockOverrideTtl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
BlockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
Name string
A name that lets you identify the rule, to manage and use it.
action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
firewallDomainListId string
The ID of the domain list that you want to use in the rule.
firewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
priority number
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
blockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
blockOverrideDomain string
The custom DNS record to send back in response to the query.
blockOverrideTtl number
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
blockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
name string
A name that lets you identify the rule, to manage and use it.
action str
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
firewall_domain_list_id str
The ID of the domain list that you want to use in the rule.
firewall_rule_group_id str
The unique identifier of the firewall rule group where you want to create the rule.
priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
block_override_dns_type str
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
block_override_domain str
The custom DNS record to send back in response to the query.
block_override_ttl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
block_response str
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
name str
A name that lets you identify the rule, to manage and use it.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ResolverFirewallRule Resource

Get an existing ResolverFirewallRule 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?: ResolverFirewallRuleState, opts?: CustomResourceOptions): ResolverFirewallRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        block_override_dns_type: Optional[str] = None,
        block_override_domain: Optional[str] = None,
        block_override_ttl: Optional[int] = None,
        block_response: Optional[str] = None,
        firewall_domain_list_id: Optional[str] = None,
        firewall_rule_group_id: Optional[str] = None,
        name: Optional[str] = None,
        priority: Optional[int] = None) -> ResolverFirewallRule
func GetResolverFirewallRule(ctx *Context, name string, id IDInput, state *ResolverFirewallRuleState, opts ...ResourceOption) (*ResolverFirewallRule, error)
public static ResolverFirewallRule Get(string name, Input<string> id, ResolverFirewallRuleState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
BlockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
BlockOverrideDomain string
The custom DNS record to send back in response to the query.
BlockOverrideTtl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
BlockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
FirewallDomainListId string
The ID of the domain list that you want to use in the rule.
FirewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
Name string
A name that lets you identify the rule, to manage and use it.
Priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
Action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
BlockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
BlockOverrideDomain string
The custom DNS record to send back in response to the query.
BlockOverrideTtl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
BlockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
FirewallDomainListId string
The ID of the domain list that you want to use in the rule.
FirewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
Name string
A name that lets you identify the rule, to manage and use it.
Priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
action string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
blockOverrideDnsType string
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
blockOverrideDomain string
The custom DNS record to send back in response to the query.
blockOverrideTtl number
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
blockResponse string
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
firewallDomainListId string
The ID of the domain list that you want to use in the rule.
firewallRuleGroupId string
The unique identifier of the firewall rule group where you want to create the rule.
name string
A name that lets you identify the rule, to manage and use it.
priority number
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.
action str
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list. Valid values: ALLOW, BLOCK, ALERT.
block_override_dns_type str
The DNS record’s type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values: CNAME.
block_override_domain str
The custom DNS record to send back in response to the query.
block_override_ttl int
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of 0. Maximum value of 604800.
block_response str
The way that you want DNS Firewall to block the request. Valid values: NODATA, NXDOMAIN, OVERRIDE.
firewall_domain_list_id str
The ID of the domain list that you want to use in the rule.
firewall_rule_group_id str
The unique identifier of the firewall rule group where you want to create the rule.
name str
A name that lets you identify the rule, to manage and use it.
priority int
The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.

Import

Route 53 Resolver DNS Firewall rules can be imported using the Route 53 Resolver DNS Firewall rule group ID and domain list ID separated by ‘:’, e.g.,

 $ pulumi import aws:route53/resolverFirewallRule:ResolverFirewallRule example rslvr-frg-0123456789abcdef:rslvr-fdl-0123456789abcdef

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.