azure_policy_set_definition - ForceNew when number of parameters is less than before#29866
Conversation
|
anybody keen to review this please Thanks. maybe @stephybun |
|
or @mbfrahry can you please check this one? Thanks. |
There was a problem hiding this comment.
Hi @stanleyz, I've recently migrated the azurerm_policy_set_definition resource from azure-sdk-for-go to go-azure-sdk which involved significant changes including splitting this resource into 2 separate ones. (PR #29863)
Could you rebase this PR on main, and see what is required to incorporate this change into the new structure of the resource(s)?
Note: policy_set_definition_resource.go now contains 2 implementations of this resource, the original untyped resource, and a typed resource implementation that will only be active once 5.0 has been released. The CustomizeDiff would have to be added to both, so unfortunately that will add a bit of extra work. Let me know if you're still interested in continuing on this, thanks!
5d2b923 to
f3dd61f
Compare
|
Thanks @sreallymatt for looking into this. I've rebased it. However I don't see how the CustomDiff if any is passed to |
|
Hi @stanleyz, for typed resources there is another layer on top of the Terraform Plugin SDK, to add a CustomizeDiff you'll need to implement the If you add For a bit of background on typed resources and the typed SDK within this repository, you can reference the glossary in the contributing guides |
less than before This is a replicate of hashicorp#26083 from `azurerm_policy_definition` to `azurerm_policy_set_definition`, the same is also applied to to the new `azurerm_management_group_policy_set` resource
f3dd61f to
6b3658a
Compare
|
Thanks @sreallymatt for the direction. Of course, implement multiple interface, please take a look, let me know any other update you want. Thanks. |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks for making those changes @stanleyz, I've left a couple more comments if you wouldn't mind taking a look
website/docs/r/management_group_policy_set_definition.html.markdown
Outdated
Show resolved
Hide resolved
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @stanleyz, this LGTM now! ✅
|
Thanks @sreallymatt |
|
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. |


This is a replicate of #26083 from
azurerm_policy_definitiontoazurerm_policy_set_definitionCommunity 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 #0000
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.
relates to #26083