-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update azurerm_linux|windows_virtual_machine_scale_set
- change extension block from List to Set
#11425
Update azurerm_linux|windows_virtual_machine_scale_set
- change extension block from List to Set
#11425
Conversation
Just to note I feel like the current behaviour is a bug, as changing the order of the extensions doesn't change it on the Azure side, so you get a perpetual diff. So it would be great if it could be fixed here, otherwise I will have to keep using the deprecated scale set resource, which has its own bugs to deal with. |
Whilst this would technically be a breaking change - tbh I'd think this is probably fine to change prior to 3.0, since it's not a field which users are likely to interpolate from. That said, switching this from a List to a Set will make this considerably harder to read in the plan, so ultimately this probably needs the new "Dictionary" type rather than being a Set outright - so in practice this'd likely need to change twice, once to a Set and then again to the new Dictionary type once it's available. In either case both of those are going to require migration testing, since the trade-off here is the Plan which will be unclear (particularly if new fields are added to this block over time) - but I don't think there's much we can do there but test this and see how the UX works WDYT? |
Sounds good to me, the new dictionary type sounds interesting as well. |
Hi @tombuildsstuff if we all agree to migrate it now, I will then make some more commit to make the changes in this PR. |
azurerm_linux|windows_virtual_machine_scale_set
- adding a note that we should change extension block from List to Setazurerm_linux|windows_virtual_machine_scale_set
- change extension block from List to Set
@ArcturusZhang - i think we're good to migrate now, and then again in the future to unblock people. just need to make sure we test old -> new versions of the resource |
I will let you know when I have done the testing on this |
@@ -1342,7 +1342,7 @@ func FlattenVirtualMachineScaleSetAutomaticRepairsPolicy(input *compute.Automati | |||
|
|||
func VirtualMachineScaleSetExtensionsSchema() *schema.Schema { | |||
return &schema.Schema{ | |||
Type: schema.TypeList, | |||
Type: schema.TypeSet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll also need the expand functions changed from .([]interface{})
to .(*schema.Set).List()
?
…f beta and enabled binary testing
Hi @tombuildsstuff I had some updates, please take a look, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This has been released in version 2.60.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.60.0"
}
# ... other configuration ... |
…ension block from List to Set (hashicorp#11425)
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. |
fixes #11367
I am only adding the note comment here since changing this type would be a provider breaking change.Please let me know if we could make the actual changes in this PR.