Skip to content

azurerm_shared_image_version - support for new block uefi_settings#28076

Open
yeoldegrove wants to merge 17 commits intohashicorp:mainfrom
yeoldegrove:shared_image_version_uefi_settings
Open

azurerm_shared_image_version - support for new block uefi_settings#28076
yeoldegrove wants to merge 17 commits intohashicorp:mainfrom
yeoldegrove:shared_image_version_uefi_settings

Conversation

@yeoldegrove
Copy link
Copy Markdown

@yeoldegrove yeoldegrove commented Nov 20, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

  • Bump galleryimageversions API to support security profile and uefi settings.

  • For resource shared_image_version

    • support new block uefi_settings
      • This new settings configure secure boot certificates and is needed if you want to boot a secure bootable image with custom keys.
    • add documentation for uefi_settings
  • Not adding a matching block to the data source as the Azure API does not return any security profiles.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #28064

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@yeoldegrove
Copy link
Copy Markdown
Author

When can I expect that somebody has a look at this?

@github-actions
Copy link
Copy Markdown
Contributor

This PR is being labeled as "stale" because it has not been updated for 30 or more days.

If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone.

If you need some help completing this PR, please leave a comment letting us know. Thank you!

@yeoldegrove
Copy link
Copy Markdown
Author

It would be great if somebody would take a look at this.

@github-actions github-actions bot removed the stale label Feb 4, 2025
@codgician
Copy link
Copy Markdown

Kindly adding some active maintainers for comments: @katbyte @jackofallops @stephybun

@yeoldegrove
Copy link
Copy Markdown
Author

@codgician @katbyte @jackofallops @stephybun Can anybody please start reviewing this?

Copy link
Copy Markdown
Collaborator

@ms-zhenhua ms-zhenhua left a comment

Choose a reason for hiding this comment

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

Hi @yeoldegrove,

Thanks for this PR - I've taken a look through and left some comments inline. If we can fix those up, this should be good to go 👍

Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread website/docs/r/shared_image_version.html.markdown Outdated
Comment thread website/docs/r/shared_image_version.html.markdown Outdated
Comment thread website/docs/r/shared_image_version.html.markdown Outdated
Comment thread website/docs/r/shared_image_version.html.markdown Outdated
@yeoldegrove yeoldegrove force-pushed the shared_image_version_uefi_settings branch from 58ad4cf to 57ef77c Compare February 24, 2025 11:46
@yeoldegrove
Copy link
Copy Markdown
Author

@ms-zhenhua Thanks for the review! I just fixed all the issues you pointed out and force pushed to this PR.

Copy link
Copy Markdown
Collaborator

@ms-zhenhua ms-zhenhua left a comment

Choose a reason for hiding this comment

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

Hi @yeoldegrove,

Thanks for your updates - I've taken another look through and left some comments inline. Please help confirm.

Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread website/docs/r/shared_image_version.html.markdown Outdated
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
@yeoldegrove yeoldegrove force-pushed the shared_image_version_uefi_settings branch from 57ef77c to d74f0fc Compare February 26, 2025 12:45
@yeoldegrove
Copy link
Copy Markdown
Author

@ms-zhenhua another round of improvements ;)

Copy link
Copy Markdown
Collaborator

@ms-zhenhua ms-zhenhua left a comment

Choose a reason for hiding this comment

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

Hi @yeoldegrove,

Thanks for your updates - I've taken another look through and left some comments inline. Please help confirm.

Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
Comment thread internal/services/compute/shared_image_version_resource_test.go Outdated
@yeoldegrove yeoldegrove force-pushed the shared_image_version_uefi_settings branch from d74f0fc to f6624ce Compare March 5, 2025 12:57
Copy link
Copy Markdown
Member

@catriona-m catriona-m left a comment

Choose a reason for hiding this comment

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

Hi @yeoldegrove it looks like there are some CI failures on this. Could you take a look at fixing this up and then I can take another look? Thanks!

@yeoldegrove yeoldegrove force-pushed the shared_image_version_uefi_settings branch from cf82c0c to 3fae953 Compare October 27, 2025 09:46
@yeoldegrove
Copy link
Copy Markdown
Author

@catriona-m make test now works for me if I run it locally.

@yeoldegrove yeoldegrove force-pushed the shared_image_version_uefi_settings branch from 3fae953 to 3b5fda2 Compare October 28, 2025 14:09
@yeoldegrove
Copy link
Copy Markdown
Author

@catriona-m Could you have another look?

@yeoldegrove
Copy link
Copy Markdown
Author

@catriona-m Could you have another look?

This PR just had it's 1st anniversary by the way ;)

@yeoldegrove
Copy link
Copy Markdown
Author

Happy New Year. Pinging this again. In case anything is still required from my side, please say so.

@yeoldegrove
Copy link
Copy Markdown
Author

A new month, a new ping. @catriona-m Anything needed from my side to get this merged?

@yeoldegrove
Copy link
Copy Markdown
Author

Two month later, a new ping. @catriona-m Anything needed from my side to get this merged?

…azurerm into shared_image_version_uefi_settings
Copy link
Copy Markdown
Collaborator

@wuxu92 wuxu92 left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this resource! I left some comments about the force new logic and validation, otherwise looks good to me.

Comment thread internal/services/compute/shared_schema.go Outdated
Comment thread internal/services/compute/shared_image_version_resource.go
@yeoldegrove
Copy link
Copy Markdown
Author

@wuxu92 Thanks for the review. Addressed both of your comments.


The `uefi_settings` block supports the following:

* `signature_template_names` - (Required) A list of UEFI signature template names to include in the UEFI settings. Possible values are `MicrosoftUefiCertificateAuthorityTemplate`, `MicrosoftWindowsTemplate` and `NoSignatureTemplate`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the update! we need to update the document for the ForceNew logic of these fields. otherwise looks good to me!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@wuxu92 Updated the docs, too.

@yeoldegrove yeoldegrove requested a review from wuxu92 April 13, 2026 08:08
Copy link
Copy Markdown
Collaborator

@wuxu92 wuxu92 left a comment

Choose a reason for hiding this comment

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

LGTM, but can we remove this comment line?

Comment thread internal/services/compute/image_resource_test.go Outdated
@yeoldegrove yeoldegrove requested a review from wuxu92 April 13, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for uefi_settings in azurerm_shared_image_version

9 participants