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 authored 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.

Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit d207eaa

Please sign in to comment.