Add support for CloudFormationTemplate Parameter Overrides - #2071
Merged
Conversation
zentron
marked this pull request as ready for review
July 16, 2026 10:48
Outlines allowing key/value CloudFormation stack parameters to be supplied directly (merged over the existing file/S3 mechanisms) instead of always requiring a parameters file.
Costs nothing extra on the Calamari side since Inline already shares the same merge point as Package/GitRepository, and it keeps the feature consistent across all template sources.
…ameters Adds Octopus.Action.Aws.CloudFormationTemplateParameterOverrides, read in DeployCloudFormationCommand.Execute and merged into CloudFormationTemplate.Create's file-based parameters via CloudFormationParameterMerge. Also fixes two other CloudFormationTemplate constructor call sites broken by the inputs parameter type change (ITemplateInputs<Parameter> -> IEnumerable<Parameter>).
…eters Wires Octopus.Action.Aws.CloudFormationTemplateParameterOverrides through CloudFormationS3Template.Create, the S3 template-source path used when templateS3Url is set.
Both wrapper types were left with no callers after their two call sites were updated to pass IEnumerable<Parameter> directly instead of an ITemplateInputs<Parameter> wrapper.
zentron
force-pushed
the
robe/cloudformation-parameter-overrides
branch
from
July 16, 2026 10:48
8d55107 to
d212888
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new way to supply CloudFormation parameter overrides directly (via Octopus.Action.Aws.CloudFormationTemplateParameterOverrides) and merges those overrides with any parameters loaded from the existing parameters file/URL, so users don’t need to create a separate parameters file for small changes.
Changes:
- Introduces
CloudFormationParameterMergeand applies it in both file-based and S3-based CloudFormation template builders. - Wires a new special variable (
Octopus.Action.Aws.CloudFormationTemplateParameterOverrides) throughDeployAwsCloudFormationCommandinto template creation. - Refactors CloudFormation template constructors/call sites to accept
IEnumerable<Parameter>directly and adds test coverage for merge behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| source/Calamari.Tests/AWS/CloudFormation/CloudFormationTemplateFixture.cs | Adds tests verifying overrides merge over parameters loaded from a file. |
| source/Calamari.Tests/AWS/CloudFormation/CloudFormationS3TemplateFixture.cs | Adds test verifying S3 template creation uses overrides when no parameters URL is provided. |
| source/Calamari.Tests/AWS/CloudFormation/CloudFormationParameterMergeFixture.cs | Adds focused unit tests for merge semantics (replace/append/empty cases). |
| source/Calamari.Common/Util/ITemplate.cs | Removes unused template input/output helper types from common utilities. |
| source/Calamari.Aws/Integration/Ecs/Deploy/EcsDeployParameterGeneration.cs | Removes ListTemplateInputs<T> helper now that templates accept IEnumerable<Parameter>. |
| source/Calamari.Aws/Integration/CloudFormation/Templates/CloudFormationTemplate.cs | Adds override parameter input and merges overrides with file parameters before building requests. |
| source/Calamari.Aws/Integration/CloudFormation/Templates/CloudFormationS3Template.cs | Adds override parameter input and merges overrides with downloaded parameters before building requests. |
| source/Calamari.Aws/Integration/CloudFormation/Templates/CloudFormationParameterMerge.cs | New helper to merge primary parameters with override parameters. |
| source/Calamari.Aws/Deployment/Conventions/DeployEcsServiceConvention.cs | Updates ECS deployment convention to pass parameters directly as IEnumerable<Parameter>. |
| source/Calamari.Aws/Deployment/AwsSpecialVariables.cs | Adds new TemplateParameterOverrides special variable constant. |
| source/Calamari.Aws/Commands/DeployAwsCloudFormationCommand.cs | Reads override parameters from variables and passes them to template creation. |
| source/Calamari.Aws/Commands/CreateAwsS3Command.cs | Replaces EmptyTemplateInputs<Parameter> with Enumerable.Empty<Parameter>(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zentron
force-pushed
the
robe/cloudformation-parameter-overrides
branch
from
July 23, 2026 00:26
1c36f2d to
2823240
Compare
liam-mackie
approved these changes
Jul 23, 2026
liam-mackie
left a comment
Contributor
There was a problem hiding this comment.
LGTM, minor nits but should be fine!
zentron
enabled auto-merge (squash)
July 23, 2026 12:10
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.
Background
CloudFormationTemplates currently don't allow passing through parameter overrides directly and instead a parameter json file must be provided. This is unwieldy when just a few simple parameters need to be supplied and you dont want to have to create an Octopus specific template file.
Result
A new
Octopus.Action.Aws.CloudFormationTemplateParameterOverridesvariable can be provided as a key-value array of properties to be passed down into the final invocation.