Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a resource block for Microsoft Azure Cloud

Resource blocks are the building blocks of cloud catalog items. Create a resource block for the Microsoft Azure Cloud Platform provider, based on a CI type from the CMDB.

Before you begin

Role required: sn_cmp.cmp_root_admin

Procedure

  1. In the Cloud Admin Portal, navigate to Design > Resource Blocks.

  2. Click New to open the Create Resource Block dialog box and then fill in the form.

    For a detailed description of each field, see Create a custom resource block.

    FieldDescription
    NameEnter a name (Azure Datacenter) for the resource block.
    DescriptionEnter a valid description
    LayerSelect the type of resource block (Logical Datacenter).
    CI TypeSelect the CI type (Azure Datacenter) that the resource block represents.
    Guest InterfaceSelect a default guest interface (Compute Interface) to use when you add a resource block to a template.
  3. Click Submit.

    The resource block information appears.

  4. Click the Resource Script sub tab and then click New.

FieldDescription
NameEnter a name (For example, Create_AzureTF_Stack_Response_Processor) for the resource script.
TypeSelect a type (Response Processor) for the script.
Script Resource Script for CreateEnter the following script:
function processResponse (response, cloudServiceAccountId, ldc,
                          correlationId, step, requestorContext, stackId) {
    var responseObject = global.JSON.parse(response);
    var tfState = global.JSON.parse(responseObject.terraform.state);
    var processor = new sn_cmp_terraform.TerraformResponseProcessor();
    var processedResponses = processor.processResponse(tfState, cloudServiceAccountId,  ldc,
                               correlationId, step, requestorContext, stackId);
    return global.JSON.stringify(processedResponses);
}
Script Resource Script for DeleteEnter the following script:
function processResponse (response, cloudServiceAccountId, ldc,
                          correlationId, step, requestorContext, stackId) {
    var responseObject = global.JSON.parse(response);
    var tfState = global.JSON.parse(responseObject.terraform.state);
    var processor = new sn_cmp_terraform.TerraformResponseProcessor();
    var processedResponses = processor.processResponse(tfState, cloudServiceAccountId,  ldc,
                               correlationId, step, requestorContext, stackId);
    return global.JSON.stringify(processedResponses);
}
  1. Click Submit.

  2. Click the Operations sub tab and then click Steps.

  3. Select CreateStack from the Operations list.

  4. Click the Add a Step plus icon to open the Add Operation Steps dialog box and then fill in the form.

FieldDescription
Operation Type

Select the type of operation.

Invoke Cloud API: Select this option to select a provider, interface, and method from CAPI.

API Provider\[Operation Type = Invoke Cloud API\]

Select the API that provides the interfaces you need. The providers are part of the Cloud API (CAPI).

For example, CAPI supplies the Terraform OpenSourceprovider, which provides the Configuration Orchestration Interface.

This value appears if you select the Invoke Cloud API operation type.

API Interface\[Operation Type = Invoke Cloud API\]Select the interface that has the methods you want to use. For this example, the Configuration Orchestration Interface provides multiple interfaces or methods, which the system uses during provisioning.
API Method\[Operation Type = Invoke Cloud API\]Select the method to perform the operation. In this example, ExecuteCommand is required to provision terraform templates.
CAPI Version\[Operation Type = Invoke Cloud API\]Enter the version of the CAPI API.
ConditionEnter an optional condition that must be met before the system uses this step.
  1. Click Submit.

  2. Click Response Processor and then click the plus icon.

    The Add Response Processor dialog box appears.

  3. Select Create_AzureTF_Stack_Response_Processor from the Script Name list and click Submit.

  4. Move the state of the resource block from Draft to Published.

    The Azure Datacenter resource block moves from the draft to the published state and no further changes can be made to the resource block. Changes to a resource block can be made only if the status is set to Draft.

Parent Topic:Resource blocks in Cloud Provisioning and Governance