azurerm_service_plan : allow update zone_balancing_enabled property without ForceNew#29810
azurerm_service_plan : allow update zone_balancing_enabled property without ForceNew#29810sreallymatt merged 5 commits intohashicorp:mainfrom
azurerm_service_plan : allow update zone_balancing_enabled property without ForceNew#29810Conversation
There was a problem hiding this comment.
Hi @sinbai, the azurerm_app_service_plan has been deprecated for quite some time, the deprecation message mentions it is feature frozen, as such I don't think we should be adding this change.
Instead, we should update azurerm_service_plan, I'm not too familiar with this specific resource but quickly looking at it, I believe the property we'll want to look at is zone_balancing_enabled
15e4284 to
62f334f
Compare
azurerm_app_service_plan : allow update zone_redundant property without ForceNewazurerm_service_plan : allow update zone_balancing_enabled property without ForceNew
Hi @sreallymatt thank you very much for your feedback. The code has been updated — could you please take another look? |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks for making those changes @sinbai, one minor comment, and could you run make terrafmt to resolve the failing GHA? Once that's done this should be good to go!
|
We've also got a test failure on the data source, could you update it as well?
|
Hi @sreallymatt thanks for your feedback earlier. The test case is now passing - would you mind reviewing it again when convenient? Much appreciated! |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @sinbai, LGTM! ✅
| zoneBalancing := rd.Get("zone_balancing_enabled").(bool) | ||
| if zoneBalancing { | ||
| if !strings.HasPrefix(servicePlanSku, "P") { | ||
| return fmt.Errorf("`zone_balancing_enabled` cannot be set to `true` when sku tier is not Premium") |
There was a problem hiding this comment.
FlexConsumption (FC1) also supports this
Example from our app service plan:
"sku": {
"name": "FC1",
"tier": "FlexConsumption",
"size": "FC1",
"family": "FC",
"capacity": 0
},
"zoneRedundant": true,|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |

Community Note
Description
TestAccServicePlan_completeUpdate.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Test Results:

https://hashicorp.teamcity.com/buildConfiguration/TF_AzureRM_AZURERM_SERVICE_PUBLIC_APPSERVICE/406223?buildTab=tests&expandedTest=build%3A%28id%3A406223%29%2Cid%3A2000000000
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_service_plan- allow updatezone_balancing_enabledproperty withoutForceNew[azurerm_service_plan: allow update of zone_redundant without ForceNew #29758]This is a (please select all that apply):
Related Issue(s)
Fixes #29758
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.