[Cloudformation] - [BUG] - change-set is not correctly reflected
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: - Effect: Allow Principal: Service: codeguru-profiler.amazonaws.com Action: 'sts:AssumeRole' ManagedPolicyArns: - arn:aws:iam::aws:policy/AmazonS3FullAccess RoleName: anotherolequestionmark
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: - Effect: Allow Principal: Service: codeguru-profiler.amazonaws.com Action: 'sts:AssumeRole' ManagedPolicyArns: - arn:aws:iam::aws:policy/AmazonS3FullAccess RoleName: anotherolequestionmark
Other Details
No response
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.