Skip to content

Data Source: awsRoute53ResolverRule

awsRoute53ResolverRule provides details about a specific Route53 Resolver rule.

Example Usage

The following example shows how to get a Route53 Resolver rule based on its associated domain name and rule type.

/*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.dataAwsRoute53ResolverRule.DataAwsRoute53ResolverRule(this, "example", {
  domainName: "subdomain.example.com",
  ruleType: "SYSTEM",
});

Argument Reference

The arguments of this data source act as filters for querying the available resolver rules in the current region. The given filters must match exactly one resolver rule whose data will be exported as attributes.

  • domainName - (Optional) Domain name the desired resolver rule forwards DNS queries for. Conflicts with resolverRuleId.
  • name - (Optional) Friendly name of the desired resolver rule. Conflicts with resolverRuleId.
  • resolverEndpointId (Optional) ID of the outbound resolver endpoint of the desired resolver rule. Conflicts with resolverRuleId.
  • resolverRuleId (Optional) ID of the desired resolver rule. Conflicts with domainName, name, resolverEndpointId and ruleType.
  • ruleType - (Optional) Rule type of the desired resolver rule. Valid values are forward, system and recursive. Conflicts with resolverRuleId.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - ID of the resolver rule.
  • arn - 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 are NOT_SHARED, SHARED_BY_ME or SHARED_WITH_ME
  • tags - Map of tags assigned to the resolver rule.