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

azurerm_mysql_* - deprecate Mysql Single Server and its sub resources #25187

Merged
merged 8 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/services/mysql/mysql_aad_administrator_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func resourceMySQLAdministrator() *pluginsdk.Resource {
Read: resourceMySQLAdministratorRead,
Update: resourceMySQLAdministratorCreateUpdate,
Delete: resourceMySQLAdministratorDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_active_directory_administrator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_active_directory_administrator` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := parse.AzureActiveDirectoryAdministratorID(id)
return err
Expand Down
2 changes: 2 additions & 0 deletions internal/services/mysql/mysql_configuration_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func resourceMySQLConfiguration() *pluginsdk.Resource {
Read: resourceMySQLConfigurationRead,
Delete: resourceMySQLConfigurationDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_configuration` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := configurations.ParseConfigurationID(id)
return err
Expand Down
3 changes: 3 additions & 0 deletions internal/services/mysql/mysql_database_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func resourceMySqlDatabase() *pluginsdk.Resource {
Create: resourceMySqlDatabaseCreate,
Read: resourceMySqlDatabaseRead,
Delete: resourceMySqlDatabaseDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_database` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := databases.ParseDatabaseID(id)
return err
Expand Down
2 changes: 2 additions & 0 deletions internal/services/mysql/mysql_firewall_rule_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func resourceMySqlFirewallRule() *pluginsdk.Resource {
Update: resourceMySqlFirewallRuleCreateUpdate,
Delete: resourceMySqlFirewallRuleDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_firewall_rule` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := firewallrules.ParseFirewallRuleID(id)
return err
Expand Down
2 changes: 2 additions & 0 deletions internal/services/mysql/mysql_server_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func dataSourceMySqlServer() *pluginsdk.Resource {
return &pluginsdk.Resource{
Read: dataSourceMySqlServerRead,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` data source is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` data source instead.",

Timeouts: &pluginsdk.ResourceTimeout{
Read: pluginsdk.DefaultTimeout(5 * time.Minute),
},
Expand Down
2 changes: 2 additions & 0 deletions internal/services/mysql/mysql_server_key_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func resourceMySQLServerKey() *pluginsdk.Resource {
Update: resourceMySQLServerKeyCreateUpdate,
Delete: resourceMySQLServerKeyDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server_key` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `customer_managed_key` property of the `azurerm_mysql_flexible_server` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := serverkeys.ParseKeyID(id)
return err
Expand Down
2 changes: 2 additions & 0 deletions internal/services/mysql/mysql_server_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func resourceMySqlServer() *pluginsdk.Resource {
Update: resourceMySqlServerUpdate,
Delete: resourceMySqlServerDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` resource instead.",

Importer: pluginsdk.ImporterValidatingResourceIdThen(func(id string) error {
_, err := servers.ParseServerID(id)
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func resourceMySQLVirtualNetworkRule() *pluginsdk.Resource {
Update: resourceMySQLVirtualNetworkRuleCreateUpdate,
Delete: resourceMySQLVirtualNetworkRuleDelete,

DeprecationMessage: "Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.",

Importer: pluginsdk.ImporterValidatingResourceId(func(id string) error {
_, err := virtualnetworkrules.ParseVirtualNetworkRuleID(id)
return err
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/mysql_server.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |-

Use this data source to access information about an existing MySQL Server.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` data source is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` data source instead.

## Example Usage

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

Allows you to set a user or group as the AD administrator for an MySQL server in Azure

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_active_directory_administrator` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_active_directory_administrator` resource instead.

## Example Usage

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

Sets a MySQL Configuration value on a MySQL Server.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_configuration` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_configuration` resource instead.

## Disclaimers

~> **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it.
Expand Down
2 changes: 2 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

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_database` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_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).

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

Manages a Firewall Rule for a MySQL Server.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_firewall_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server_firewall_rule` resource instead.

## Example Usage (Single IP Address)

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

Manages a MySQL Server.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `azurerm_mysql_flexible_server` resource instead.

## Example Usage

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

Manages a Customer Managed Key for a MySQL Server.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_server_key` resource is deprecated and will be removed in v4.0 of the AzureRM Provider. Please use the `customer_managed_key` property of the `azurerm_mysql_flexible_server` resource instead.

## Example Usage

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

Manages a MySQL Virtual Network Rule.

~> **Note:** Azure Database for MySQL Single Server and its sub resources are scheduled for retirement by 2024-09-16 and will migrate to using Azure Database for MySQL Flexible Server: https://go.microsoft.com/fwlink/?linkid=2216041. The `azurerm_mysql_virtual_network_rule` resource is deprecated and will be removed in v4.0 of the AzureRM Provider.

-> **NOTE:** MySQL Virtual Network Rules [can only be used with SKU Tiers of `GeneralPurpose` or `MemoryOptimized`](https://docs.microsoft.com/azure/mysql/concepts-data-access-and-security-vnet)

## Example Usage
Expand Down
Loading