1. Packages
  2. Selectel Provider
  3. API Docs
  4. PrivateDnsZoneV1
selectel 7.5.2 published on Saturday, Jan 31, 2026 by selectel
selectel logo
selectel 7.5.2 published on Saturday, Jan 31, 2026 by selectel

    Creates and manages a private DNS zone and its record sets using public API v1. For more information about private DNS, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const zone1 = new selectel.PrivateDnsZoneV1("zone_1", {
        region: "ru-1",
        projectId: project1.id,
        domain: "example.com.",
        records: [{
            domain: "sub.example.com.",
            type: "A",
            values: ["192.168.0.2"],
        }],
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    zone1 = selectel.PrivateDnsZoneV1("zone_1",
        region="ru-1",
        project_id=project1["id"],
        domain="example.com.",
        records=[{
            "domain": "sub.example.com.",
            "type": "A",
            "values": ["192.168.0.2"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v7/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewPrivateDnsZoneV1(ctx, "zone_1", &selectel.PrivateDnsZoneV1Args{
    			Region:    pulumi.String("ru-1"),
    			ProjectId: pulumi.Any(project1.Id),
    			Domain:    pulumi.String("example.com."),
    			Records: selectel.PrivateDnsZoneV1RecordArray{
    				&selectel.PrivateDnsZoneV1RecordArgs{
    					Domain: pulumi.String("sub.example.com."),
    					Type:   pulumi.String("A"),
    					Values: pulumi.StringArray{
    						pulumi.String("192.168.0.2"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var zone1 = new Selectel.PrivateDnsZoneV1("zone_1", new()
        {
            Region = "ru-1",
            ProjectId = project1.Id,
            Domain = "example.com.",
            Records = new[]
            {
                new Selectel.Inputs.PrivateDnsZoneV1RecordArgs
                {
                    Domain = "sub.example.com.",
                    Type = "A",
                    Values = new[]
                    {
                        "192.168.0.2",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.PrivateDnsZoneV1;
    import com.pulumi.selectel.PrivateDnsZoneV1Args;
    import com.pulumi.selectel.inputs.PrivateDnsZoneV1RecordArgs;
    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 zone1 = new PrivateDnsZoneV1("zone1", PrivateDnsZoneV1Args.builder()
                .region("ru-1")
                .projectId(project1.id())
                .domain("example.com.")
                .records(PrivateDnsZoneV1RecordArgs.builder()
                    .domain("sub.example.com.")
                    .type("A")
                    .values("192.168.0.2")
                    .build())
                .build());
    
        }
    }
    
    resources:
      zone1:
        type: selectel:PrivateDnsZoneV1
        name: zone_1
        properties:
          region: ru-1
          projectId: ${project1.id}
          domain: example.com.
          records:
            - domain: sub.example.com.
              type: A
              values:
                - 192.168.0.2
    

    Create PrivateDnsZoneV1 Resource

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

    Constructor syntax

    new PrivateDnsZoneV1(name: string, args: PrivateDnsZoneV1Args, opts?: CustomResourceOptions);
    @overload
    def PrivateDnsZoneV1(resource_name: str,
                         args: PrivateDnsZoneV1Args,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateDnsZoneV1(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         domain: Optional[str] = None,
                         project_id: Optional[str] = None,
                         region: Optional[str] = None,
                         private_dns_zone_v1_id: Optional[str] = None,
                         records: Optional[Sequence[PrivateDnsZoneV1RecordArgs]] = None,
                         ttl: Optional[float] = None)
    func NewPrivateDnsZoneV1(ctx *Context, name string, args PrivateDnsZoneV1Args, opts ...ResourceOption) (*PrivateDnsZoneV1, error)
    public PrivateDnsZoneV1(string name, PrivateDnsZoneV1Args args, CustomResourceOptions? opts = null)
    public PrivateDnsZoneV1(String name, PrivateDnsZoneV1Args args)
    public PrivateDnsZoneV1(String name, PrivateDnsZoneV1Args args, CustomResourceOptions options)
    
    type: selectel:PrivateDnsZoneV1
    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 PrivateDnsZoneV1Args
    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 PrivateDnsZoneV1Args
    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 PrivateDnsZoneV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateDnsZoneV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateDnsZoneV1Args
    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 privateDnsZoneV1Resource = new Selectel.PrivateDnsZoneV1("privateDnsZoneV1Resource", new()
    {
        Domain = "string",
        ProjectId = "string",
        Region = "string",
        PrivateDnsZoneV1Id = "string",
        Records = new[]
        {
            new Selectel.Inputs.PrivateDnsZoneV1RecordArgs
            {
                Domain = "string",
                Type = "string",
                Values = new[]
                {
                    "string",
                },
                Ttl = 0,
            },
        },
        Ttl = 0,
    });
    
    example, err := selectel.NewPrivateDnsZoneV1(ctx, "privateDnsZoneV1Resource", &selectel.PrivateDnsZoneV1Args{
    	Domain:             pulumi.String("string"),
    	ProjectId:          pulumi.String("string"),
    	Region:             pulumi.String("string"),
    	PrivateDnsZoneV1Id: pulumi.String("string"),
    	Records: selectel.PrivateDnsZoneV1RecordArray{
    		&selectel.PrivateDnsZoneV1RecordArgs{
    			Domain: pulumi.String("string"),
    			Type:   pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Ttl: pulumi.Float64(0),
    		},
    	},
    	Ttl: pulumi.Float64(0),
    })
    
    var privateDnsZoneV1Resource = new PrivateDnsZoneV1("privateDnsZoneV1Resource", PrivateDnsZoneV1Args.builder()
        .domain("string")
        .projectId("string")
        .region("string")
        .privateDnsZoneV1Id("string")
        .records(PrivateDnsZoneV1RecordArgs.builder()
            .domain("string")
            .type("string")
            .values("string")
            .ttl(0.0)
            .build())
        .ttl(0.0)
        .build());
    
    private_dns_zone_v1_resource = selectel.PrivateDnsZoneV1("privateDnsZoneV1Resource",
        domain="string",
        project_id="string",
        region="string",
        private_dns_zone_v1_id="string",
        records=[{
            "domain": "string",
            "type": "string",
            "values": ["string"],
            "ttl": 0,
        }],
        ttl=0)
    
    const privateDnsZoneV1Resource = new selectel.PrivateDnsZoneV1("privateDnsZoneV1Resource", {
        domain: "string",
        projectId: "string",
        region: "string",
        privateDnsZoneV1Id: "string",
        records: [{
            domain: "string",
            type: "string",
            values: ["string"],
            ttl: 0,
        }],
        ttl: 0,
    });
    
    type: selectel:PrivateDnsZoneV1
    properties:
        domain: string
        privateDnsZoneV1Id: string
        projectId: string
        records:
            - domain: string
              ttl: 0
              type: string
              values:
                - string
        region: string
        ttl: 0
    

    PrivateDnsZoneV1 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 PrivateDnsZoneV1 resource accepts the following input properties:

    Domain string
    DNS zone domain (domain name), must be an FQDN.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    PrivateDnsZoneV1Id string
    Records List<PrivateDnsZoneV1Record>
    List of the zone record sets:
    Ttl double
    Time to live in seconds for the zone, default value is 3600.
    Domain string
    DNS zone domain (domain name), must be an FQDN.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    PrivateDnsZoneV1Id string
    Records []PrivateDnsZoneV1RecordArgs
    List of the zone record sets:
    Ttl float64
    Time to live in seconds for the zone, default value is 3600.
    domain String
    DNS zone domain (domain name), must be an FQDN.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    privateDnsZoneV1Id String
    records List<PrivateDnsZoneV1Record>
    List of the zone record sets:
    ttl Double
    Time to live in seconds for the zone, default value is 3600.
    domain string
    DNS zone domain (domain name), must be an FQDN.
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    privateDnsZoneV1Id string
    records PrivateDnsZoneV1Record[]
    List of the zone record sets:
    ttl number
    Time to live in seconds for the zone, default value is 3600.
    domain str
    DNS zone domain (domain name), must be an FQDN.
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region str
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    private_dns_zone_v1_id str
    records Sequence[PrivateDnsZoneV1RecordArgs]
    List of the zone record sets:
    ttl float
    Time to live in seconds for the zone, default value is 3600.
    domain String
    DNS zone domain (domain name), must be an FQDN.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    region String
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    privateDnsZoneV1Id String
    records List<Property Map>
    List of the zone record sets:
    ttl Number
    Time to live in seconds for the zone, default value is 3600.

    Outputs

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

    Bindings List<PrivateDnsZoneV1Binding>
    Id string
    The provider-assigned unique ID for this managed resource.
    SerialNumber double
    Zone SOA serial number.
    Bindings []PrivateDnsZoneV1Binding
    Id string
    The provider-assigned unique ID for this managed resource.
    SerialNumber float64
    Zone SOA serial number.
    bindings List<PrivateDnsZoneV1Binding>
    id String
    The provider-assigned unique ID for this managed resource.
    serialNumber Double
    Zone SOA serial number.
    bindings PrivateDnsZoneV1Binding[]
    id string
    The provider-assigned unique ID for this managed resource.
    serialNumber number
    Zone SOA serial number.
    bindings Sequence[PrivateDnsZoneV1Binding]
    id str
    The provider-assigned unique ID for this managed resource.
    serial_number float
    Zone SOA serial number.
    bindings List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    serialNumber Number
    Zone SOA serial number.

    Look up Existing PrivateDnsZoneV1 Resource

    Get an existing PrivateDnsZoneV1 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?: PrivateDnsZoneV1State, opts?: CustomResourceOptions): PrivateDnsZoneV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bindings: Optional[Sequence[PrivateDnsZoneV1BindingArgs]] = None,
            domain: Optional[str] = None,
            private_dns_zone_v1_id: Optional[str] = None,
            project_id: Optional[str] = None,
            records: Optional[Sequence[PrivateDnsZoneV1RecordArgs]] = None,
            region: Optional[str] = None,
            serial_number: Optional[float] = None,
            ttl: Optional[float] = None) -> PrivateDnsZoneV1
    func GetPrivateDnsZoneV1(ctx *Context, name string, id IDInput, state *PrivateDnsZoneV1State, opts ...ResourceOption) (*PrivateDnsZoneV1, error)
    public static PrivateDnsZoneV1 Get(string name, Input<string> id, PrivateDnsZoneV1State? state, CustomResourceOptions? opts = null)
    public static PrivateDnsZoneV1 get(String name, Output<String> id, PrivateDnsZoneV1State state, CustomResourceOptions options)
    resources:  _:    type: selectel:PrivateDnsZoneV1    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:
    Bindings List<PrivateDnsZoneV1Binding>
    Domain string
    DNS zone domain (domain name), must be an FQDN.
    PrivateDnsZoneV1Id string
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Records List<PrivateDnsZoneV1Record>
    List of the zone record sets:
    Region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    SerialNumber double
    Zone SOA serial number.
    Ttl double
    Time to live in seconds for the zone, default value is 3600.
    Bindings []PrivateDnsZoneV1BindingArgs
    Domain string
    DNS zone domain (domain name), must be an FQDN.
    PrivateDnsZoneV1Id string
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Records []PrivateDnsZoneV1RecordArgs
    List of the zone record sets:
    Region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    SerialNumber float64
    Zone SOA serial number.
    Ttl float64
    Time to live in seconds for the zone, default value is 3600.
    bindings List<PrivateDnsZoneV1Binding>
    domain String
    DNS zone domain (domain name), must be an FQDN.
    privateDnsZoneV1Id String
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    records List<PrivateDnsZoneV1Record>
    List of the zone record sets:
    region String
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    serialNumber Double
    Zone SOA serial number.
    ttl Double
    Time to live in seconds for the zone, default value is 3600.
    bindings PrivateDnsZoneV1Binding[]
    domain string
    DNS zone domain (domain name), must be an FQDN.
    privateDnsZoneV1Id string
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    records PrivateDnsZoneV1Record[]
    List of the zone record sets:
    region string
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    serialNumber number
    Zone SOA serial number.
    ttl number
    Time to live in seconds for the zone, default value is 3600.
    bindings Sequence[PrivateDnsZoneV1BindingArgs]
    domain str
    DNS zone domain (domain name), must be an FQDN.
    private_dns_zone_v1_id str
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    records Sequence[PrivateDnsZoneV1RecordArgs]
    List of the zone record sets:
    region str
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    serial_number float
    Zone SOA serial number.
    ttl float
    Time to live in seconds for the zone, default value is 3600.
    bindings List<Property Map>
    domain String
    DNS zone domain (domain name), must be an FQDN.
    privateDnsZoneV1Id String
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    records List<Property Map>
    List of the zone record sets:
    region String
    Pool where the DNS zone is located, for example, ru-3. Learn more about available pools in the Availability matrix.
    serialNumber Number
    Zone SOA serial number.
    ttl Number
    Time to live in seconds for the zone, default value is 3600.

    Supporting Types

    PrivateDnsZoneV1Binding, PrivateDnsZoneV1BindingArgs

    PrivateDnsZoneV1Record, PrivateDnsZoneV1RecordArgs

    Domain string
    Domain of the record set, must be an FQDN.
    Type string
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    Values List<string>
    List of record set values.
    Ttl double
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.
    Domain string
    Domain of the record set, must be an FQDN.
    Type string
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    Values []string
    List of record set values.
    Ttl float64
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.
    domain String
    Domain of the record set, must be an FQDN.
    type String
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    values List<String>
    List of record set values.
    ttl Double
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.
    domain string
    Domain of the record set, must be an FQDN.
    type string
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    values string[]
    List of record set values.
    ttl number
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.
    domain str
    Domain of the record set, must be an FQDN.
    type str
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    values Sequence[str]
    List of record set values.
    ttl float
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.
    domain String
    Domain of the record set, must be an FQDN.
    type String
    Record set type. Available types are A, AAAA, MX, TXT, CNAME.
    values List<String>
    List of record set values.
    ttl Number
    Time to live in seconds for the record. If not specifed, zone TTL is used for the record.

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel logo
    selectel 7.5.2 published on Saturday, Jan 31, 2026 by selectel
      Meet Neo: Your AI Platform Teammate