cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

CloudFormation Git sync - Nested stacks

Open mbollemeijer opened this issue 1 year ago • 1 comments

Name of the resource

AWS::CloudFormation::Stack

Resource Name

No response

Issue Description

We have enabled CloudFormation Git sync on our root template.

Layout

  • src |- root.yaml | - ecs.yaml
  • deploy.yaml

Ofcourse there are more files in this repo but that is not important for this example

The ecs.yaml is included via nested stack from root.yaml

Expected Behavior

When ecs.yml changes and is pushed to the monitored branch I expect that this file will be processed by Cloudformation to change resources.

Observed Behavior

  • make a change in ecs.yaml
  • Push it to the branch
  • See Cloudformation start the update process
  • See that the ecs stack is also performing the "update"
  • Looking on the "template" tab for ecs, I see an old version of the ecs template
  • No resources in ecs.yaml or underlying stacks get update.

Test Cases

  • Configure git sync on an existing repo with nesting stacks
  • Update a nested stack template file
  • Push to branch
  • See nothing changing.

Other Details

This was on already existing stack

mbollemeijer avatar Jan 12 '24 11:01 mbollemeijer

I think that the main issue here is the following.

Nested stacks only support pointing to an S3 bucket via TemplateURL. When you use Git to sync the repository, you should be able to point to a local path inside of this repo relative to the root template.

Can we change TemplateURL to allow releative path ?

mbollemeijer avatar Jan 12 '24 11:01 mbollemeijer