Skip to content
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

azurerm_linux_virtual_machine azurerm_windows_virtual_machine - support for gallery_applications #18406

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

myc2h6o
Copy link
Contributor

@myc2h6o myc2h6o commented Sep 16, 2022

This is similar to what we have added in VMSS. And gallery_applications in VM is updatable

A `gallery_applications` block supports the following:
* `package_reference_id` - (Required) Specifies the Gallery Application Version resource ID. Changing this forces a new resource to be created.
-> **NOTE:** The `package_reference_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.
* `configuration_reference_blob_uri` - (Optional) Specifies the URI to an Azure Blob that will replace the default configuration for the package if provided. Changing this forces a new resource to be created.
* `order` - (Optional) Specifies the order in which the packages have to be installed. Possible values are between `0` and `2,147,483,647`. Changing this forces a new resource to be created.
* `tag` - (Optional) Specifies a passthrough value for more generic context. This field can be any valid `string` value. Changing this forces a new resource to be created.

@myc2h6o
Copy link
Contributor Author

myc2h6o commented Sep 16, 2022

Test result (Failed tests are being fixed as part of #17671)
image

Comment on lines 251 to 253
* `package_reference_id` - (Required) Specifies the Gallery Application Version resource ID.

-> **NOTE:** The `package_reference_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be called

Suggested change
* `package_reference_id` - (Required) Specifies the Gallery Application Version resource ID.
-> **NOTE:** The `package_reference_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.
* `version_id` - (Required) Specifies the Gallery Application Version resource ID.

or

Suggested change
* `package_reference_id` - (Required) Specifies the Gallery Application Version resource ID.
-> **NOTE:** The `package_reference_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.
* `package_reference_id` - (Required) Specifies the Gallery Application Version resource ID.
-> **NOTE:** The `gallery_application_version_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.

so the note sins't required?


-> **NOTE:** The `package_reference_id` should be in the form of `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/applications/application1/versions/version1`.

* `configuration_reference_blob_uri` - (Optional) Specifies the URI to an Azure Blob that will replace the default configuration for the package if provided.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is reference make sense here?

Suggested change
* `configuration_reference_blob_uri` - (Optional) Specifies the URI to an Azure Blob that will replace the default configuration for the package if provided.
* `configuration_blob_uri` - (Optional) Specifies the URI to an Azure Blob that will replace the default configuration for the package if provided.

@@ -206,6 +206,8 @@ func resourceLinuxVirtualMachine() *pluginsdk.Resource {
ValidateFunc: azValidate.ISO8601DurationBetween("PT15M", "PT2H"),
},

"gallery_applications": VirtualMachineGalleryApplicationsSchema(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be

Suggested change
"gallery_applications": VirtualMachineGalleryApplicationsSchema(),
"gallery_application": VirtualMachineGalleryApplicationsSchema(),

@myc2h6o
Copy link
Contributor Author

myc2h6o commented Sep 26, 2022

Hi @katbyte thanks for reviewing the pr! The new property names you suggested totally make sense. Just the feature has just been added to VMSS with these property names (could be found in pr description), shall we use the same one from VMSS here, or use the new name instead, add deprecate those in VMSS?

@katbyte
Copy link
Collaborator

katbyte commented Sep 27, 2022

i think these names are sufficiently better the old ones should be deprecated ?

@myc2h6o
Copy link
Contributor Author

myc2h6o commented Sep 28, 2022

@katbyte got it! I've updated the property names, please take a look.

@myc2h6o
Copy link
Contributor Author

myc2h6o commented Sep 28, 2022

After this change is done, I'll start another pr to update these property names in VMSS resources

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌵

@katbyte katbyte merged commit c9fa6e7 into hashicorp:main Sep 29, 2022
@github-actions github-actions bot added this to the v3.25.0 milestone Sep 29, 2022
katbyte added a commit that referenced this pull request Sep 29, 2022
@myc2h6o myc2h6o deleted the vm_gallery_app branch September 29, 2022 02:50
@github-actions
Copy link

This functionality has been released in v3.25.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@farwind
Copy link

farwind commented Oct 5, 2022

seems like functionality was released for both linux and windows properly but release notes states only windows vitrual machine twice :
"azurerm_storage_account - support for the multichannel_enabled property (#17999)
azurerm_windows_virtual_machine - support for the gallery_application property (#18406)
azurerm_virtual_hub_bgp_connection - support for the virtual_network_connection_id property (#18469)
azurerm_windows_virtual_machine - support for the gallery_application property (#18406)"

@katbyte
Copy link
Collaborator

katbyte commented Oct 27, 2022

thanks @farwind for pointing that out - i've corrected the changelog

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants