Resource: awsRoute53ResolverRule
Provides a Route53 Resolver rule.
Example Usage
System rule
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.route53ResolverRule.Route53ResolverRule(this, "sys", {
domainName: "subdomain.example.com",
ruleType: "SYSTEM",
});
Forward rule
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.route53ResolverRule.Route53ResolverRule(this, "fwd", {
domainName: "example.com",
name: "example",
resolverEndpointId: "${aws_route53_resolver_endpoint.foo.id}",
ruleType: "FORWARD",
tags: {
Environment: "Prod",
},
targetIp: [
{
ip: "123.45.67.89",
},
],
});
Argument Reference
The following arguments are supported:
domainName
- (Required) DNS queries for this domain name are forwarded to the IP addresses that are specified usingtargetIp
.ruleType
- (Required) The rule type. Valid values areforward
,system
andrecursive
.name
- (Optional) A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console.resolverEndpointId
(Optional) The ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify usingtargetIp
. This argument should only be specified forforward
type rules.targetIp
- (Optional) Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified forforward
type rules.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
The targetIp
object supports the following:
ip
- (Required) One IP address that you want to forward DNS queries to. You can specify only IPv4 addresses.port
- (Optional) The port atip
that you want to forward DNS queries to. Default value is53
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the resolver rule.arn
- The ARN (Amazon Resource Name) for the resolver rule.ownerId
- When a rule is shared with another AWS account, the account ID of the account that the rule is shared with.shareStatus
- 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 areNOT_SHARED
,SHARED_BY_ME
orSHARED_WITH_ME
tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Route53 Resolver rules can be imported using the id
, e.g.,