UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

250 lines (249 loc) • 9.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a Route53 Resolver rule. * * ## Example Usage * * ### System rule * * ```typescript * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const fwd = new aws.route53.ResolverRule("fwd", { * domainName: "example.com", * name: "example", * ruleType: "FORWARD", * resolverEndpointId: foo.id, * targetIps: [{ * ip: "123.45.67.89", * }], * tags: { * Environment: "Prod", * }, * }); * ``` * * ### IPv6 Forward rule * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const fwd = new aws.route53.ResolverRule("fwd", { * domainName: "example.com", * name: "example", * ruleType: "FORWARD", * resolverEndpointId: foo.id, * targetIps: [{ * ipv6: "2600:1f18:1686:2000:4e60:6e3e:258:da36", * }], * tags: { * Environment: "Prod", * }, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `id` - (String) ID of the Route53 Resolver rule. * * #### Optional * * * `account_id` (String) AWS Account where this resource is managed. * * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Route53 Resolver rules using the `id`. For example: * * console * * % pulumi import aws_route53_resolver_rule.example rslvr-rr-0123456789abcdef0 */ export declare class ResolverRule extends pulumi.CustomResource { /** * Get an existing ResolverRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResolverRuleState, opts?: pulumi.CustomResourceOptions): ResolverRule; /** * Returns true if the given object is an instance of ResolverRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ResolverRule; /** * ARN (Amazon Resource Name) for the resolver rule. */ readonly arn: pulumi.Output<string>; /** * DNS queries for this domain name are forwarded to the IP addresses that are specified using `targetIp`. */ readonly domainName: pulumi.Output<string>; /** * Friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. */ readonly name: pulumi.Output<string>; /** * When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. */ readonly ownerId: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using `targetIp`. * This argument should only be specified for `FORWARD` type rules. */ readonly resolverEndpointId: pulumi.Output<string | undefined>; /** * Rule type. Valid values are `FORWARD`, `SYSTEM` and `RECURSIVE`. */ readonly ruleType: pulumi.Output<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_ME` or `SHARED_WITH_ME` */ readonly shareStatus: pulumi.Output<string>; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * 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. */ readonly targetIps: pulumi.Output<outputs.route53.ResolverRuleTargetIp[] | undefined>; /** * Create a ResolverRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ResolverRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ResolverRule resources. */ export interface ResolverRuleState { /** * ARN (Amazon Resource Name) for the resolver rule. */ arn?: pulumi.Input<string>; /** * DNS queries for this domain name are forwarded to the IP addresses that are specified using `targetIp`. */ domainName?: pulumi.Input<string>; /** * Friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. */ name?: pulumi.Input<string>; /** * When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. */ ownerId?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using `targetIp`. * This argument should only be specified for `FORWARD` type rules. */ resolverEndpointId?: pulumi.Input<string>; /** * Rule type. Valid values are `FORWARD`, `SYSTEM` and `RECURSIVE`. */ ruleType?: pulumi.Input<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_ME` or `SHARED_WITH_ME` */ shareStatus?: pulumi.Input<string>; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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. */ targetIps?: pulumi.Input<pulumi.Input<inputs.route53.ResolverRuleTargetIp>[]>; } /** * The set of arguments for constructing a ResolverRule resource. */ export interface ResolverRuleArgs { /** * DNS queries for this domain name are forwarded to the IP addresses that are specified using `targetIp`. */ domainName: pulumi.Input<string>; /** * Friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. */ name?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * ID of the outbound resolver endpoint that you want to use to route DNS queries to the IP addresses that you specify using `targetIp`. * This argument should only be specified for `FORWARD` type rules. */ resolverEndpointId?: pulumi.Input<string>; /** * Rule type. Valid values are `FORWARD`, `SYSTEM` and `RECURSIVE`. */ ruleType: pulumi.Input<string>; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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. */ targetIps?: pulumi.Input<pulumi.Input<inputs.route53.ResolverRuleTargetIp>[]>; }