selectel.DomainsZoneV2
Explore with Pulumi AI
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:
- Project
Id 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.
- Domains
Zone stringV2Id - Name string
- Zone name. Changing this creates a new zone.
- Project
Id 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.
- Domains
Zone stringV2Id - Name string
- Zone name. Changing this creates a new zone.
- project
Id 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.
- domains
Zone StringV2Id - name String
- Zone name. Changing this creates a new zone.
- project
Id 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.
- domains
Zone stringV2Id - 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_ strv2_ id - name str
- Zone name. Changing this creates a new zone.
- project
Id 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.
- domains
Zone StringV2Id - 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:
- Created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- Delegation
Checked stringAt - 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.
- Last
Check boolStatus - Zone status retrieved during the last delegation check.
- Last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - Updated
At string - Time when the zone was updated in the RFC 3339 timestamp format.
- Created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- Delegation
Checked stringAt - 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.
- Last
Check boolStatus - Zone status retrieved during the last delegation check.
- Last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - Updated
At string - Time when the zone was updated in the RFC 3339 timestamp format.
- created
At String - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked StringAt - 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.
- last
Check BooleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated StringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - updated
At String - Time when the zone was updated in the RFC 3339 timestamp format.
- created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked stringAt - 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.
- last
Check booleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - updated
At 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_ strat - 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_ boolstatus - Zone status retrieved during the last delegation check.
- last_
delegated_ strat - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - updated_
at str - Time when the zone was updated in the RFC 3339 timestamp format.
- created
At String - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked StringAt - 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.
- last
Check BooleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated StringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - updated
At 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.
- Comment string
- Comment to add to the zone.
- Created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- Delegation
Checked stringAt - 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 stringV2Id - Last
Check boolStatus - Zone status retrieved during the last delegation check.
- Last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - Name string
- Zone name. Changing this creates a new zone.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Updated
At string - Time when the zone was updated in the RFC 3339 timestamp format.
- Comment string
- Comment to add to the zone.
- Created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- Delegation
Checked stringAt - 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 stringV2Id - Last
Check boolStatus - Zone status retrieved during the last delegation check.
- Last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - Name string
- Zone name. Changing this creates a new zone.
- Project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- Updated
At string - Time when the zone was updated in the RFC 3339 timestamp format.
- comment String
- Comment to add to the zone.
- created
At String - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked StringAt - 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.
- domains
Zone StringV2Id - last
Check BooleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated StringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - name String
- Zone name. Changing this creates a new zone.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- updated
At String - Time when the zone was updated in the RFC 3339 timestamp format.
- comment string
- Comment to add to the zone.
- created
At string - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked stringAt - 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.
- domains
Zone stringV2Id - last
Check booleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated stringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - name string
- Zone name. Changing this creates a new zone.
- project
Id string - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- updated
At 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_ strat - 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_ strv2_ id - last_
check_ boolstatus - Zone status retrieved during the last delegation check.
- last_
delegated_ strat - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - 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.
- created
At String - Time when the zone was created in the RFC 3339 timestamp format.
- delegation
Checked StringAt - 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.
- domains
Zone StringV2Id - last
Check BooleanStatus - Zone status retrieved during the last delegation check.
- last
Delegated StringAt - Equals to the
delegation_check_at
argument value when thelast_check_status
istrue
. - name String
- Zone name. Changing this creates a new zone.
- project
Id String - Unique identifier of the associated project. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
- updated
At 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 Management ⟶ User 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.