I have a CloudFormation template with that creates a Launch Configuration:
Resources:
# Launch Configuration for the instances in the Atoscaling Group
LaunchConfiguration:
Type: AWS::AutoScaling::LaunchConfiguration
Properties:
AssociatePublicIpAddress: false
ImageId: !Ref EC2AMI
InstanceType: !Ref EC2InstanceType
KeyName: !Ref EC2Key
IamInstanceProfile: !ImportValue EC2RoleInstanceProfileARN
LaunchConfigurationName: jxt-private-asg-launch-config
SecurityGroups:
- !ImportValue PrivateSecurityGroupId
When I try to update the stack I get the below error:
CloudFormation cannot update a stack when a custom-named resource requires replacing
I am running this script via TeamCity so it is not possible for the user to change the Launch Confoiguration's name each time. What can I do to get rid of this error?