selectel_domains_zone_v2
Эта инструкция — копия документации Selectel Terraform-провайдера в Terraform Registry.
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
resource "selectel_domains_zone_v2" "zone_1" {
name = "example.com."
project_id = selectel_vpc_project_v2.project_1.id
}
Argument Reference
-
name
- (Required) Zone name. Changing this creates a new zone. -
project_id
- (Required) Unique identifier of the associated project. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects. -
comment
- (Optional) Comment to add to the zone. -
disabled
- (Optional) Enables or disables the zone. Boolean flag, the default value is false.
Attributes Reference
-
created_at
- Time when the zone was created in the RFC 3339 timestamp format. -
updated_at
- Time when the zone was updated in the RFC 3339 timestamp format. -
delegation_checked_at
- Time when DNS Hosting checked if the zone was delegated to Selectel NS servers in the RFC 3339 timestamp format. -
last_check_status
- Zone status retrieved during the last delegation check. -
last_delegated_at
- Equals to thedelegation_check_at
argument value when thelast_check_status
istrue
.
Import
You can import a zone:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
export SEL_PROJECT_ID=<selectel_project_id>
terraform import selectel_domains_zone_v2.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.