feat(aws-ec2-instance-type): add AWS EC2 instance type parameter module - #1136
phorcys420 wants to merge 8 commits into
Conversation
Module Scorecard Check
|
| Presentation & Onboarding | Credential Hygiene | Restricted-Environment Readiness | Engineering Quality | Overall |
|---|---|---|---|---|
| 12 / 17 | 20 / 20 | N/A | 10 / 10 | 89 / 100 |
Drilldown
Presentation & Onboarding — 12 / 17
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Configuration-mode examples | 12 | 12 | README provides documented examples for all major modes: basic usage, restrict to category, customize names/descriptions, exclude instance types, architecture-aware provisioning, and use without parameter (create_parameter = false). Each example includes sensible defaults and clear context. |
| Visual preview | 5 | 0 | No image, GIF, or video in README. The icon reference points to an external SVG but is not embedded as a visual preview of the module in action. |
Credential Hygiene — 20 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Secrets marked sensitive | 16 | 16 | Module has no secret inputs. It is a parameter helper that exposes AWS EC2 instance type metadata; no credentials are involved. Full credit as the concern does not apply. |
| Non-hardcoded auth path | 4 | 4 | No authentication required. The module provides a static catalog of instance types and creates a coder_parameter; it does not interact with AWS APIs or require credentials. Full credit as the concern does not apply. |
Restricted-Environment Readiness — N/A
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Mirrorable artifact source | 5 | N/A | Module downloads nothing. It reads a static JSON file bundled with the module (instance-types.json) and creates a Coder parameter. No external downloads or installs occur. |
| Bring-your-own binary | 10 | N/A | Module installs nothing. It is a pure Terraform data transformation module that exposes AWS instance type metadata. |
| Egress transparency | 3 | N/A | Module contacts no external endpoints. It operates entirely on local data (bundled JSON) and Coder API calls implicit to coder_parameter. |
| Runs without sudo | 2 | N/A | Module contains no scripts. It is pure Terraform HCL with no install or runtime scripts. |
Engineering Quality — 10 / 10
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Input quality | 6 | 6 | All inputs have clear descriptions. Sensible defaults provided (display_name, description, create_parameter = true, mutable = false, type_category = ["general"]). The type_category variable documents allowed values in its description. The exclude variable shows example format. No validation blocks present, but the input types and defaults are appropriate for the use case. |
| Test coverage | 4 | 4 | The module includes .tftest.hcl with comprehensive test coverage: tests for default behavior, category filtering, exclusions, custom names/descriptions, architecture lookups, and create_parameter = false mode. Tests verify both the parameter creation and the instances catalog output. Clear testing story for business logic. |
Overall — 89 / 100
Raw 42 / 47 → round(42 / 47 × 100) = 89
(Normalized from Utility track: Universal criteria only, with Restricted-Environment Readiness marked N/A as the module downloads nothing and runs no scripts. Final score rounds to 89, but recalculating: 42/47 = 0.8936... × 100 = 89.36 → 89. However, checking the math: 12 + 20 + 10 = 42 out of 17 + 20 + 10 = 47. 42/47 = 0.893617 × 100 = 89.36 rounds to 89. Adjusting overall to 89.)
Overall: 89 / 100
Tip
You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".
Scored against SCORECARD.md with claude-sonnet-4-5. Language-model scores are advisory.
…ib, gpus) over description
…y and coder_arch in module
…he built-in parameter
AWS EC2 Instance Type
Adds a
coder_parameterhelper module that presents AWS EC2 instance types with human-readable specs, following the same pattern ascoder/aws-regionandwhizus/exoscale-instance-type.Instance types are grouped into purpose-based categories (
general,compute,memory,storage,gpu). The module exposesdefault,mutable,type_category,exclude,custom_names,custom_descriptions, andcoder_parameter_order, with a singlevalueoutput.Every instance type currently offered by the AWS templates (
t3.micro→t3.2xlarge, used byaws-linux,aws-windows, andaws-envbuilder) is part of the defaultgeneralcategory, so the module can back those templates. A test asserts that coverage.Usage
Checks
terraform fmt,terraform validate,terraform test(8/8 pass)prettier --checkreadmevalidationDecision log
coder/registry(aws-linux,aws-windows,aws-envbuilder) andcoder/coder(aws-linux,aws-windows,aws-devcontainer,aws-multi-agent). All expose onlyt3.micro–t3.2xlarge, so those six are guaranteed present in the defaultgeneralcategory and pinned by a test.exoscale-instance-type— purpose-based categories,type_categoryfilter,exclude,custom_names/custom_descriptions,dynamic "option", and avalueoutput.general= t3 + m5,compute= c5,memory= r5,storage= i3,gpu= g4dn. vCPU/RAM values were verified against AWS documentation (g4dn GPU counts and i3 fractional memory double-checked).nameis the instance ID anddescriptionis the spec string, so the picker shows both; both are overridable viacustom_names/custom_descriptions.default = ""(no preselection), matchingaws-regionandexoscale-instance-type..tftest.hcl(required byAGENTS.md); the optionalmain.test.tsis omitted since the native tests fully cover this parameter-only module.verified: false, initialversion 1.0.0.🤖 Opened by Coder Agents on behalf of @phorcys420.