aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(cfn-include): allow cyclical dependencies

Open AlexanderADietrich opened this issue 3 years ago • 2 comments

Add an optional flag that both disables throwing an error on cyclical references and utilizes a placeholder->replace->delete method of recursion breaking to avoid stack overflows.

This enables users of cloudformation transforms (example: SAM) to import their unprocessed templates without manual intervention, allowing scale that otherwise is unachievable using current workarounds such as pre-processing or downloading processed templates.

Add a flag to Template within the assertions package to allow uniting of this change.

Fixes https://github.com/aws/aws-cdk/issues/22071

Shoutout to https://github.com/rix0rrr and https://github.com/skinny85 for creation of the new issue/discussions and discussions respectively.

Additionally verified (beyond uniting) by processing template currently broken by lack of circular ref processing and this change successfully allows processing of that template. Cannot share as it is private, and a different scrubbed example has already been provided in fixed issue.


All Submissions:

Adding new Unconventional Dependencies:

  • [ ] This PR adds new unconventional dependencies following the process described here

New Features

  • [ ] Have you added the new feature to an integration test?
    • [ ] Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

AlexanderADietrich avatar Sep 19 '22 20:09 AlexanderADietrich

gitpod-io[bot] avatar Sep 19 '22 20:09 gitpod-io[bot]

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Oct 04 '22 07:10 mergify[bot]

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 4db8c060b83a17854cce8f5239390aacac303c4c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar Oct 04 '22 08:10 aws-cdk-automation

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Oct 04 '22 08:10 mergify[bot]