diff --git a/internal/services/mysql/validate/flexible_server_sku_name.go b/internal/services/mysql/validate/flexible_server_sku_name.go index cca90bdbc901..efadacdbab87 100644 --- a/internal/services/mysql/validate/flexible_server_sku_name.go +++ b/internal/services/mysql/validate/flexible_server_sku_name.go @@ -16,7 +16,7 @@ func FlexibleServerSkuName(i interface{}, k string) (warnings []string, errors [ } // See all available sku names from https://docs.microsoft.com/en-us/azure/mysql/flexible-server/concepts-compute-storage#compute-tiers-size-and-server-types - if !regexp.MustCompile(`^(B|GP|MO)_((Standard_E(2|4|8|16|20|32|48|64|80i)ds_v4)|(Standard_E(2|2a|4|4a|8|8a|16|16a|20|20a|32|32a|48|48a|64|64a|96)ds_v5)|(Standard_B(1|1m|2|2m|4m|8m|12m|16m|20m)s)|(Standard_D(2|4|8|16|32|48|64)ds_v4)|(Standard_D(2|4|8|16|32|48|64)ads_v5))$`).MatchString(v) { + if !regexp.MustCompile(`^(B_(Standard_B(1|1m|2|2m|4m|8m|12m|16m|20m)s))|(GP_(Standard_D(2|4|8|16|32|48|64)ds_v4)|(Standard_D(2|4|8|16|32|48|64)ads_v5))|(MO_((Standard_E(2|4|8|16|20|32|48|64|80i)ds_v4)|(Standard_E(2|2a|4|4a|8|8a|16|16a|20|20a|32|32a|48|48a|64|64a|96)ds_v5)))$`).MatchString(v) { errors = append(errors, fmt.Errorf("%q is not a valid sku name, got %v", k, v)) return } diff --git a/internal/services/mysql/validate/flexible_server_sku_name_test.go b/internal/services/mysql/validate/flexible_server_sku_name_test.go index a31538cb6bea..679969499cbe 100644 --- a/internal/services/mysql/validate/flexible_server_sku_name_test.go +++ b/internal/services/mysql/validate/flexible_server_sku_name_test.go @@ -76,6 +76,16 @@ func TestFlexibleServerSkuName(t *testing.T) { input: "GP_Standard_D64ds_v4", valid: true, }, + { + name: "B_Standard_D64ds_v4", + input: "B_Standard_D64ds_v4", + valid: false, + }, + { + name: "MO_Standard_B2s", + input: "MO_Standard_B2s", + valid: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {