This documentation supports the 21.02 version of BMC Helix Innovation Studio.

To view an earlier version, select the version from the Product version menu.

Defining a template to create resources in Microsoft Azure

As an application business analyst, you can define Azure Resource Management (ARM) templates to create resources in Microsoft Azure, such as virtual machines and storage accounts. An ARM template is a JSON file that defines the resource that you want to create and the resource properties. Templates help you to save time by reusing the information to create different resources. You can create a process in your application to define a template by using the Create Template element in the Process designer of BMC Helix Innovation Studio. 

For information about ARM templates, Templates overview Open link .

The following video (3:08) explains how to automate the task of defining an Azure Resource Management template for creating a storage account in Microsoft Azure:



https://youtu.be/cosyzCiI2Fk

Before you begin

Make sure that an administrator has configured the Microsoft Azure connector.

To create a process to define a resource template

  1. Log in to BMC Helix Innovation Studio.
  2. Navigate to the Workspace tab, and select the application in which you want to create a process.
  3. In the application, select Processes, and click New.
    The system opens Process designer.
  4. In the Process designer, drag the Create Template element to the canvas.
  5. In the element Properties pane, enter the values of the following input properties:

    PropertyDescriptionStorage account template example
    Connection IDID of the Microsoft Azure connector.7f46afa3-7feb-43f8-8c67-9662c42eb8b8
    Resource NameName of the resource that you want to create by using the template.

    storage1
    TemplateJSON that defines the Azure resource that you want to create and its properties as per Azure formats.



    {
     "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
     "contentVersion": "1.0.0.0",
     "parameters": {
     "location": {
     "type": "string"
     },
     "storageAccountName": {
     "type": "string"
     },
     "accountType": {
     "type": "string"
     },
     "kind": {
     "type": "string"
     },
     "accessTier": {
     "type": "string"
     }
     },
     "variables": {},
     "resources": [
     {
     "name": "[parameters('storageAccountName')]",
     "type": "Microsoft.Storage/storageAccounts",
     "apiVersion": "2019-06-01",
     "location": "[parameters('location')]",
     "properties": {
     "accessTier": "[parameters('accessTier')]"
     },
     "dependsOn": [],
     "sku": {
     "name": "[parameters('accountType')]"
     },
     "kind": "[parameters('kind')]",
     "tags": {}
     }
     ],
     "outputs": {}
    }
    

    Important: You must add all the JSON name and value pairs in double quotes such as ""contentVersion"":""1.0.0.0""

    Parameters

    Expression for the template parameters.

    To specify the parameters, use any one of the following ways:

    • Specify a key-value pair in a JSON, key is the parameter name as the value is the parameter value.
    • Specify the output of the Create Document template.
    {
        "location": {
            "value": "eastus"
        },
        "storageAccountName": {
            "value": "storage1"
        },
        "accountType": {
            "value": "Standard_RAGRS"
        },
        "kind": {
            "value": "StorageV2"
        },
        "accessTier": {
            "value": "Hot"
        }
    }

    Important: You must add all the JSON name and value pairs in double quotes such as 

    {""location"":{""value"":""eastus""}

    Is Existing Resource Group

    Value specifies whether the resource belongs to an existing resource group.

    You can specify the value as True or False.
    True
    Resource GroupResource group in which you want to create the resource.MyStorageGroup
    (Optional) Region

    Name of the region in which you want to create the resource group.

    This field is applicable when you specify the Is Existing Resource Group as False.

    eastus
    (Optional) Template Link URL

    If you do not want to specify a JSON in the Template property, specify the URL of the template that you created in Azure portal.

    https://mystorageaccount.blob.core.windows.net/container1/template.json

    (Optional) Template Link Content VersionTo use a specific version of an existing template that you created in Azure portal, specify the template version.
    If you do not specify the template version, 1.0.0.0 version of the template is used by default.
    1.0.0.0
    ModeSpecify one of the following template modes:
    • Complete—Select this mode to delete the existing resources in the resource group and then add resources specified in the template to the resource group.
    • Incremental—Select this mode to add resources specified in the template to the resource group and do not change the existing resources in the resource group.
    COMPLETE

    The Create Template element provides Resource Name as an output.

  6. If required, add the other process elements and specify the flow of execution that you want to create for your business logic.
  7. Save the process.

Example: Automating storage account template creation in Azure

Ajay is an application business analyst in Calbro Services. He wants to automate the task of defining an ARM template to create a storage account in Azure. To automate the task, he creates a process. Ajay uses the Create Document element to access attributes within the schema of the AzureTemplateParameters document definition. He add the values for the document nodes and uses these values as input to create the template. Ajay uses the Create Template element to define the template.

Ajay performs the following actions to create the process to define the template:

  1. Create the process as shown in the following image:


  2. Add the Create Document element properties as shown in the following image:
    1. To add a document, select the AzureTemplateParameters document definition as shown in the following image:

    2. To add values for the document nodes, click Add/Remove Document Nodes, and select the key and value check boxes of nodes as shown in the following image:

    For information about the Create Document element, see Creating a document instance.
  3. Add Create Template element properties as shown in the following image:

  4. In the Create Template properties, in the Parameters field, map the Create Template element output as shown in the following image:
  5. Save the process.

Related topics

Automating the creation of virtual machines and storage accounts

Managing processes by using the Manage Processes dashboard

Was this page helpful? Yes No Submitting... Thank you

Comments