ResolverRule
Provides a Route53 Resolver rule.
Example Usage
System rule
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var sys = new Aws.Route53.ResolverRule("sys", new Aws.Route53.ResolverRuleArgs
{
DomainName = "subdomain.example.com",
RuleType = "SYSTEM",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/route53"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := route53.NewResolverRule(ctx, "sys", &route53.ResolverRuleArgs{
DomainName: pulumi.String("subdomain.example.com"),
RuleType: pulumi.String("SYSTEM"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
sys = aws.route53.ResolverRule("sys",
domain_name="subdomain.example.com",
rule_type="SYSTEM")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const sys = new aws.route53.ResolverRule("sys", {
domainName: "subdomain.example.com",
ruleType: "SYSTEM",
});Forward rule
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fwd = new Aws.Route53.ResolverRule("fwd", new Aws.Route53.ResolverRuleArgs
{
DomainName = "example.com",
ResolverEndpointId = aws_route53_resolver_endpoint.Foo.Id,
RuleType = "FORWARD",
Tags =
{
{ "Environment", "Prod" },
},
TargetIps =
{
new Aws.Route53.Inputs.ResolverRuleTargetIpArgs
{
Ip = "123.45.67.89",
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/route53"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := route53.NewResolverRule(ctx, "fwd", &route53.ResolverRuleArgs{
DomainName: pulumi.String("example.com"),
ResolverEndpointId: pulumi.String(aws_route53_resolver_endpoint.Foo.Id),
RuleType: pulumi.String("FORWARD"),
Tags: pulumi.StringMap{
"Environment": pulumi.String("Prod"),
},
TargetIps: route53.ResolverRuleTargetIpArray{
&route53.ResolverRuleTargetIpArgs{
Ip: pulumi.String("123.45.67.89"),
},
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
fwd = aws.route53.ResolverRule("fwd",
domain_name="example.com",
resolver_endpoint_id=aws_route53_resolver_endpoint["foo"]["id"],
rule_type="FORWARD",
tags={
"Environment": "Prod",
},
target_ips=[{
"ip": "123.45.67.89",
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const fwd = new aws.route53.ResolverRule("fwd", {
domainName: "example.com",
resolverEndpointId: aws_route53_resolver_endpoint_foo.id,
ruleType: "FORWARD",
tags: {
Environment: "Prod",
},
targetIps: [{
ip: "123.45.67.89",
}],
});Create a ResolverRule Resource
new ResolverRule(name: string, args: ResolverRuleArgs, opts?: CustomResourceOptions);def ResolverRule(resource_name, opts=None, domain_name=None, name=None, resolver_endpoint_id=None, rule_type=None, tags=None, target_ips=None, __props__=None);func NewResolverRule(ctx *Context, name string, args ResolverRuleArgs, opts ...ResourceOption) (*ResolverRule, error)public ResolverRule(string name, ResolverRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ResolverRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResolverRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResolverRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ResolverRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ResolverRule resource accepts the following input properties:
- Domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- Rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- Name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- Resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- Dictionary<string, string>
A map of tags to assign to the resource.
- Target
Ips List<ResolverRule Target Ip Args> Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- Domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- Rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- Name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- Resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- map[string]string
A map of tags to assign to the resource.
- Target
Ips []ResolverRule Target Ip Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- {[key: string]: string}
A map of tags to assign to the resource.
- target
Ips ResolverRule Target Ip[] Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- domain_
name str DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- rule_
type str The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- name str
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- resolver_
endpoint_ strid The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- Dict[str, str]
A map of tags to assign to the resource.
- target_
ips List[ResolverRule Target Ip] Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
Outputs
All input properties are implicitly available as output properties. Additionally, the ResolverRule resource produces the following output properties:
- Arn string
The ARN (Amazon Resource Name) for the resolver rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- Arn string
The ARN (Amazon Resource Name) for the resolver rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- arn string
The ARN (Amazon Resource Name) for the resolver rule.
- id string
- The provider-assigned unique ID for this managed resource.
- owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
- arn str
The ARN (Amazon Resource Name) for the resolver rule.
- id str
- The provider-assigned unique ID for this managed resource.
- owner_
id str When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- str
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME
Look up an Existing ResolverRule Resource
Get an existing ResolverRule 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?: ResolverRuleState, opts?: CustomResourceOptions): ResolverRulestatic get(resource_name, id, opts=None, arn=None, domain_name=None, name=None, owner_id=None, resolver_endpoint_id=None, rule_type=None, share_status=None, tags=None, target_ips=None, __props__=None);func GetResolverRule(ctx *Context, name string, id IDInput, state *ResolverRuleState, opts ...ResourceOption) (*ResolverRule, error)public static ResolverRule Get(string name, Input<string> id, ResolverRuleState? 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:
- Arn string
The ARN (Amazon Resource Name) for the resolver rule.
- Domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- Name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- Owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- Resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- Rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME- Dictionary<string, string>
A map of tags to assign to the resource.
- Target
Ips List<ResolverRule Target Ip Args> Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- Arn string
The ARN (Amazon Resource Name) for the resolver rule.
- Domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- Name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- Owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- Resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- Rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME- map[string]string
A map of tags to assign to the resource.
- Target
Ips []ResolverRule Target Ip Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- arn string
The ARN (Amazon Resource Name) for the resolver rule.
- domain
Name string DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- name string
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- owner
Id string When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- resolver
Endpoint stringId The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- rule
Type string The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- string
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME- {[key: string]: string}
A map of tags to assign to the resource.
- target
Ips ResolverRule Target Ip[] Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
- arn str
The ARN (Amazon Resource Name) for the resolver rule.
- domain_
name str DNS queries for this domain name are forwarded to the IP addresses that are specified using
target_ip.- name str
A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.
- owner_
id str When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.
- resolver_
endpoint_ strid The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using
target_ip. This argument should only be specified forFORWARDtype rules.- rule_
type str The rule type. Valid values are
FORWARD,SYSTEMandRECURSIVE.- str
Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or another account is sharing the rule with the current account. Values are
NOT_SHARED,SHARED_BY_MEorSHARED_WITH_ME- Dict[str, str]
A map of tags to assign to the resource.
- target_
ips List[ResolverRule Target Ip] Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for
FORWARDtype rules.
Supporting Types
ResolverRuleTargetIp
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.