1. Packages
  2. Selectel Provider
  3. API Docs
  4. DomainsZoneV2
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.DomainsZoneV2

Explore with Pulumi AI

selectel logo
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

    Creates and manages a zone in DNS Hosting (actual) using public API v2. For more information about zones, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const zone1 = new selectel.DomainsZoneV2("zone1", {projectId: selectel_vpc_project_v2.project_1.id});
    
    import pulumi
    import pulumi_selectel as selectel
    
    zone1 = selectel.DomainsZoneV2("zone1", project_id=selectel_vpc_project_v2["project_1"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewDomainsZoneV2(ctx, "zone1", &selectel.DomainsZoneV2Args{
    			ProjectId: pulumi.Any(selectel_vpc_project_v2.Project_1.Id),
    		})
    		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.DomainsZoneV2("zone1", new()
        {
            ProjectId = selectel_vpc_project_v2.Project_1.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.DomainsZoneV2;
    import com.pulumi.selectel.DomainsZoneV2Args;
    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 DomainsZoneV2("zone1", DomainsZoneV2Args.builder()
                .projectId(selectel_vpc_project_v2.project_1().id())
                .build());
    
        }
    }
    
    resources:
      zone1:
        type: selectel:DomainsZoneV2
        properties:
          projectId: ${selectel_vpc_project_v2.project_1.id}
    

    Create DomainsZoneV2 Resource

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

    Constructor syntax

    new DomainsZoneV2(name: string, args: DomainsZoneV2Args, opts?: CustomResourceOptions);
    @overload
    def DomainsZoneV2(resource_name: str,
                      args: DomainsZoneV2Args,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainsZoneV2(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      project_id: Optional[str] = None,
                      comment: Optional[str] = None,
                      disabled: Optional[bool] = None,
                      domains_zone_v2_id: Optional[str] = None,
                      name: Optional[str] = None)
    func NewDomainsZoneV2(ctx *Context, name string, args DomainsZoneV2Args, opts ...ResourceOption) (*DomainsZoneV2, error)
    public DomainsZoneV2(string name, DomainsZoneV2Args args, CustomResourceOptions? opts = null)
    public DomainsZoneV2(String name, DomainsZoneV2Args args)
    public DomainsZoneV2(String name, DomainsZoneV2Args args, CustomResourceOptions options)
    
    type: selectel:DomainsZoneV2
    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 DomainsZoneV2Args
    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 DomainsZoneV2Args
    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 DomainsZoneV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainsZoneV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainsZoneV2Args
    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 domainsZoneV2Resource = new Selectel.DomainsZoneV2("domainsZoneV2Resource", new()
    {
        ProjectId = "string",
        Comment = "string",
        Disabled = false,
        DomainsZoneV2Id = "string",
        Name = "string",
    });
    
    example, err := selectel.NewDomainsZoneV2(ctx, "domainsZoneV2Resource", &selectel.DomainsZoneV2Args{
    	ProjectId:       pulumi.String("string"),
    	Comment:         pulumi.String("string"),
    	Disabled:        pulumi.Bool(false),
    	DomainsZoneV2Id: pulumi.String("string"),
    	Name:            pulumi.String("string"),
    })
    
    var domainsZoneV2Resource = new DomainsZoneV2("domainsZoneV2Resource", DomainsZoneV2Args.builder()
        .projectId("string")
        .comment("string")
        .disabled(false)
        .domainsZoneV2Id("string")
        .name("string")
        .build());
    
    domains_zone_v2_resource = selectel.DomainsZoneV2("domainsZoneV2Resource",
        project_id="string",
        comment="string",
        disabled=False,
        domains_zone_v2_id="string",
        name="string")
    
    const domainsZoneV2Resource = new selectel.DomainsZoneV2("domainsZoneV2Resource", {
        projectId: "string",
        comment: "string",
        disabled: false,
        domainsZoneV2Id: "string",
        name: "string",
    });
    
    type: selectel:DomainsZoneV2
    properties:
        comment: string
        disabled: false
        domainsZoneV2Id: string
        name: string
        projectId: string
    

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

    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Comment string
    Comment to add to the zone.
    Disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    DomainsZoneV2Id string
    Name string
    Zone name. Changing this creates a new zone.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    Comment string
    Comment to add to the zone.
    Disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    DomainsZoneV2Id string
    Name string
    Zone name. Changing this creates a new zone.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    comment String
    Comment to add to the zone.
    disabled Boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id String
    name String
    Zone name. Changing this creates a new zone.
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    comment string
    Comment to add to the zone.
    disabled boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id string
    name string
    Zone name. Changing this creates a new zone.
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    comment str
    Comment to add to the zone.
    disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    domains_zone_v2_id str
    name str
    Zone name. Changing this creates a new zone.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    comment String
    Comment to add to the zone.
    disabled Boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id String
    name String
    Zone name. Changing this creates a new zone.

    Outputs

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

    CreatedAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    DelegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastCheckStatus bool
    Zone status retrieved during the last delegation check.
    LastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    UpdatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    CreatedAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    DelegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastCheckStatus bool
    Zone status retrieved during the last delegation check.
    LastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    UpdatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    createdAt String
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt String
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastCheckStatus Boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt String
    Equals to the delegation_check_at argument value when the last_check_status is true.
    updatedAt String
    Time when the zone was updated in the RFC 3339 timestamp format.
    createdAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    id string
    The provider-assigned unique ID for this managed resource.
    lastCheckStatus boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    updatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    created_at str
    Time when the zone was created in the RFC 3339 timestamp format.
    delegation_checked_at str
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    id str
    The provider-assigned unique ID for this managed resource.
    last_check_status bool
    Zone status retrieved during the last delegation check.
    last_delegated_at str
    Equals to the delegation_check_at argument value when the last_check_status is true.
    updated_at str
    Time when the zone was updated in the RFC 3339 timestamp format.
    createdAt String
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt String
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastCheckStatus Boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt String
    Equals to the delegation_check_at argument value when the last_check_status is true.
    updatedAt String
    Time when the zone was updated in the RFC 3339 timestamp format.

    Look up Existing DomainsZoneV2 Resource

    Get an existing DomainsZoneV2 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?: DomainsZoneV2State, opts?: CustomResourceOptions): DomainsZoneV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            created_at: Optional[str] = None,
            delegation_checked_at: Optional[str] = None,
            disabled: Optional[bool] = None,
            domains_zone_v2_id: Optional[str] = None,
            last_check_status: Optional[bool] = None,
            last_delegated_at: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            updated_at: Optional[str] = None) -> DomainsZoneV2
    func GetDomainsZoneV2(ctx *Context, name string, id IDInput, state *DomainsZoneV2State, opts ...ResourceOption) (*DomainsZoneV2, error)
    public static DomainsZoneV2 Get(string name, Input<string> id, DomainsZoneV2State? state, CustomResourceOptions? opts = null)
    public static DomainsZoneV2 get(String name, Output<String> id, DomainsZoneV2State state, CustomResourceOptions options)
    resources:  _:    type: selectel:DomainsZoneV2    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:
    Comment string
    Comment to add to the zone.
    CreatedAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    DelegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    Disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    DomainsZoneV2Id string
    LastCheckStatus bool
    Zone status retrieved during the last delegation check.
    LastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    Name string
    Zone name. Changing this creates a new zone.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    UpdatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    Comment string
    Comment to add to the zone.
    CreatedAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    DelegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    Disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    DomainsZoneV2Id string
    LastCheckStatus bool
    Zone status retrieved during the last delegation check.
    LastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    Name string
    Zone name. Changing this creates a new zone.
    ProjectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    UpdatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    comment String
    Comment to add to the zone.
    createdAt String
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt String
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    disabled Boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id String
    lastCheckStatus Boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt String
    Equals to the delegation_check_at argument value when the last_check_status is true.
    name String
    Zone name. Changing this creates a new zone.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt String
    Time when the zone was updated in the RFC 3339 timestamp format.
    comment string
    Comment to add to the zone.
    createdAt string
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt string
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    disabled boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id string
    lastCheckStatus boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt string
    Equals to the delegation_check_at argument value when the last_check_status is true.
    name string
    Zone name. Changing this creates a new zone.
    projectId string
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt string
    Time when the zone was updated in the RFC 3339 timestamp format.
    comment str
    Comment to add to the zone.
    created_at str
    Time when the zone was created in the RFC 3339 timestamp format.
    delegation_checked_at str
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    disabled bool
    Enables or disables the zone. Boolean flag, the default value is false.
    domains_zone_v2_id str
    last_check_status bool
    Zone status retrieved during the last delegation check.
    last_delegated_at str
    Equals to the delegation_check_at argument value when the last_check_status is true.
    name str
    Zone name. Changing this creates a new zone.
    project_id str
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updated_at str
    Time when the zone was updated in the RFC 3339 timestamp format.
    comment String
    Comment to add to the zone.
    createdAt String
    Time when the zone was created in the RFC 3339 timestamp format.
    delegationCheckedAt String
    Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format.
    disabled Boolean
    Enables or disables the zone. Boolean flag, the default value is false.
    domainsZoneV2Id String
    lastCheckStatus Boolean
    Zone status retrieved during the last delegation check.
    lastDelegatedAt String
    Equals to the delegation_check_at argument value when the last_check_status is true.
    name String
    Zone name. Changing this creates a new zone.
    projectId String
    Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
    updatedAt String
    Time when the zone was updated in the RFC 3339 timestamp format.

    Import

    You can import a zone:

    export OS_DOMAIN_NAME=<account_id>

    export OS_USERNAME=

    export OS_PASSWORD=

    export INFRA_PROJECT_ID=<selectel_project_id>

    $ pulumi import selectel:index/domainsZoneV2:DomainsZoneV2 zone_1 <zone_name>
    

    where:

    • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

    • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.

    • <password> — Password of the service user.

    • <selectel_project_id> — Unique identifier of the associated project. To get the ID, in the Control panel, go to DNS ⟶ project name ⟶ copy the ID of the required project. Learn more about Projects.

    • <zone_name> — Zone name, for example, example.com.. To get the name, in the Control panel, go to DNS. The zone name is in the Zone column.

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

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel logo
    selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel