Skip to content

Commit

Permalink
azurerm_kusto_database/azurerm_mariadb_database/`azurerm_mssql_da…
Browse files Browse the repository at this point in the history
…tabase`/`azurerm_mssql_managed_database`/`azurerm_mysql_database`/`azurerm_netapp_volume`/`azurerm_postgresql_database`/`azurerm_postgresql_flexible_server_database`/`azurerm_sql_database` and `azurerm_sql_managed_database` - add note at top of documents and include the lifecycle `prevent_destroy` argument in the sample configuration block. (#24245)

Co-authored-by: kt <[email protected]>
  • Loading branch information
WodansSon and katbyte authored Dec 15, 2023
1 parent ba44fbc commit d92ec89
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 6 deletions.
7 changes: 7 additions & 0 deletions website/docs/r/kusto_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Manages a Kusto (also known as Azure Data Explorer) Database

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -37,6 +39,11 @@ resource "azurerm_kusto_database" "database" {
hot_cache_period = "P7D"
soft_delete_period = "P31D"
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages a MariaDB Database within a MariaDB Server

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -41,6 +43,11 @@ resource "azurerm_mariadb_database" "example" {
server_name = azurerm_mariadb_server.example.name
charset = "utf8mb4"
collation = "utf8mb4_unicode_520_ci"
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages a MS SQL Database.

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -53,6 +55,11 @@ resource "azurerm_mssql_database" "example" {
tags = {
foo = "bar"
}
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages an Azure SQL Azure Managed Database for a SQL Managed Instance.

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -50,6 +52,11 @@ resource "azurerm_mssql_managed_instance" "example" {
resource "azurerm_mssql_managed_database" "example" {
name = "example"
managed_instance_id = azurerm_mssql_managed_instance.example.id
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages a MySQL Database within a MySQL Server

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -49,6 +51,11 @@ resource "azurerm_mysql_database" "example" {
server_name = azurerm_mysql_server.example.name
charset = "utf8"
collation = "utf8_unicode_ci"
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages a NetApp Volume.

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## NetApp Volume Usage

```hcl
Expand Down Expand Up @@ -57,10 +59,6 @@ resource "azurerm_netapp_pool" "example" {
}
resource "azurerm_netapp_volume" "example" {
lifecycle {
prevent_destroy = true
}
name = "example-netappvolume"
location = azurerm_resource_group.example.location
zone = "1"
Expand Down Expand Up @@ -93,6 +91,11 @@ resource "azurerm_netapp_volume" "example" {
data_protection_snapshot_policy {
snapshot_policy_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotpolicy1"
}
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

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

Manages a PostgreSQL Database within a PostgreSQL Server

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand Down Expand Up @@ -42,6 +44,11 @@ resource "azurerm_postgresql_database" "example" {
server_name = azurerm_postgresql_server.example.name
charset = "UTF8"
collation = "English_United States.1252"
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Manages a PostgreSQL Flexible Server Database.

!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

## Example Usage

```hcl
Expand All @@ -34,6 +36,11 @@ resource "azurerm_postgresql_flexible_server_database" "example" {
server_id = azurerm_postgresql_flexible_server.example.id
collation = "en_US.utf8"
charset = "utf8"
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

Expand Down
9 changes: 8 additions & 1 deletion website/docs/r/sql_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ description: |-

Allows you to manage an Azure SQL Database

-> **Note:** The `azurerm_sql_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_database) resource instead.
!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

->**NOTE:** The `azurerm_sql_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_database) resource instead.

## Example Usage

Expand Down Expand Up @@ -50,6 +52,11 @@ resource "azurerm_sql_database" "example" {
tags = {
environment = "production"
}
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

Expand Down
9 changes: 8 additions & 1 deletion website/docs/r/sql_managed_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ description: |-

Manages a SQL Azure Managed Database.

-> **Note:** The `azurerm_sql_managed_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_database) resource instead.
!>**IMPORTANT:** To mitigate the possibility of accidental data loss it is highly recommended that you use the `prevent_destroy` lifecycle argument in your configuration file for this resource. For more information on the `prevent_destroy` lifecycle argument please see the [terraform documentation](https://developer.hashicorp.com/terraform/tutorials/state/resource-lifecycle#prevent-resource-deletion).

->**NOTE:** The `azurerm_sql_managed_database` resource is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the [`azurerm_mssql_managed_database`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_managed_database) resource instead.

## Example Usage

Expand Down Expand Up @@ -51,6 +53,11 @@ resource "azurerm_sql_managed_database" "example" {
sql_managed_instance_id = azurerm_sql_managed_instance.example.id
name = "exampledatabase"
location = azurerm_resource_group.example.location
# prevent the possibility of accidental data loss
lifecycle {
prevent_destroy = true
}
}
```

Expand Down

0 comments on commit d92ec89

Please sign in to comment.