The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Ram Devanathan1
ServiceNow Employee
ServiceNow Employee

While working with a customer recently this problem came up. The customer is using CFT based catalog item. As they are debugging the stack deployment, the customer wished to prevent auto-rollback from happening when a CFT based deployment fails.

A quick look at the AWS docs indicated CFT supports a DisableRollback option in cloud formation CreateStack API. This needs to be provided true or false as values.

However, this needs to be added as a parameter when ServiceNow launches the cloud formation API call as part of catalog item provisioning. For this, we need to use the AdditionalAPIParameters field. This by default is not enabled, has to be done through the manage attributes page once the CFT is imported and activated. see screenshot below

find_real_file.png

In the page that opens up, follow the numbers in the pic below –

  1. click on blueprint container resource.provision
  2. double click on generate variable against the AdditionalAPIParameters var record in the listing, set to true so the variable is exposed in the catalog item
  3. click apply changes

find_real_file.png

After this, open the provision variable set, and assign the default value for the now exposed AdditionalAPIParameters field as below –
{"DisableRollback":"true"}

find_real_file.png

Note - if there's more API parameters to be added, expand the json string accordingly.

e.g. {"DisableRollback":"true","Capabilities.member.1":"CAPABILITY_IAM"}

An additional step is needed.

By default, the field AdditionalAPIParameters is blocked from showing in the UI form by a rule. This rule can be inactivated if the intent is to let the user specify true/false at the time of deployment.
Double-click on the status column in the HideAdditionalAPIParameters rule and set it to ‘Inactive’.

find_real_file.png

With this you can now pass additional API parameter options.

This is a sample catalog item I created using this CF template. this is how it looks in the catalog order form (user portal) after the above changes are done.

find_real_file.png

Hope this is useful.

Thank you.

Ram

 
Version history
Last update:
‎05-11-2021 11:57 PM
Updated by: