aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

[Cloudformation] - [BUG] - change-set is not correctly reflected #2053

Open mosestam97 opened 1 month ago

mosestam97 commented 1 month ago

Name of the resource

Other

Resource Name

AWS::CloudFormation::Stack

Issue Description

When we are updating the nested stack at the parent level, if I remove a resource or add a resource, it will trigger modifications for other child stacks within the changeset. For example: AWSTemplateFormatVersion: '2010-09-09' Description: An example template for a Step Functions state machine. Resources: StateMachineName: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/state

thisiss3one: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/s3one.yml

iamdummy: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/iamdummy.yml

anotherone: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement:

In here, I will be removing the anotherone resource, but that will cause a modification to the other resources.

Expected Behavior

As we only removed the resource 'anotherone', I will expect that only the removed resource shows in the changeset.

Observed Behavior

When I removed one resource from the parent stack, it showed all the resources as modified even though they were not changed.

Test Cases

AWSTemplateFormatVersion: '2010-09-09' Description: An example template for a Step Functions state machine. Resources: StateMachineName: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/state

thisiss3one: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/s3one.yml

iamdummy: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://thisisas3.s3.amazonaws.com/iamdummy.yml

anotherone: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement:

Other Details

No response

mosestam97 commented 1 month ago

![Uploading Screenshot 2024-05-30 at 2.52.09 PM.png…]()

nmeisen commented 1 month ago

AWS::Cloudformation::S3 is not a proper resource name. Please add the correct resource name to the title and fix it in the ticket. Thanks.