Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func FlexibleServerSkuName(i interface{}, k string) (warnings []string, errors [
return
}

if !regexp.MustCompile(`^((B_Standard_B((1|2|4|8|12|16|20)ms|2s))|(GP_Standard_D(((2|4|8|16|32|48|64)s_v3)|((2|4|8|16|32|48|64)ds_v4)|((2|4|8|16|32|48|64|96)ds_v5)|((2|4|8|16|32|48|64|96)ads_v5)))|(MO_Standard_E((((2|4|8|16|20|32|48|64)s)_v3)|((2|4|6|8|16|20|32|48|64)ds_v4)|((2|4|8|16|20|32|48|64|96)ds_v5)|((2|4|8|16|32|48|64|96)ads_v5))))$`).MatchString(v) {
if !regexp.MustCompile(`^((B_Standard_B((1|2|4|8|12|16|20)ms|2s))|(GP_Standard_D(((2|4|8|16|32|48|64)s_v3)|((2|4|8|16|32|48|64)ds_v4)|((2|4|8|16|32|48|64|96)ds_v5)|((2|4|8|16|32|48|64|96)ads_v5)|(C(2|4|8|16|32|48|64|96)ads_v5)))|(MO_Standard_E((((2|4|8|16|20|32|48|64)s)_v3)|((2|4|6|8|16|20|32|48|64)ds_v4)|((2|4|8|16|20|32|48|64|96)ds_v5)|((2|4|8|16|32|48|64|96)ads_v5))))$`).MatchString(v) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new pattern should be added to the existing unit test here so that the regex pattern is properly tested.

Copy link
Copy Markdown
Contributor

@toddgiguere toddgiguere Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also seeing a different pattern for the new AMD sku in the portal, I'll need to do some further research. Instead of the pattern DC4ds_v5 I'm seeing a pattern of D4ads_v5, with the "a" denoting AMD.

Disregard this previous comment. I now see this is less AMD and more a type of VM that is left off of the portal options. I do see this pattern when querying the postgres capabilities API, but only for a select few regions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tejeshwara1 Another thing we have discovered is that migration from "_D" to "_DC" will actually fail, and a manual migration needs to happen. More info here

We do not currently have sku_name change as requiring ForceNew, so if someone changes to a "_DC" they will get a failure condition that may not be clear. Since we are adding this new sku to open this possibility, we should probably have some way of alerting the user in a clear way that this is not allowed. Also this limitation should also be noted in the documentation for this resource.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use this official documentation link in the docs to alert users that there are also some region limitations: https://learn.microsoft.com/en-us/azure/postgresql/security/security-confidential-computing#limitations-and-considerations

errors = append(errors, fmt.Errorf("%q is not a valid sku name, got %v", k, v))
return
}
Expand Down
Loading