Resolver Rule
Provides a Route53 Resolver rule.
Example Usage
System rule
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.ResolverRule;
import com.pulumi.aws.route53.ResolverRuleArgs;
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 sys = new ResolverRule("sys", ResolverRuleArgs.builder()
.domainName("subdomain.example.com")
.ruleType("SYSTEM")
.build());
}
}
Forward rule
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.ResolverRule;
import com.pulumi.aws.route53.ResolverRuleArgs;
import com.pulumi.aws.route53.inputs.ResolverRuleTargetIpArgs;
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 fwd = new ResolverRule("fwd", ResolverRuleArgs.builder()
.domainName("example.com")
.ruleType("FORWARD")
.resolverEndpointId(aws_route53_resolver_endpoint.foo().id())
.targetIps(ResolverRuleTargetIpArgs.builder()
.ip("123.45.67.89")
.build())
.tags(Map.of("Environment", "Prod"))
.build());
}
}
Import
Route53 Resolver rules can be imported using the id
, e.g.,
$ pulumi import aws:route53/resolverRule:ResolverRule sys rslvr-rr-0123456789abcdef0
Properties
DNS queries for this domain name are forwarded to the IP addresses that are specified using target_ip
.
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 for FORWARD
type rules.
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
Configuration block(s) indicating the IPs that you want Resolver to forward DNS queries to (documented below). This argument should only be specified for FORWARD
type rules.