Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 4.0 Docs TODOs #28490

Merged
merged 12 commits into from
Jan 16, 2025
4 changes: 2 additions & 2 deletions contributing/topics/best-practices.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Best Practices

Since it's inception the provider has undergone various iterations and changes in convention, as a result there can be legacy by-products within the provider which are inadvertently used as references. This section contains a miscellaneous assortment of current best practices to be aware of when contributing to the provider.
Since its inception, the provider has undergone various iterations and changes in convention, as a result there can be legacy by-products within the provider which are inadvertently used as references. This section contains a miscellaneous assortment of current best practices to be aware of when contributing to the provider.

## Separate Create and Update Methods

Historically the Provider has opted to combine the Create and Update methods due to the behaviour of the Azure API, where the same API is used for both Create and Update, meaning that the same payload has to be sent during both the Creation and Update of the resource.

In order to properly support Terraform's `ignore_changes` feature, rather than using a combined method for Create and Update, we're now requiring that these are separate, and that in the Update partial/delta differences are performed, to only update the value for a field if it's marked as changed.
In order to properly support Terraform's `ignore_changes` feature, rather than using a combined method for Create and Update, we're now requiring that these be separate, and that in the Update partial/delta differences are performed, to only update the value for a field if it's marked as changed.

For example, whilst a Create method may look similar to below:

Expand Down
11 changes: 1 addition & 10 deletions website/docs/r/key_vault.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ Manages a Key Vault.

## Disclaimers

~> **Note:** It's possible to define Key Vault Access Policies both within [the `azurerm_key_vault` resource](key_vault.html) via the `access_policy` block and by using [the `azurerm_key_vault_access_policy` resource](key_vault_access_policy.html). However it's not possible to use both methods to manage Access Policies within a KeyVault, since there'll be conflicts.

<!-- TODO: Remove Note in 4.0 -->
~> **Note:** It's possible to define Key Vault Certificate Contacts both within [the `azurerm_key_vault` resource](key_vault.html) via the `contact` block and by using [the `azurerm_key_vault_certificate_contacts` resource](key_vault_certificate_contacts.html). However it's not possible to use both methods to manage Certificate Contacts within a KeyVault, since there'll be conflicts.
~> **Note:** It's possible to define Key Vault Access Policies both within [the `azurerm_key_vault` resource](key_vault.html) via the `access_policy` block and by using [the `azurerm_key_vault_access_policy` resource](key_vault_access_policy.html). However, it's not possible to use both methods to manage Access Policies within a KeyVault, since there will be conflicts.

~> **Note:** Terraform will automatically recover a soft-deleted Key Vault during Creation if one is found - you can opt out of this using the `features` block within the Provider block.

Expand Down Expand Up @@ -108,12 +105,6 @@ The following arguments are supported:

~> **Note:** This field can only be configured one time and cannot be updated.

<!-- TODO: Remove `contact` and Notes in 4.0 -->
* `contact` - (Optional) One or more `contact` block as defined below.

~> **Note:** This field can only be set once user has `managecontacts` certificate permission.

~> **Note:** This field can only be set when `public_network_access_enabled` is set to `true`. To manage the `contact` with `public_network_access_enabled` set to `false`, please use [the `azurerm_key_vault_certificate_contacts` resource](key_vault_certificate_contacts.html) instead of this property, and remove this property from the configuration. Especially for existing `azurerm_key_vault`, this means you'll need to import the `azurerm_key_vault_certificate_contacts` manually.

* `tags` - (Optional) A mapping of tags to assign to the resource.

Expand Down
8 changes: 0 additions & 8 deletions website/docs/r/key_vault_certificate_contacts.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ description: |-

Manages Key Vault Certificate Contacts.

## Disclaimers

<!-- TODO: Remove Note in 4.0 -->
~> **Note:** It's possible to define Key Vault Certificate Contacts both within [the `azurerm_key_vault` resource](key_vault.html) via the `contact` block and by using [the `azurerm_key_vault_certificate_contacts` resource](key_vault_certificate_contacts.html). However it's not possible to use both methods to manage Certificate Contacts within a KeyVault, since there'll be conflicts.

## Example Usage

```hcl
Expand Down Expand Up @@ -77,10 +72,7 @@ The following arguments are supported:

* `key_vault_id` - (Required) The ID of the Key Vault. Changing this forces a new resource to be created.

* `contact` - (Required) One or more `contact` blocks as defined below.
<!-- TODO: Update in 4.0
* `contact` - (Optional) One or more `contact` blocks as defined below.
-->

---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/mssql_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The following arguments are supported:

* `elastic_pool_id` - (Optional) Specifies the ID of the elastic pool containing this database.

* `enclave_type` - (Optional) Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the database. <!-- TODO: Uncomment in 4.0: Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource.--> Possible values are `Default` or `VBS`.
* `enclave_type` - (Optional) Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the database. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.

-> **NOTE:** `enclave_type` is currently not supported for DW (e.g, DataWarehouse) and DC-series SKUs.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/mssql_elasticpool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The following arguments are supported:

-> **NOTE:** One of either `max_size_gb` or `max_size_bytes` must be specified.

* `enclave_type` - (Optional) Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. <!-- TODO: Uncomment in 4.0: Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource.--> Possible values are `Default` or `VBS`.
* `enclave_type` - (Optional) Specifies the type of enclave to be used by the elastic pool. When `enclave_type` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclave_type` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.

-> **NOTE:** All databases that are added to the elastic pool must have the same `enclave_type` as the elastic pool.

Expand Down
5 changes: 2 additions & 3 deletions website/docs/r/windows_function_app_slot.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ The following arguments are supported:

~> **Note:** Assigning the `virtual_network_subnet_id` property requires [RBAC permissions on the subnet](https://docs.microsoft.com/en-us/azure/app-service/overview-vnet-integration#permissions)

[//]: # (TODO 4.0 add it in 4.0 provider)
[//]: # (* `vnet_image_pull_enabled` - &#40;Optional&#41; Specifies whether traffic for the image pull should be routed over virtual network. Defaults to `false`.)
* `vnet_image_pull_enabled` - (Optional) Specifies whether traffic for the image pull should be routed over virtual network. Defaults to `false`.

[//]: # (~> **Note:** The feature can also be enabled via the app setting `WEBSITE_PULL_IMAGE_OVER_VNET`. The Setting is enabled by default for app running in the App Service Environment.)
~> **Note:** The feature can also be enabled via the app setting `WEBSITE_PULL_IMAGE_OVER_VNET`. The Setting is enabled by default for app running in the App Service Environment.

* `webdeploy_publish_basic_authentication_enabled` - (Optional) Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`.

Expand Down
Loading