azurerm_mssql_elasticpool - add support for the high_availability_replica_count property#31761
azurerm_mssql_elasticpool - add support for the high_availability_replica_count property#31761sreallymatt merged 10 commits intomainfrom
azurerm_mssql_elasticpool - add support for the high_availability_replica_count property#31761Conversation
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @catriona-m - left a couple comments inline
There was a problem hiding this comment.
The docs indicate you can have a maximum of 4 additional HA pools, we should validate for that (assuming it's accurate, I did not test provisioning with > 4)
There was a problem hiding this comment.
This default is problematic for users with existing elastic pools on a Hyperscale sku given Azure seems to default this to 1. We may have to set this to O+C until 5.0, or find another workaround, given we can't default this to 1 either.
There was a problem hiding this comment.
thanks @sreallymatt I hadn't realised that. I can't think of another workaround that would allow us to avoid o+c so I've just added that for now. WDYT?
There was a problem hiding this comment.
Pull request overview
Adds support for configuring and reading high_availability_replica_count on the azurerm_mssql_elasticpool resource (and exposing it via the data source), aligning the provider with Azure’s Hyperscale elastic pool HA replica capability requested in #28327.
Changes:
- Adds
high_availability_replica_countto theazurerm_mssql_elasticpoolresource schema, read/write logic, and diff-time validation. - Exposes
high_availability_replica_counton theazurerm_mssql_elasticpooldata source. - Updates docs and adds acceptance tests for the new attribute and SKU-tier restriction.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
internal/services/mssql/mssql_elasticpool_resource.go |
Adds the new schema field, wires it into create/update payloads, reads it back into state, and introduces a SKU-tier constraint in CustomizeDiff. |
internal/services/mssql/mssql_elasticpool_data_source.go |
Adds computed attribute to the data source and populates it from the API model. |
internal/services/mssql/mssql_elasticpool_resource_test.go |
Adds acceptance coverage for setting/updating replica count and for the non-Hyperscale validation error; also switches boolean pointer helper usage. |
website/docs/r/mssql_elasticpool.html.markdown |
Documents the new resource argument and its Hyperscale-only limitation. |
website/docs/d/mssql_elasticpool.html.markdown |
Documents the new data source attribute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
71c37bd to
f83f54f
Compare
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
|
Build failure This pull request contains a build failure which needs addressed here . |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @catriona-m - LGTM ✅
Community Note
Description
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 thething1property [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #28327
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.