Skip to content

Commit 6bd53d2

Browse files
committed
review comments
1 parent 926de43 commit 6bd53d2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

internal/services/mysql/mysql_flexible_server_resource.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ func resourceMysqlFlexibleServer() *pluginsdk.Resource {
9797
WriteOnly: true,
9898
ConflictsWith: []string{"administrator_password"},
9999
RequiredWith: []string{"administrator_password_wo_version"},
100+
ValidateFunc: validate.FlexibleServerAdministratorPassword,
100101
},
101102

102103
"administrator_password_wo_version": {

internal/services/mysql/mysql_flexible_server_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ func TestAccMySqlFlexibleServer_writeOnlyPassword(t *testing.T) {
521521

522522
resource.ParallelTest(t, resource.TestCase{
523523
TerraformVersionChecks: []tfversion.TerraformVersionCheck{
524-
tfversion.SkipBelow(version.Must(version.NewVersion("1.11.0-beta1"))),
524+
tfversion.SkipBelow(version.Must(version.NewVersion("1.11.0"))),
525525
},
526526
ProtoV5ProviderFactories: framework.ProtoV5ProviderFactoriesInit(context.Background(), "azurerm"),
527527
Steps: []resource.TestStep{
@@ -545,7 +545,7 @@ func TestAccMySqlFlexibleServer_updateToWriteOnlyPassword(t *testing.T) {
545545

546546
resource.ParallelTest(t, resource.TestCase{
547547
TerraformVersionChecks: []tfversion.TerraformVersionCheck{
548-
tfversion.SkipBelow(version.Must(version.NewVersion("1.11.0-beta1"))),
548+
tfversion.SkipBelow(version.Must(version.NewVersion("1.11.0"))),
549549
},
550550
ProtoV5ProviderFactories: framework.ProtoV5ProviderFactoriesInit(context.Background(), "azurerm"),
551551
Steps: []resource.TestStep{

website/docs/r/mysql_flexible_server.html.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,14 @@ The following arguments are supported:
8585

8686
* `administrator_login` - (Optional) The Administrator login for the MySQL Flexible Server. Required when `create_mode` is `Default`. Changing this forces a new MySQL Flexible Server to be created.
8787

88-
* `administrator_password` - (Optional) The Password associated with the `administrator_login` for the MySQL Flexible Server. Either `administrator_password` or `administrator_password_wo` is required when `create_mode` is `Default`.
88+
* `administrator_password` - (Optional) The Password associated with the `administrator_login` for the MySQL Flexible Server.
8989

90-
* `administrator_password_wo` - (Optional, Write-Only) The Password associated with the `administrator_login` for the MySQL Flexible Server. Either `administrator_password_wo` or `administrator_password` is required when `create_mode` is `Default`.
90+
* `administrator_password_wo` - (Optional, Write-Only) The Password associated with the `administrator_login` for the MySQL Flexible Server.
9191

9292
* `administrator_password_wo_version` - (Optional) An integer value used to trigger an update for `administrator_password_wo`. This property should be incremented when updating `administrator_password_wo`.
9393

94+
~> **Note:** Either `administrator_password` or `administrator_password_wo` is required when `create_mode` is `Default`.
95+
9496
* `backup_retention_days` - (Optional) The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`.
9597

9698
* `create_mode` - (Optional)The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created.

0 commit comments

Comments
 (0)