Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Graviton (ARM64) instances for the portscan service alongside existing x86_64 instances. This is a breaking change that modifies the nmap_instance_count variable from a simple number to an object specifying counts per architecture.
- Changed
nmap_instance_countvariable fromnumberto object witharm64andx86_64keys - Added separate AMI data sources for ARM64 and x86_64 architectures
- Updated instance provisioning to use appropriate AMI and instance type based on architecture
- Modified all count references to use the total calculated from both architectures
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| terraform/variables.tf | Updates nmap_instance_count variable type and description |
| terraform/locals.tf | Adds calculation for total nmap instance count across architectures |
| terraform/cyhy_nmap_ec2.tf | Implements dual-architecture AMI selection and instance type logic |
| terraform/cyhy_nmap_cloud_init.tf | Updates cloud init count to use total instance count |
| terraform/cyhy_mongo_ec2.tf | Updates commander configuration to use total instance count |
| terraform/README.md | Updates documentation to reflect variable type changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dv4harr10
approved these changes
Sep 18, 2025
jsf9k
approved these changes
Sep 18, 2025
Add the ability to specify the number of ARM64 and AMD64 `portscan` instances to deploy. The current configuration will deploy AMD64-based instances first and then ARM64-based instances. This was done to make the implementation as easy as possible given all of the other elements of the configuration that interact with these instances.
f305789 to
1d210fe
Compare
Member
Author
|
@cisagov/vm-dev I have updated the production tfvars file to align with the changes in this pull request (specifically the change to the |
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.
🗣 Description
Add the ability spin up Graviton-based
portscaninstances in addition to x86_64 ones.💭 Motivation and context
As part of our move to use Graviton-based instances (mainly for cost-benefits), and with the addition of ARM64-based AMIs added in #867, we can use
portscaninstances running on Graviton instances due to their straightforward configuration. Any Graviton-based instances will be deployed after any x86_64-based instances in sequence. Thus, with the configurationportscan1will be x86_64 andportscan2will be ARM64. This method was chosen because it is of minimal impact to our existing configuration and helper scripts.Warning
This is a breaking change because the format of the
nmap_instance_countvariable has changed from a number to an object where each key is an architecture and the value is the number of instances using that architecture.🧪 Testing
Automated tests pass. I deployed Graviton-based
portscaninstances in my testing environment both in addition to x86_64 instances and exclusively. I verified that they received work and were able to process it successfully.✅ Pre-approval checklist