
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 05-11-2021 11:57 PM
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
In the page that opens up, follow the numbers in the pic below –
- click on blueprint container resource.provision
- 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
- click apply changes
After this, open the provision variable set, and assign the default value for the now exposed AdditionalAPIParameters field as below –
{"DisableRollback":"true"}
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’.
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.
Hope this is useful.
Thank you.
Ram
- 173 Views