Configure and perform life-cycle operations on discovered resources
Configure life-cycle operations on cloud resources that are not provisioned using ServiceNow® Cloud Provisioning and Governance. Provision resources and modify resource block operations to perform day-2 operations on cloud resources that are discovered using Cloud Discovery but not provisioned using Cloud Provisioning and Governance.
Before you begin
- Assign the configuration item (CI) to a user who performs the operation.
- Role required: sn_cmp.cloud_service_user, root_admin, admin, or sn_cmp.cloud_admin
About this task
If a resource is provisioned from the Cloud Provisioning and Governance catalog, you can perform base system life-cycle operations on a stack or on a resource. However, if a resource is discovered as part of Cloud Discovery and is not provisioned from Cloud Provisioning and Governance, the same Start/Stop, Deprovision operations are not available, by default. The following procedure is applicable for a Stop operation on a virtual machine that is not provisioned from Cloud Provisioning and Governance.
Procedure
Navigate to All > Cloud Admin Portal > Design > Resource Blocks.
Search and open the resource/CI you want to perform life-cycle operations on.
Set toggle switch to Draft, to make the resource block editable.
In the selected Resource Block > Operations tab, select the required Interface and Operation from their respective lists.
Note: The Interface and Operations fields are only available for resources that are discovered but not added or generated to catalog.
Click the Override Operation icon.
In the Override Operation dialog, specify a name for the Interface-operation.
The Create New check box is selected, by default.
Click Submit.
You have enabled the selected operation for the interface you created.
In the Input Parameters form, click the Add Input Parameters icon.
Specify
resourceIDas the parameter Name and click Save.By default, a system assigned expression is generated and appears in the Mapping field.
For the
ServerIDparameter, replace the default expression in the Mapping field with${parameter.resourceId}and click Save.Navigate to Operations > Steps subtab.
In the Input form, change the
NodeIdparameter value to${parameter.resourceId}.Navigate back to the Input Parameters form, and click Generate Catalog.
Set toggle switch to Published, to publish the resource block again.
You have configured the resource operation for the specific resource/CI.
Navigate to Cloud User Portal > Resources > Virtual Machine Instance, and select the virtual machine instance for which you created the resource operation.
Select the new interface operation you created from the Select Resource Operations list.
What to do next
Navigate to the Cloud User Portal > Resources > Virtual Machine Instance and select the new interface operation you created from the Select Resource Operations list.