feat(lambda): add PropagateTags to CapacityProvider for tag propagation#38180
Open
vicheey wants to merge 4 commits into
Open
feat(lambda): add PropagateTags to CapacityProvider for tag propagation#38180vicheey wants to merge 4 commits into
vicheey wants to merge 4 commits into
Conversation
Add support for propagating explicit tags to managed resources (EC2 instances, ENIs, EBS volumes) via the PropagateTags CFN property on CapacityProvider. Uses the static factory class pattern (matching ScalingOptions and InstanceTypeFilter on the same construct): - PropagateTags.none() - No tag propagation (defensive default) - PropagateTags.explicit(tags) - Propagate specified tags (max 40) Single prop: propagateTags?: PropagateTags Defensively emits Mode=None when not specified. Phase 2 extension: add PropagateTags.fromCapacityProvider() static method. Includes: - Unit tests (4 cases) - Integration test with deployed snapshot - README usage example
2 tasks
reedham-aws
reviewed
Jun 19, 2026
State the actual default behavior instead of vaguely referencing CloudFormation API default.
4e2c472 to
488d9e2
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.
Issue # (if applicable)
Closes #38181
N/A
Reason for this change
Lambda CapacityProvider now supports
PropagateTagsin CloudFormation, allowing customers to propagate tags to managed EC2 instances, ENIs, and EBS volumes. This enables tag-based security policies and cost allocation on managed infrastructure. The L1 property exists but there's no L2 support yet.Description of changes
Adds a
propagateTagsprop toCapacityProviderPropsusing the static factory class pattern (matchingScalingOptionsandInstanceTypeFilteralready on this construct):Available factories:
PropagateTags.none()— explicitly disable propagation (emitsMode: None)PropagateTags.explicit(tags)— propagate specified tags (emitsMode: Explicit+ExplicitTags)When omitted, nothing is emitted to CloudFormation (API default applies).
The
PropagateTagsclass uses a private constructor so users cannot construct invalid configurations. The class is structurally compatible with the L1PropagateTagsConfigProperty, enabling direct passthrough without manual object mapping.Validation: max 40 explicit tags (enforced at synth time).
Describe any new or updated permissions being added
None.
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license