diff --git a/azurerm/data_source_dns_zone.go b/azurerm/data_source_dns_zone.go index 54b902c59db4..595398c24714 100644 --- a/azurerm/data_source_dns_zone.go +++ b/azurerm/data_source_dns_zone.go @@ -44,8 +44,9 @@ func dataSourceArmDnsZone() *schema.Resource { }, "zone_type": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Deprecated: "Private DNS Zones are now supported through a separate resource in Azure & Terraform", }, "registration_virtual_network_ids": { diff --git a/azurerm/resource_arm_dns_zone.go b/azurerm/resource_arm_dns_zone.go index 370b9d7ee4db..e342d56e469a 100644 --- a/azurerm/resource_arm_dns_zone.go +++ b/azurerm/resource_arm_dns_zone.go @@ -49,9 +49,10 @@ func resourceArmDnsZone() *schema.Resource { }, "zone_type": { - Type: schema.TypeString, - Default: string(dns.Public), - Optional: true, + Type: schema.TypeString, + Default: string(dns.Public), + Optional: true, + Deprecated: "Use the `azurerm_private_dns_zone` resource instead.", ValidateFunc: validation.StringInSlice([]string{ string(dns.Private), string(dns.Public), diff --git a/website/docs/d/dns_zone.html.markdown b/website/docs/d/dns_zone.html.markdown index cc23b4e466af..5345bfdc0581 100644 --- a/website/docs/d/dns_zone.html.markdown +++ b/website/docs/d/dns_zone.html.markdown @@ -38,7 +38,9 @@ in your subscription that matches `name` will be returned. * `max_number_of_record_sets` - Maximum number of Records in the zone. * `number_of_record_sets` - The number of records already in the zone. * `name_servers` - A list of values that make up the NS record for the zone. -* `zone_type` - The type of this DNS zone, such as `Public` or `Private`. * `registration_virtual_network_ids` - A list of Virtual Network ID's that register hostnames in this DNS zone. * `resolution_virtual_network_ids` - A list of Virtual Network ID's that resolve records in this DNS zone. * `tags` - A mapping of tags to assign to the EventHub Namespace. +* `zone_type` - (**Deprecated**) The type of this DNS zone, such as `Public` or `Private`. + +~> **NOTE:** This field is deprecated since Private DNS is now a separate resource and will be removed in 2.0 of the Azure Provider. diff --git a/website/docs/guides/2.0-upgrade-guide.html.markdown b/website/docs/guides/2.0-upgrade-guide.html.markdown index 6b28283e9e90..b8e6e6ce7724 100644 --- a/website/docs/guides/2.0-upgrade-guide.html.markdown +++ b/website/docs/guides/2.0-upgrade-guide.html.markdown @@ -145,6 +145,10 @@ The AzureAD Data Sources and Resources have been moved to [the new AzureAD Provi A guide on how to migrate to using the new Provider [can be found here](https://www.terraform.io/docs/providers/azurerm/guides/migrating-to-azuread.html). +### Data Source: `azurerm_dns_zone` + +The deprecated field `zone_type` will be removed. Private DNS Zones are now a separate resource in both Azure and Terraform. + ### Data Source: `azurerm_kubernetes_cluster` The deprecated field `dns_prefix` within the `agent_pool_profile` block will be removed. @@ -227,6 +231,10 @@ The `preference` field in the `record` block will change from a String to an Int The deprecated `record` field will be removed. This has been replaced by the `records` field which accepts multiple values. +### Resource: `azurerm_dns_zone` + +The deprecated `zone_type` field will be removed. This has been replaced by the `azurerm_private_dns_zone` resource. + ### Resource: `azurerm_eventhub` The deprecated `location` field will be removed, since this is no longer used. diff --git a/website/docs/r/dns_zone.html.markdown b/website/docs/r/dns_zone.html.markdown index 7120d316eaa1..c9911a51c60e 100644 --- a/website/docs/r/dns_zone.html.markdown +++ b/website/docs/r/dns_zone.html.markdown @@ -38,14 +38,16 @@ The following arguments are supported: * `resource_group_name` - (Required) Specifies the resource group where the resource exists. Changing this forces a new resource to be created. -* `zone_type` - (Required) Specifies the type of this DNS zone. Possible values are `Public` or `Private` (Defaults to `Public`). - * `registration_virtual_network_ids` - (Optional) A list of Virtual Network ID's that register hostnames in this DNS zone. This field can only be set when `zone_type` is set to `Private`. * `resolution_virtual_network_ids` - (Optional) A list of Virtual Network ID's that resolve records in this DNS zone. This field can only be set when `zone_type` is set to `Private`. * `tags` - (Optional) A mapping of tags to assign to the resource. +* `zone_type` - (Optional / **Deprecated**) Specifies the type of this DNS zone. Possible values are `Public` or `Private` (Defaults to `Public`). + +~> **NOTE:** This field was part of the initial Preview for Private DNS Zones - which has been [replaced by the separate resource `azurerm_private_dns_zone`](private_dns_zone.html) and will be removed in v2.0 of the Azure Provider. + ## Attributes Reference The following attributes are exported: