Issue
- Cloud Management Platform allows creating own Resource Operations: Add a resource operation to the execution plan
- Similar to OOB Resource Blocks which are allowed to create our own operations, we also have the ability to create Resource blocks from ARM templates: Create a catalog item from an ARM template,
- Once the ARM template is validated successfully, we can review the ResourceBlock and the Catalog item created and ready to provision
Issue
- The Catalog Item created from the Catalog Item gets provisioned successfully, at the User Portal we can view the Stack and Resource details as below.
- According to the behavior, the Stack will have its own operations as "Deprovision" "Stop" and "Start"
- Soon after we provision, the Resources (Appserviceplan & Webapp) will not be having Resource Operation because the Resource does not contain the operations
- As per the requirement, we will need to Create Resource Operations under the Newly created ResourceBlock from the ARM
- Once we create the Resource Operations, the user portal does not display the newly created operations.
- The issue to understand and fix is that How to get the Resource Operations Visible
Cause
- ServiceNow CMP store new/unknown resource types in cmdb_ci_cmp_resource table.
- As the Newly created ARM Resources have no specified classes, creating Resource Operations the ResourceBlock created by the ARM will be affected or Visible.
- In order to get the Resource Operations which are associated with the cmdb_ci_cmp_resource table, we will need to create the Resource Operations on the "Cloud Resource" Resource Block.
Resolution
On an affected instance:
- Impersonate a user with privileges to create a Resource Operation
- Navigate to Cloud Admin Portal > Design > Resource Blocks > Cloud Resource (By default no Interface or Operation is available)
- Create a Guest Interface
- Operations > Newly Created Guest interface > Create an Operation (Provided the API logic as per the requirement)
- Navigate to Cloud User Portal > Stacks
- Choose the Stack created from the ARM
- Here we can see the Operation.