feat: relax cpu_options schema and add amd_sev_snp + nested_virtualization support#5039
feat: relax cpu_options schema and add amd_sev_snp + nested_virtualization support#5039brilong wants to merge 6 commits intogithub-aws-runners:mainfrom
Conversation
|
7ed48b6 to
37651d6
Compare
Brend-Smits
left a comment
There was a problem hiding this comment.
Hey @brilong
Great feature! Thanks a lot for the contribution.
I've tested this change and reviewed it together with @stuartp44
I've pushed some small commits to update the terraform modules and reformatted some code to make the linters happy...
From my perspective this is good to get merged now!
|
Small comment, I notice that your (@brilong) commits don't have verified signatures.. This prevents us from merging the pull request. Could you please rebase your PR and make sure the commits are signed? |
…ation support Signed-off-by: Brian Long <brilong@cisco.com>
- Upgraded AWS provider from version 6.22.1 to 6.35.1 in external-managed-ssm-secrets, multi-runner, and prebuilt examples. - Updated local provider from version 2.6.1 to 2.7.0 in the same examples. - Increased random provider version from 3.7.2 to 3.8.1 across all examples. - Updated provider hashes to reflect the new versions for AWS, local, and random providers.
668b3ba to
14d6640
Compare
|
@Brend-Smits I believe I have properly signed and verified my commits. Please take a look at let me know if you need anything else. Thank you! |
Thanks Brian! I've approved the PR, now waiting for @npalm to merge this. |
2075e98 to
571ad47
Compare
|
@npalm How does this look now? I updated the provider constraints to >= 6.33 in multiple places, both examples and module code. |
|
Hello @Brend-Smits, are you waiting on me for anything else? Thanks. |
|
Good from my point of view. Can we merge this now @npalm ? |
|
Really need this change in my use case. |
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