Skip to content

Commit

Permalink
mysql_server: New attributes, flatten storage_profile block (#6833)
Browse files Browse the repository at this point in the history
create_mode, creation_source_server_id,
infrastructure_encryption_enabled,
ssl_minimal_tls_version_enforced

Support replicas and point-in-time restores

Use booleans for toggle properties, renaming

auto_grow -> auto_grow_enabled
geo_redundant_backup -> geo_redundant_backup_enabled
ssl_enforcement -> ssl_enforcement_enabled
Remove redundant storage_profile block and move all properties
within to top level

Fixes: #4756
Related: #6459
  • Loading branch information
manicminer committed May 14, 2020
1 parent 05e303b commit d207eaa
Show file tree
Hide file tree
Showing 16 changed files with 960 additions and 378 deletions.
15 changes: 0 additions & 15 deletions azurerm/helpers/azure/mysql.go

This file was deleted.

Expand Up @@ -9,6 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mysql/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
Expand Down Expand Up @@ -43,7 +44,7 @@ func resourceArmMySQLConfiguration() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: azure.ValidateMySqlServerName,
ValidateFunc: validate.MysqlServerServerName,
},

"value": {
Expand Down
3 changes: 2 additions & 1 deletion azurerm/internal/services/mysql/mysql_database_resource.go
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mysql/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
Expand Down Expand Up @@ -46,7 +47,7 @@ func resourceArmMySqlDatabase() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: azure.ValidateMySqlServerName,
ValidateFunc: validate.MysqlServerServerName,
},

"charset": {
Expand Down
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mysql/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
Expand Down Expand Up @@ -46,7 +47,7 @@ func resourceArmMySqlFirewallRule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: azure.ValidateMySqlServerName,
ValidateFunc: validate.MysqlServerServerName,
},

"start_ip_address": {
Expand Down

0 comments on commit d207eaa

Please sign in to comment.