Open hoegertn opened 5 years ago
Marking this as a feature request. Thanks!
Is there an update for this?
Updating stacks parameters through the cli seems to be tedious as in this case you have to specific a full template, even if you care only about updating parameters.
If you think about using update-stack
, you still have to fetch all the existing parameters as there is no option to only pass the parameters you want to override or new parameters.
In either case, it is adding an extra step for what should be a simple update from a consumer perspective, unless I am missing something?
+1 on this, i have to write a custom bash script to flag maintenance mode on/off
summary=$(aws cloudformation get-template-summary --stack-name ${TARGET_STACK} )
parameters=($(echo $summary | jq -r '.Parameters[].ParameterKey' | grep -v MaintenanceMode))
parameters=$(printf "ParameterKey=%s,UsePreviousValue=true " "${parameters[@]}")
parameters=$(echo "${parameters} ParameterKey=MaintenanceMode,ParameterValue=${bamboo_MAINTENANCE_MODE}")
aws cloudformation update-stack \
--stack-name ${TARGET_STACK} \
--use-previous-template \
--capabilities CAPABILITY_NAMED_IAM \
--parameters $parameters
aws cloudformation wait stack-update-complete --stack-name ${TARGET_STACK}
I would like to see much simple option like
aws cloudformation deploy --use-previous-template --parameter-override MaintenanceMode=On
This is a bit ridiculous that one feature (use-previous-template) support in update-stack but not in deploy, and then parameter-override support in deploy but not in update-stack. so we have to choose either re-upload whole template everytime we run "deploy" or specify all parameters again in update-stack
It would really be cool if I could advice
aws cloudformation deploy
to use the current template instead of specifying a new one. So I could do parameter updates with a single command and only specify the changed parameter.