TPM active PCR banks & domain firmware type #977
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR comes in 2 parts
Allow setting the active PCR banks of a domain's TPM
This setting is currently missing from the TPM definition and causes some issues when using the TPM attestation functionality.
This PR expands the TPM definition to allow users the choice of which PCR banks to set active.
Allow choosing a domain's firmware type
To make proper use of the TPM, e.g. measured-boot/secure-boot, we need EFI firmware.
Correctly setting up EFI is currently a bit messy using the terraform provider since simply setting
OS.Firmware
is not supported.Using libvirt directly, one would simply define the following to achieve a functional efi setup:
See the libvirt bootloader XML definition for more details.
With this PR users can set a new option,
firmware_type
, toefi
to achieve the same behavior.Personally, I would prefer renaming the current
firmware
option to the more appropriateloader
, so we can simply name the newfirmware_type
optionfirmware
.But I am not sure if such a thing should be done in this PR as this will likely break existing configurations relying on it.
I am also open to splitting this PR in two parts if so desired.
Example definition:
For reference, this is the xslt I am currently using as a workaround to achieve the functionality of this PR.