Skip to content

Commit bad3e53

Browse files
committed
Add migration guide
1 parent ab5acc2 commit bad3e53

1 file changed

Lines changed: 52 additions & 6 deletions

File tree

website/docs/5.0-upgrade-guide.html.markdown

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ provider "azurerm" {
7474
features {}
7575
}
7676
```
77+
7778
##### How to replicate the previous behaviour
7879

7980
If you want to maintain the v4.x behaviour and automatically register the same set of Resource Providers as before, explicitly set `resource_provider_registrations` to the `legacy` resource provider set in your provider block:
@@ -87,7 +88,6 @@ provider "azurerm" {
8788

8889
For more information, see the [Resource Provider Registrations](index.html#resource-provider-registrations) section in the provider documentation.
8990

90-
9191
#### Enhanced Validation Default Changed
9292

9393
The enhanced validation feature, which caches supported Azure regions and Resource Providers from the Azure MetaData Service to validate `location` and Resource Provider arguments, now defaults to disabled in version 5.0.
@@ -111,6 +111,53 @@ This change was made because:
111111

112112
The legacy `ARM_PROVIDER_ENHANCED_VALIDATION` environment variable, which previously controlled both location and resource provider validation, has been removed in version 5.0. Please migrate to either the `enhanced_validation` provider block or the specific environment variables: `ARM_PROVIDER_ENHANCED_VALIDATION_LOCATIONS` and `ARM_PROVIDER_ENHANCED_VALIDATION_RESOURCE_PROVIDERS`.
113113

114+
## AI Services migration to Cognitive Account
115+
116+
The `azurerm_ai_services` resource has been removed and replaced by `azurerm_cognitive_account`. The tables below map every attribute from `azurerm_ai_services` to its equivalent in `azurerm_cognitive_account`.
117+
118+
### Top-Level Arguments
119+
120+
| `azurerm_ai_services` | `azurerm_cognitive_account` | Notes |
121+
| -----------------------| -----------------------------|-------|
122+
| `name` | `name` | Unchanged. |
123+
| `location` | `location` | Unchanged. |
124+
| `resource_group_name` | `resource_group_name` | Unchanged. |
125+
| `sku_name` | `sku_name` | Unchanged. |
126+
| (not present) | `kind` | Required. Set to `"AIServices"` to match the behaviour of `azurerm_ai_services`. |
127+
| `custom_subdomain_name` | `custom_subdomain_name` | Unchanged. |
128+
| `local_authentication_enabled` | `local_auth_enabled` | Renamed. Both default to `true`. |
129+
| `public_network_access` | `public_network_access_enabled` | Changed type. String (`"Enabled"` / `"Disabled"`) → Boolean (`true` / `false`). Defaults to `true`. |
130+
| `outbound_network_access_restricted` | `outbound_network_access_restricted` | Unchanged. |
131+
| `fqdns` | `fqdns` | Unchanged. |
132+
| `customer_managed_key` | `customer_managed_key` | See `customer_managed_key` block below. |
133+
| `identity` | `identity` | Unchanged. |
134+
| `network_acls` | `network_acls` | Unchanged. |
135+
| `storage` | `storage` | Note: the `storage` block was accepted by `azurerm_ai_services` but was not processed; values are now correctly applied by `azurerm_cognitive_account`. |
136+
| `tags` | `tags` | Unchanged. |
137+
138+
~> **Note:** If your configuration included a `storage` block under `azurerm_ai_services`, `terraform plan` may show changes after migration even though the Azure resource itself has not changed. This occurs because `azurerm_ai_services` silently ignored the `storage` block and never sent those values to the API, so the imported state does not reflect them. Running `terraform apply` will reconcile the state by applying the storage configuration for the first time.
139+
140+
### `customer_managed_key` Block
141+
142+
| `azurerm_ai_services` | `azurerm_cognitive_account` | Notes |
143+
| -----------------------| -----------------------------|-------|
144+
| `key_vault_key_id` | `key_vault_key_id` | Unchanged. |
145+
| `managed_hsm_key_id` | (not present) | Removed. Use the `azurerm_cognitive_account_customer_managed_key` resource for managed HSM key encryption. |
146+
| `identity_client_id` | `identity_client_id` | Unchanged. |
147+
148+
~> **Note:** In `azurerm_cognitive_account`, `key_vault_key_id` inside the `customer_managed_key` block is Required, whereas in `azurerm_ai_services` it was Optional (one of `key_vault_key_id` or `managed_hsm_key_id` was required).
149+
150+
### Exported Attributes
151+
152+
| `azurerm_ai_services` | `azurerm_cognitive_account` | Notes |
153+
| -----------------------| -----------------------------|-------|
154+
| `id` | `id` | Identical resource ID format. |
155+
| `endpoint` | `endpoint` | Unchanged. |
156+
| `primary_access_key` | `primary_access_key` | Available when `local_auth_enabled = true`. |
157+
| `secondary_access_key` | `secondary_access_key` | Available when `local_auth_enabled = true`. |
158+
| `identity.principal_id` | `identity.principal_id` | Unchanged. |
159+
| `identity.tenant_id` | `identity.tenant_id` | Unchanged. |
160+
114161
## Removed Resources
115162

116163
Please follow the format in the example below for adding removed resources:
@@ -225,7 +272,6 @@ This deprecated resource has been superseded/retired and has been removed from t
225272

226273
* This deprecated resource has been retired and has been removed from the Azure Provider.
227274

228-
229275
## Removed Data Sources
230276

231277
Please follow the format in the example below for adding removed data sources:
@@ -262,10 +308,10 @@ Please follow the format in the example below for listing breaking changes in re
262308

263309
### `azurerm_api_management`
264310

265-
* The deprecated `hostname_configuration.developer_portal.key_vault_id` property has been removed in favour of the ``hostname_configuration.developer_portal.key_vault_certificate_id`` property.
266-
* The deprecated `hostname_configuration.management.key_vault_id` property has been removed in favour of the ``hostname_configuration.management.key_vault_certificate_id`` property.
267-
* The deprecated `hostname_configuration.portal.key_vault_id` property has been removed in favour of the ``hostname_configuration.portal.key_vault_certificate_id`` property.
268-
* The deprecated `hostname_configuration.proxy.key_vault_id` property has been removed in favour of the ``hostname_configuration.proxy.key_vault_certificate_id`` property.
311+
* The deprecated `hostname_configuration.developer_portal.key_vault_id` property has been removed in favour of the ``hostname_configuration.developer_portal.key_vault_certificate_id`` property.
312+
* The deprecated `hostname_configuration.management.key_vault_id` property has been removed in favour of the ``hostname_configuration.management.key_vault_certificate_id`` property.
313+
* The deprecated `hostname_configuration.portal.key_vault_id` property has been removed in favour of the ``hostname_configuration.portal.key_vault_certificate_id`` property.
314+
* The deprecated `hostname_configuration.proxy.key_vault_id` property has been removed in favour of the ``hostname_configuration.proxy.key_vault_certificate_id`` property.
269315
* The deprecated `hostname_configuration.scm.key_vault_id` property has been removed in favour of the ``hostname_configuration.scm.key_vault_certificate_id`` property.
270316
* The deprecated `protocols.enable_http2` property has been removed in favour of the `protocols.http2_enabled` property.
271317
* The deprecated `security.enable_backend_ssl30` property has been removed in favour of the `security.backend_ssl30_enabled` property.

0 commit comments

Comments
 (0)