1. Packages
  2. Volcengine
  3. API Docs
  4. private_zone
  5. ResolverRule
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.private_zone.ResolverRule

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage private zone resolver rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.private_zone.ResolverRule("foo", {
        endpointId: 346,
        forwardIps: [{
            ip: "10.199.38.19",
            port: 33,
        }],
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
        type: "OUTBOUND",
        vpcs: [{
            region: "cn-beijing",
            vpcId: "vpc-13f9uuuqfdjb43n6nu5p1****",
        }],
        zoneNames: ["www.baidu.com"],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.private_zone.ResolverRule("foo",
        endpoint_id=346,
        forward_ips=[volcengine.private_zone.ResolverRuleForwardIpArgs(
            ip="10.199.38.19",
            port=33,
        )],
        project_name="default",
        tags=[volcengine.private_zone.ResolverRuleTagArgs(
            key="k1",
            value="v1",
        )],
        type="OUTBOUND",
        vpcs=[volcengine.private_zone.ResolverRuleVpcArgs(
            region="cn-beijing",
            vpc_id="vpc-13f9uuuqfdjb43n6nu5p1****",
        )],
        zone_names=["www.baidu.com"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/private_zone"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := private_zone.NewResolverRule(ctx, "foo", &private_zone.ResolverRuleArgs{
    			EndpointId: pulumi.Int(346),
    			ForwardIps: private_zone.ResolverRuleForwardIpArray{
    				&private_zone.ResolverRuleForwardIpArgs{
    					Ip:   pulumi.String("10.199.38.19"),
    					Port: pulumi.Int(33),
    				},
    			},
    			ProjectName: pulumi.String("default"),
    			Tags: private_zone.ResolverRuleTagArray{
    				&private_zone.ResolverRuleTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    			Type: pulumi.String("OUTBOUND"),
    			Vpcs: private_zone.ResolverRuleVpcArray{
    				&private_zone.ResolverRuleVpcArgs{
    					Region: pulumi.String("cn-beijing"),
    					VpcId:  pulumi.String("vpc-13f9uuuqfdjb43n6nu5p1****"),
    				},
    			},
    			ZoneNames: pulumi.StringArray{
    				pulumi.String("www.baidu.com"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Private_zone.ResolverRule("foo", new()
        {
            EndpointId = 346,
            ForwardIps = new[]
            {
                new Volcengine.Private_zone.Inputs.ResolverRuleForwardIpArgs
                {
                    Ip = "10.199.38.19",
                    Port = 33,
                },
            },
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Private_zone.Inputs.ResolverRuleTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
            Type = "OUTBOUND",
            Vpcs = new[]
            {
                new Volcengine.Private_zone.Inputs.ResolverRuleVpcArgs
                {
                    Region = "cn-beijing",
                    VpcId = "vpc-13f9uuuqfdjb43n6nu5p1****",
                },
            },
            ZoneNames = new[]
            {
                "www.baidu.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.private_zone.ResolverRule;
    import com.pulumi.volcengine.private_zone.ResolverRuleArgs;
    import com.pulumi.volcengine.private_zone.inputs.ResolverRuleForwardIpArgs;
    import com.pulumi.volcengine.private_zone.inputs.ResolverRuleTagArgs;
    import com.pulumi.volcengine.private_zone.inputs.ResolverRuleVpcArgs;
    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 foo = new ResolverRule("foo", ResolverRuleArgs.builder()        
                .endpointId(346)
                .forwardIps(ResolverRuleForwardIpArgs.builder()
                    .ip("10.199.38.19")
                    .port(33)
                    .build())
                .projectName("default")
                .tags(ResolverRuleTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .type("OUTBOUND")
                .vpcs(ResolverRuleVpcArgs.builder()
                    .region("cn-beijing")
                    .vpcId("vpc-13f9uuuqfdjb43n6nu5p1****")
                    .build())
                .zoneNames("www.baidu.com")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:private_zone:ResolverRule
        properties:
          endpointId: 346
          forwardIps:
            - ip: 10.199.38.19
              port: 33
          projectName: default
          tags:
            - key: k1
              value: v1
          type: OUTBOUND
          vpcs:
            - region: cn-beijing
              vpcId: vpc-13f9uuuqfdjb43n6nu5p1****
          zoneNames:
            - www.baidu.com
    

    Create ResolverRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ResolverRule(name: string, args: ResolverRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ResolverRule(resource_name: str,
                     args: ResolverRuleArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResolverRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     type: Optional[str] = None,
                     vpcs: Optional[Sequence[ResolverRuleVpcArgs]] = None,
                     endpoint_id: Optional[int] = None,
                     endpoint_trn: Optional[str] = None,
                     forward_ips: Optional[Sequence[ResolverRuleForwardIpArgs]] = None,
                     line: Optional[str] = None,
                     name: Optional[str] = None,
                     project_name: Optional[str] = None,
                     tags: Optional[Sequence[ResolverRuleTagArgs]] = None,
                     vpc_trns: Optional[Sequence[str]] = None,
                     zone_names: Optional[Sequence[str]] = None)
    func NewResolverRule(ctx *Context, name string, args ResolverRuleArgs, opts ...ResourceOption) (*ResolverRule, error)
    public ResolverRule(string name, ResolverRuleArgs args, CustomResourceOptions? opts = null)
    public ResolverRule(String name, ResolverRuleArgs args)
    public ResolverRule(String name, ResolverRuleArgs args, CustomResourceOptions options)
    
    type: volcengine:private_zone:ResolverRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args ResolverRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args ResolverRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var resolverRuleResource = new Volcengine.Private_zone.ResolverRule("resolverRuleResource", new()
    {
        Type = "string",
        Vpcs = new[]
        {
            new Volcengine.Private_zone.Inputs.ResolverRuleVpcArgs
            {
                VpcId = "string",
                Region = "string",
            },
        },
        EndpointId = 0,
        EndpointTrn = "string",
        ForwardIps = new[]
        {
            new Volcengine.Private_zone.Inputs.ResolverRuleForwardIpArgs
            {
                Ip = "string",
                Port = 0,
            },
        },
        Line = "string",
        Name = "string",
        ProjectName = "string",
        Tags = new[]
        {
            new Volcengine.Private_zone.Inputs.ResolverRuleTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        VpcTrns = new[]
        {
            "string",
        },
        ZoneNames = new[]
        {
            "string",
        },
    });
    
    example, err := private_zone.NewResolverRule(ctx, "resolverRuleResource", &private_zone.ResolverRuleArgs{
    	Type: pulumi.String("string"),
    	Vpcs: private_zone.ResolverRuleVpcArray{
    		&private_zone.ResolverRuleVpcArgs{
    			VpcId:  pulumi.String("string"),
    			Region: pulumi.String("string"),
    		},
    	},
    	EndpointId:  pulumi.Int(0),
    	EndpointTrn: pulumi.String("string"),
    	ForwardIps: private_zone.ResolverRuleForwardIpArray{
    		&private_zone.ResolverRuleForwardIpArgs{
    			Ip:   pulumi.String("string"),
    			Port: pulumi.Int(0),
    		},
    	},
    	Line:        pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    	Tags: private_zone.ResolverRuleTagArray{
    		&private_zone.ResolverRuleTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	VpcTrns: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ZoneNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var resolverRuleResource = new ResolverRule("resolverRuleResource", ResolverRuleArgs.builder()
        .type("string")
        .vpcs(ResolverRuleVpcArgs.builder()
            .vpcId("string")
            .region("string")
            .build())
        .endpointId(0)
        .endpointTrn("string")
        .forwardIps(ResolverRuleForwardIpArgs.builder()
            .ip("string")
            .port(0)
            .build())
        .line("string")
        .name("string")
        .projectName("string")
        .tags(ResolverRuleTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .vpcTrns("string")
        .zoneNames("string")
        .build());
    
    resolver_rule_resource = volcengine.private_zone.ResolverRule("resolverRuleResource",
        type="string",
        vpcs=[{
            "vpc_id": "string",
            "region": "string",
        }],
        endpoint_id=0,
        endpoint_trn="string",
        forward_ips=[{
            "ip": "string",
            "port": 0,
        }],
        line="string",
        name="string",
        project_name="string",
        tags=[{
            "key": "string",
            "value": "string",
        }],
        vpc_trns=["string"],
        zone_names=["string"])
    
    const resolverRuleResource = new volcengine.private_zone.ResolverRule("resolverRuleResource", {
        type: "string",
        vpcs: [{
            vpcId: "string",
            region: "string",
        }],
        endpointId: 0,
        endpointTrn: "string",
        forwardIps: [{
            ip: "string",
            port: 0,
        }],
        line: "string",
        name: "string",
        projectName: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
        vpcTrns: ["string"],
        zoneNames: ["string"],
    });
    
    type: volcengine:private_zone:ResolverRule
    properties:
        endpointId: 0
        endpointTrn: string
        forwardIps:
            - ip: string
              port: 0
        line: string
        name: string
        projectName: string
        tags:
            - key: string
              value: string
        type: string
        vpcTrns:
            - string
        vpcs:
            - region: string
              vpcId: string
        zoneNames:
            - string
    

    ResolverRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ResolverRule resource accepts the following input properties:

    Type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    Vpcs List<ResolverRuleVpc>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    EndpointId int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    EndpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ForwardIps List<ResolverRuleForwardIp>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    Name string
    The name of the rule.
    ProjectName string
    The project name of the private zone resolver rule.
    Tags List<ResolverRuleTag>
    Tags.
    VpcTrns List<string>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ZoneNames List<string>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    Vpcs []ResolverRuleVpcArgs
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    EndpointId int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    EndpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ForwardIps []ResolverRuleForwardIpArgs
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    Name string
    The name of the rule.
    ProjectName string
    The project name of the private zone resolver rule.
    Tags []ResolverRuleTagArgs
    Tags.
    VpcTrns []string
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ZoneNames []string
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    type String
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcs List<ResolverRuleVpc>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    endpointId Integer
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn String
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps List<ResolverRuleForwardIp>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line String
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name String
    The name of the rule.
    projectName String
    The project name of the private zone resolver rule.
    tags List<ResolverRuleTag>
    Tags.
    vpcTrns List<String>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    zoneNames List<String>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcs ResolverRuleVpc[]
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    endpointId number
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps ResolverRuleForwardIp[]
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name string
    The name of the rule.
    projectName string
    The project name of the private zone resolver rule.
    tags ResolverRuleTag[]
    Tags.
    vpcTrns string[]
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    zoneNames string[]
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    type str
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcs Sequence[ResolverRuleVpcArgs]
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    endpoint_id int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpoint_trn str
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forward_ips Sequence[ResolverRuleForwardIpArgs]
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line str
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name str
    The name of the rule.
    project_name str
    The project name of the private zone resolver rule.
    tags Sequence[ResolverRuleTagArgs]
    Tags.
    vpc_trns Sequence[str]
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    zone_names Sequence[str]
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    type String
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcs List<Property Map>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    endpointId Number
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn String
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps List<Property Map>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line String
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name String
    The name of the rule.
    projectName String
    The project name of the private zone resolver rule.
    tags List<Property Map>
    Tags.
    vpcTrns List<String>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    zoneNames List<String>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResolverRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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): ResolverRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            endpoint_id: Optional[int] = None,
            endpoint_trn: Optional[str] = None,
            forward_ips: Optional[Sequence[ResolverRuleForwardIpArgs]] = None,
            line: Optional[str] = None,
            name: Optional[str] = None,
            project_name: Optional[str] = None,
            tags: Optional[Sequence[ResolverRuleTagArgs]] = None,
            type: Optional[str] = None,
            vpc_trns: Optional[Sequence[str]] = None,
            vpcs: Optional[Sequence[ResolverRuleVpcArgs]] = None,
            zone_names: Optional[Sequence[str]] = None) -> ResolverRule
    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)
    public static ResolverRule get(String name, Output<String> id, ResolverRuleState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:private_zone:ResolverRule    get:      id: ${id}
    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.
    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:
    EndpointId int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    EndpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ForwardIps List<ResolverRuleForwardIp>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    Name string
    The name of the rule.
    ProjectName string
    The project name of the private zone resolver rule.
    Tags List<ResolverRuleTag>
    Tags.
    Type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    VpcTrns List<string>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Vpcs List<ResolverRuleVpc>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    ZoneNames List<string>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    EndpointId int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    EndpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    ForwardIps []ResolverRuleForwardIpArgs
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    Name string
    The name of the rule.
    ProjectName string
    The project name of the private zone resolver rule.
    Tags []ResolverRuleTagArgs
    Tags.
    Type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    VpcTrns []string
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    Vpcs []ResolverRuleVpcArgs
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    ZoneNames []string
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    endpointId Integer
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn String
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps List<ResolverRuleForwardIp>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line String
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name String
    The name of the rule.
    projectName String
    The project name of the private zone resolver rule.
    tags List<ResolverRuleTag>
    Tags.
    type String
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcTrns List<String>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    vpcs List<ResolverRuleVpc>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    zoneNames List<String>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    endpointId number
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn string
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps ResolverRuleForwardIp[]
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line string
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name string
    The name of the rule.
    projectName string
    The project name of the private zone resolver rule.
    tags ResolverRuleTag[]
    Tags.
    type string
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcTrns string[]
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    vpcs ResolverRuleVpc[]
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    zoneNames string[]
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    endpoint_id int
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpoint_trn str
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forward_ips Sequence[ResolverRuleForwardIpArgs]
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line str
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name str
    The name of the rule.
    project_name str
    The project name of the private zone resolver rule.
    tags Sequence[ResolverRuleTagArgs]
    Tags.
    type str
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpc_trns Sequence[str]
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    vpcs Sequence[ResolverRuleVpcArgs]
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    zone_names Sequence[str]
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    endpointId Number
    Terminal node ID. This parameter is only valid and required when the Type parameter is OUTBOUND.
    endpointTrn String
    The endpoint trn of the private zone resolver rule. Format: trn:private_zone::accountId:endpoint/endpointId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    forwardIps List<Property Map>
    IP address and port of external DNS server. You can add up to 10 IP addresses. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    line String
    The operator of the exit IP address of the recursive DNS server. This parameter is only valid when the Type parameter is LINE and is a required parameter. MOBILE, TELECOM, UNICOM.
    name String
    The name of the rule.
    projectName String
    The project name of the private zone resolver rule.
    tags List<Property Map>
    Tags.
    type String
    Forwarding rule types. OUTBOUND: Forward to external DNS servers. LINE: Set the recursive DNS server used for recursive resolution to the recursive DNS server of the Volcano Engine PublicDNS, and customize the operator's exit IP address for the recursive DNS server.
    vpcTrns List<String>
    The vpc trns of the private zone resolver rule. Format: trn:vpc:region:accountId:vpc/vpcId. This field is only effected when creating resource. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
    vpcs List<Property Map>
    The parameter name is a variable that represents the region where the VPC is located, such as cn-beijing. The parameter value can include one or more VPC IDs, such as vpc-2750bd1. For example, if you associate a VPC in the cn-beijing region with a domain name and the VPC ID is vpc-2d6si87atfh1c58ozfd0nzq8k, the parameter would be "cn-beijing":["vpc-2d6si87atfh1c58ozfd0nzq8k"]. You can add one or more regions. When the Type parameter is OUTBOUND, the VPC region must be the same as the region where the endpoint is located.
    zoneNames List<String>
    Domain names associated with forwarding rules. You can enter one or more domain names. Up to 500 domain names are supported. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.

    Supporting Types

    ResolverRuleForwardIp, ResolverRuleForwardIpArgs

    Ip string
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Port int
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.
    Ip string
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    Port int
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.
    ip String
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    port Integer
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.
    ip string
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    port number
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.
    ip str
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    port int
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.
    ip String
    IP address of the external DNS server. This parameter is only valid when the Type parameter is OUTBOUND and is a required parameter.
    port Number
    The port of the external DNS server. Default is 53. This parameter is only valid and optional when the Type parameter is OUTBOUND.

    ResolverRuleTag, ResolverRuleTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    ResolverRuleVpc, ResolverRuleVpcArgs

    VpcId string
    The id of the bind vpc.
    Region string
    The region of the bind vpc. The default value is the region of the default provider config.
    VpcId string
    The id of the bind vpc.
    Region string
    The region of the bind vpc. The default value is the region of the default provider config.
    vpcId String
    The id of the bind vpc.
    region String
    The region of the bind vpc. The default value is the region of the default provider config.
    vpcId string
    The id of the bind vpc.
    region string
    The region of the bind vpc. The default value is the region of the default provider config.
    vpc_id str
    The id of the bind vpc.
    region str
    The region of the bind vpc. The default value is the region of the default provider config.
    vpcId String
    The id of the bind vpc.
    region String
    The region of the bind vpc. The default value is the region of the default provider config.

    Import

    PrivateZoneResolverRule can be imported using the id, e.g.

    $ pulumi import volcengine:private_zone/resolverRule:ResolverRule default resource_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine