Skip to content

fix(rules): accept an instance type set by a launch template in the stack - #19

Merged
jhermesn merged 1 commit into
mainfrom
fix/instance-type-from-launch-template
Nov 5, 2026
Merged

jhermesn merged 1 commit into
mainfrom
fix/instance-type-from-launch-template

Conversation

@jhermesn

@jhermesn jhermesn commented Nov 5, 2026

Copy link
Copy Markdown
Owner

COST_EC2_INSTANCE_TYPE required InstanceType on every instance, so a template whose instance took an allowed type from its own launch template failed the gate, and the agent had to repeat the type on the instance.

An instance may now leave InstanceType out when it launches from a launch template in the same stack (Ref to it). The new COST_INSTANCE_LAUNCH_TEMPLATE_TYPE requires every launch template in that stack to set a type, which COST_LAUNCH_TEMPLATE_INSTANCE_TYPE already caps. A literal launch template ID (one outside the stack) still fails, and so does an oversized type set on the instance.

Tests: 7 new rule cases, including a typed instance next to a typeless one, so the rule cannot be skipped by a mixed template.

…tack

The instance-type rule required InstanceType on every instance, so a correct
template that took the type from its own launch template failed the gate.
@jhermesn jhermesn self-assigned this Nov 5, 2026
@jhermesn
jhermesn merged commit a232840 into main Nov 5, 2026
1 check passed
@jhermesn
jhermesn deleted the fix/instance-type-from-launch-template branch November 5, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant