Перейти к основному содержимому
selectel_domains_zone_v2
Последнее изменение:

selectel_domains_zone_v2

Creates and manages a zone in DNS Hosting (actual) using public API v2. For more information about DNS Hosting, 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 Cloud Platform project. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Cloud Platform 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 the delegation_check_at argument value when the last_check_status is true.

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 top right corner of the Control panel, go to the account menu ⟶ Profile and SettingsUser 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 Cloud Platform project. To get the project ID, in the Control panel, go to Cloud Platform ⟶ project name ⟶ copy the ID of the required project. Learn more about Cloud Platform 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.