Customising deployment bicep templates cloud adoption framework

Azure Newbie 70 Reputation points
2023-05-04T18:52:22.2833333+00:00

Hi I am building my azure infrastructure using bicep templates

https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/scenarios/cloud-scale-analytics/architectures/deployment-templates

When deploying the data landing zone through the main.bicep files I want to remove data bricks as I don’t need it. How do we customise these templates to remove resources we don’t need?

Could you point me in the right direction? Ty

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,015 questions
{count} votes

Accepted answer
  1. BhargavaGunnam-MSFT 28,111 Reputation points Microsoft Employee
    2023-05-05T23:43:25.99+00:00

    Hello Azure Newbie,

    Welcome to the MS Q&A platform.

    You can delete the corresponding resource block from the Bicep file to remove resources from a Bicep template. In your case, to remove Databricks from the data landing zone deployment, you can delete the resource block for Databricks from the main.bicep file.

    To customize the deployment further, you can modify the parameters and variables in the main.bicep file per your requirement.

    Here is an example:
    The resource block code, which starts with the 'resource' keyword and ends with closing curly braces '}'

    User's image

    Save the main.bicep file

    I hope this helps. Please let me know if you have any further questions.

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Azure Newbie 70 Reputation points
    2023-05-11T23:38:09.2+00:00

    hi @BhargavaGunnam-MSFT thank you for taking your time to look at my question.

    Im looking at my main.bicep file and I cant locate that code you have in yellow but I found something similar in the main.json file. Would this be the bit of code I delete?

                     "resources": [
                        {
                          "type": "Microsoft.Databricks/workspaces",
                          "apiVersion": "2021-04-01-preview",
                          "name": "[parameters('databricksName')]",
                          "location": "[parameters('location')]",
                          "tags": "[parameters('tags')]",
                          "sku": {
                            "name": "premium"
                          },
                          "properties": {
                            "managedResourceGroupId": "[format('{0}/resourceGroups/{1}-rg', subscription().id, parameters('databricksName'))]",
                            "parameters": {
                              "customVirtualNetworkId": {
                                "value": "[parameters('vnetId')]"
                              },
                              "customPrivateSubnetName": {
                                "value": "[parameters('privateSubnetName')]"
                              },
                              "customPublicSubnetName": {
                                "value": "[parameters('publicSubnetName')]"
                              },
                              "enableNoPublicIp": {
                                "value": true
                              },
                              "prepareEncryption": {
                                "value": true
                              },
                              "requireInfrastructureEncryption": {
                                "value": false
                              }
                            }
                          }
                        }
                      ],
                      "outputs": {
                        "databricksId": {
                          "type": "string",
                          "value": "[resourceId('Microsoft.Databricks/workspaces', parameters('databricksName'))]"
                        },
                        "databricksWorkspaceUrl": {
                          "type": "string",
                          "value": "[reference(resourceId('Microsoft.Databricks/workspaces', parameters('databricksName'))).workspaceUrl]"
                        },
                        "databricksApiUrl": {
                          "type": "string",
                          "value": "[format('https://{0}.azuredatabricks.net', parameters('location'))]"
                        }
                      }
                    }
                  }
                },
    
    1 person found this answer helpful.
    0 comments No comments

  2. Azure Newbie 70 Reputation points
    2023-05-11T23:45:28.46+00:00
    1 person found this answer helpful.