AWS CloudFormation Rollback scenarios with 'ResourceUpdateConflict' When Updating Security Group Rules
I'm reviewing some code and I can't seem to get I'm following best practices but I'm maintaining legacy code that I'm working with an scenario when trying to update my CloudFormation stack that includes an AWS Security Group..... Specifically, I'm trying to modify the ingress rules of a security group that is associated with an EC2 instance. Upon attempting the update, the stack fails with the behavior message: `ResourceUpdateConflict: The security group 'sg-1234567890abcdef0' has dependencies and want to be updated`. I've confirmed that no other resources are currently using the security group. My CloudFormation template looks like this: ```yaml Resources: MySecurityGroup: Type: 'AWS::EC2::SecurityGroup' Properties: GroupDescription: 'My security group' VpcId: 'vpc-0123456789abcdef0' SecurityGroupIngress: - IpProtocol: 'tcp' FromPort: '80' ToPort: '80' CidrIp: '0.0.0.0/0' - IpProtocol: 'tcp' FromPort: '22' ToPort: '22' CidrIp: '0.0.0.0/0' MyInstance: Type: 'AWS::EC2::Instance' Properties: InstanceType: 't2.micro' SecurityGroups: - !Ref MySecurityGroup ImageId: 'ami-0abcdef1234567890' ``` In my update, I'm trying to add a new ingress rule for port 443. I've tried rolling back and reapplying the stack, but the same behavior occurs. I've also checked the AWS console for any pending changes or resources associated with the security group that might cause a conflict, but I don't see anything that stands out. What steps can I take to resolve this scenario and successfully update the security group? For context: I'm using Yaml on macOS. Thanks in advance! This is my first time working with Yaml 3.10. I'd love to hear your thoughts on this. I'm working in a Linux environment. I appreciate any insights! Is there a simpler solution I'm overlooking?