--- title: Create a resource block for Microsoft Azure Cloud description: 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. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/it-operations-management/cloud-configuration-governance/create-resource-block-azure-terraform.html release: australia product: Cloud Configuration Governance classification: cloud-configuration-governance topic_type: task last_updated: "2026-03-12" reading_time_minutes: 3 breadcrumb: [Resource blocks in Cloud Provisioning and Governance, Cloud Admin Portal, Cloud Provisioning and Governance administration guide, Cloud Provisioning and Governance, ITOM Cloud Accelerate, IT Operations Management] --- # 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/cloud-configuration-governance/create-resource-block.md). |Field|Description| |-----|-----------| |Name|Enter a name \(**Azure Datacenter**\) for the resource block.| |Description|Enter a valid description| |Layer|Select the type of resource block \(**Logical Datacenter**\).| |CI Type|Select the CI type \(**Azure Datacenter**\) that the resource block represents.| |Guest Interface|Select 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**.
| Field | Description |
|---|---|
| Name | Enter a name \(For example, **Create\_AzureTF\_Stack\_Response\_Processor**\) for the resource script. |
| Type | Select a type \(**Response Processor**\) for the script. |
| Script Resource Script for Create | Enter 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 Delete | Enter 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); } ``` |
| Field | Description |
|---|---|
| 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 OpenSource**provider, 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. |
| Condition | Enter an optional condition that must be met before the system uses this step. |