Renaming resource groups in Azure using bicep cloud adoption framework

Azure Newbie 70 Reputation points
2023-05-17T01:40:34.89+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 rename the objects that gets created.

Atm for eg one resource group which gets created is called dlz-dev-shared-integration (<prefix> -dev-shared-integration) and I want to rename to rg-shared-integration

Which files would I need to look in and update?

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,916 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 19,631 Reputation points Microsoft Employee
    2023-05-17T07:16:51.9633333+00:00

    @Azure Newbie Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    We understand that you are referring to these bicep templates related to infra in data landing zone.

    To achieve the resource group name as rg-shared-integration instead of (<prefix> -dev-shared-integration).

    You need to edit the line number 96 with below in your main.bicep file

    var name = toLower('${prefix}') instead of var name = toLower('${prefix}-${environment}')
    

    The value of prefix we are getting from params.dev.json file from prefix parameter block in line number 11-12. 

    Resource group (<prefix> -dev-shared-integration) is getting created from the source code that is mentioned in main.bicep  from line number 270-274.

    • main.bicep --> name: '${name}-shared-integration')

    Note: If you change the variable name expression to above suggested other resources name that are declared in the main.bicep file also get changed since other resources name were depended on this name variable. 

    Feel free to reach back to me if you have any further questions on this.

    0 comments No comments

0 additional answers

Sort by: Most helpful