fix: add --import-existing-resources to CDK deploy in integration-suite#1174
Merged
jchrostek-dd merged 1 commit intomainfrom Apr 8, 2026
Merged
fix: add --import-existing-resources to CDK deploy in integration-suite#1174jchrostek-dd merged 1 commit intomainfrom
jchrostek-dd merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds the --import-existing-resources flag to the CDK deploy command in the integration-suite CI job to handle pipeline retry scenarios. When a pipeline fails mid-deploy, AWS resources (particularly Lambda log groups) can be created in AWS, but the CloudFormation stack remains in ROLLBACK_COMPLETE state. On retry, CDK would fail trying to create already-existing resources. The flag tells CDK to import existing resources instead of failing validation, which is the standard CDK solution for this scenario.
Changes:
- Added
--import-existing-resourcesflag to thenpx cdk deploycommand in the integration-suite job
litianningdatadog
approved these changes
Apr 8, 2026
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.
What changed and why
Added
--import-existing-resourcesflag to thenpx cdk deploycommand in theintegration-suiteCI job (.gitlab/templates/pipeline.yaml.tpl).Root cause: When a pipeline fails mid-deploy, some AWS resources (specifically the dotnet Lambda log group
/aws/lambda/integ-{IDENTIFIER}-{TEST_SUITE}-dotnet-lambda) are created in AWS but the CloudFormation stack is left inROLLBACK_COMPLETEstate. On a pipeline retry for the same commit (sameIDENTIFIER=CI_COMMIT_SHORT_SHA), CDK attempts to create the already-existing log group and fails with:The
--import-existing-resourcesflag tells CDK to import any already-existing resources into the stack instead of failing validation, which is the standard CDK solution for this exact scenario.Jira
SVLS-8825