I have this template:
Parameters:
ALBPort:
Type: Number
Description: The loab balancer port (how the app is accessed externally)
Default: 8000 #changing this
...
Resources:
ALBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
DependsOn: MyALB
Properties:
DefaultActions:
- Type: forward
TargetGroupArn: !Ref TargetGroup
LoadBalancerArn: !Ref MyALB
Port: !Ref ALBPort #changing this
Protocol: HTTP
I change the default value in the template but when i redeploy:
No changes to deploy. Stack mystack is up to date
If I change it statically like Port: 8001
CF sees the change
Changing the default parameter value doesn't change the existing parameter value in a stack(if the parameter already has a value). The default is only applied the first time you introduce the parameter in the stack(during stack creation or when you add a new parameter in a subsequent update). After that, you need to explicitly set the parameter value during updates.
At the time you redeploy, the stack already has the parameter ALBPort
set to the previous value of default. So, your new default would only get applied when you create a new stack with the template. You need to set the value of ALBPort
to your new value during the stack update operation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With