feat: relax cpu_options schema and add amd_sev_snp + nested_virtualization support#5039
Open
brilong wants to merge 1 commit intogithub-aws-runners:mainfrom
Open
feat: relax cpu_options schema and add amd_sev_snp + nested_virtualization support#5039brilong wants to merge 1 commit intogithub-aws-runners:mainfrom
brilong wants to merge 1 commit intogithub-aws-runners:mainfrom
Conversation
Author
|
…ation support Signed-off-by: Brian Long <brilong@cisco.com>
7ed48b6 to
37651d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR updates the module’s CPU options plumbing to support newer EC2 Launch Template
cpu_optionsfields (notablynested_virtualizationandamd_sev_snp) while also making CPU topology settings optional so users aren’t forced to specifycore_count/threads_per_corejust to enable other CPU options.Motivation / Problem
When configuring runners via
multi-runner, thecpu_optionsobject currently requirescore_countandthreads_per_core. This blocks use-cases where users want to set only newly-supported provider fields likenested_virtualizationwithout also pinning CPU topology. AWS itself treats these settings as optional and instance-type-dependent.What changed
cpu_optionsobject type so these fields are optional:core_countthreads_per_corenested_virtualization(valid:enabled/disabled)amd_sev_snp(valid:enabled/disabled)amd_sev_snpandnested_virtualizationto restrict values toenabled|disabledwhen set.aws_launch_templatecpu_optionsblock to pass throughamd_sev_snpandnested_virtualization(usingtry(..., null)so unset values remain unset).cpu_optionscan include the new fields and no longer forcescore_count/threads_per_core.Compatibility / Notes
core_countandthreads_per_corecontinue to work.nested_virtualizationoramd_sev_snpwithout specifying CPU topology.Testing
terraform initterraform validateterraform planwithcpu_options.nested_virtualization = "enabled"on supported instance familiesFixes #5040