Updated flexible_server_sku_name.go to support Standard_DCads series#31004
Updated flexible_server_sku_name.go to support Standard_DCads series#31004tejeshwara1 wants to merge 1 commit intohashicorp:mainfrom
Conversation
Added support to DC series
This comment was marked as off-topic.
This comment was marked as off-topic.
| } | ||
|
|
||
| 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) { |
There was a problem hiding this comment.
This new pattern should be added to the existing unit test here so that the regex pattern is properly tested.
There was a problem hiding this comment.
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.
| } | ||
|
|
||
| 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) { |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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
|
@tejeshwara1 the team thinks that we should put a check in a new We decided that it would be best to NOT trigger a If you are not familiar with this pattern, I can finish this up for you, but I'll probably do it in a new branch and PR, I don't want to push to this one which is tied to your fork's |
|
Hey @toddgiguere , thanks for the update. you can do it in a new branch and PR. |
|
There is a new PR to expand on this change a bit further, also adding a validation to stop an upgrade from these new server types, as that is not supported in Azure currently and requires manual intervention. We will review and test on this new PR, closing this one. New PR: #32209 |
Added support to DC series
Community Note
Description
Add support to DC series of VMs
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_resource- support for theazurerm_postgresql_flexible_serversku_nameThis is a (please select all that apply):
Related Issue(s)
Fixes #0000
AI Assistance Disclosure
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.