subcategory |
---|
Domain names |
Creates a domain zone.
-> NOTE To order a product through Terraform, your account needs to have a default payment method defined. This can be done in the OVHcloud Control Panel or via API with the /me/payment/method endpoint.
data "ovh_me" "myaccount" {}
data "ovh_order_cart" "mycart" {
ovh_subsidiary = data.ovh_me.myaccount.ovh_subsidiary
}
data "ovh_order_cart_product_plan" "zone" {
cart_id = data.ovh_order_cart.mycart.id
price_capacity = "renew"
product = "dns"
plan_code = "zone"
}
resource "ovh_domain_zone" "zone" {
ovh_subsidiary = data.ovh_order_cart.mycart.ovh_subsidiary
plan {
duration = data.ovh_order_cart_product_plan.zone.selected_price.0.duration
plan_code = data.ovh_order_cart_product_plan.zone.plan_code
pricing_mode = data.ovh_order_cart_product_plan.zone.selected_price.0.pricing_mode
configuration {
label = "zone"
value = "myzone.mydomain.com"
}
configuration {
label = "template"
value = "minimized"
}
}
}
The following arguments are supported:
ovh_subsidiary
- (Required) OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json undermodels.nichandle.OvhSubsidiaryEnum
plan
- (Required) Product Plan to orderduration
- (Required) durationplan_code
- (Required) Plan codepricing_mode
- (Required) Pricing model identifiercatalog_name
- Catalog nameconfiguration
- (Optional) Representation of a configuration item for personalizing productlabel
- (Required) Identifier of the resourcevalue
- (Required) Path to the resource in API.OVH.COM
plan_option
- (Optional) Product Plan to orderduration
- (Required) durationplan_code
- (Required) Plan codepricing_mode
- (Required) Pricing model identifiercatalog_name
- Catalog nameconfiguration
- (Optional) Representation of a configuration item for personalizing productlabel
- (Required) Identifier of the resourcevalue
- (Required) Path to the resource in API.OVH.COM
Id is set to the order Id. In addition, the following attributes are exported:
-
dnssec_supported
- Is DNSSEC supported by this zone -
has_dns_anycast
- hasDnsAnycast flag of the DNS zone -
last_update
- Last update date of the DNS zone -
name
- Zone name -
name_servers
- Name servers that host the DNS zone -
order
- Details about an Orderdate
- dateorder_id
- order idexpiration_date
- expiration datedetails
- Information about a Bill entrydescription
- descriptionorder_detail_id
- order detail iddomain
- expiration datequantity
- quantity
Zone can be imported using the order_id
that can be retrieved in the order page at the creation time of the zone.
$ terraform import ovh_domain_zone.zone order_id