Skip to content

Commit a32433f

Browse files
Merge pull request #314076 from Xelu86/namingmodule
[Update] Configure custom naming for SAP Deployment Automation Framework
2 parents 7478c18 + 7fbbbc7 commit a32433f

1 file changed

Lines changed: 57 additions & 42 deletions

File tree

articles/sap/automation/naming-module.md

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
---
2-
title: Configure custom naming for the automation framework
3-
description: Explanation of how to implement custom naming conventions for SAP Deployment Automation Framework.
2+
title: Configure custom naming for SAP Deployment Automation Framework
3+
description: Learn how to configure custom naming conventions for SAP Deployment Automation Framework on Azure.
44
author: kimforss
55
ms.author: kimforss
6-
ms.reviewer: kimforss
7-
ms.date: 10/19/2022
8-
ms.topic: concept-article
6+
ms.date: 04/01/2026
7+
ms.topic: how-to
98
ms.service: sap-on-azure
109
ms.subservice: sap-automation
11-
# Customer intent: As an SAP automation engineer, I want to configure custom naming conventions for the SAP Deployment Automation Framework, so that I can ensure resource names align with my organization's standards and reduce the likelihood of naming conflicts in Azure.
10+
#Customer intent: As an SAP automation engineer, I want to configure custom naming conventions for SAP Deployment Automation Framework so that I can ensure resource names align with my organization's standards and reduce the likelihood of naming conflicts in Azure.
1211
---
1312

14-
# Configure custom naming for the automation framework
13+
# Configure custom naming for SAP Deployment Automation Framework
1514

16-
[SAP Deployment Automation Framework](deployment-framework.md) uses a standard naming convention for Azure [resource naming](naming.md).
15+
[SAP Deployment Automation Framework](deployment-framework.md) uses a [standard naming convention](naming.md) for the Azure resources it deploys. If the default names don't match your organization's naming standards, or if you need to avoid naming conflicts across Azure subscriptions, you can override them with your own names.
1716

18-
The Terraform module `sap_namegenerator` defines the names of all resources that the automation framework deploys. The module is located at `/deploy/terraform/terraform-units/modules/sap_namegenerator/` in the repository. The framework also supports providing your own names for some of the resources by using the [parameter files](configure-system.md).
17+
This article shows you how to provide custom resource names by using a JSON override file or by modifying the Terraform naming module directly.
1918

20-
The naming of the resources uses the following format:
19+
## Prerequisites
2120

22-
resource prefix + resource_group_prefix + separator + resource name + resource suffix.
23-
24-
If these capabilities aren't enough, you can also use custom naming logic by either providing a custom JSON file that contains the resource names or by modifying the naming module used by the automation.
21+
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
22+
- [Terraform](https://www.terraform.io/downloads) installed on your local machine.
23+
- [Git](https://git-scm.com/downloads) installed on your local machine.
24+
- Access to the [SAP Deployment Automation Framework repository](https://github.com/Azure/sap-automation).
25+
- Familiarity with JSON and Terraform HCL syntax.
2526

2627
## Provide name overrides by using a JSON file
2728

29+
The Terraform module `sap_namegenerator` defines the names of all resources that the framework deploys. The module is located at `/deploy/terraform/terraform-units/modules/sap_namegenerator/` in the repository. The framework also supports providing your own names for some of the resources by using the [parameter files](configure-system.md).
30+
31+
Resource naming uses the following format:
32+
33+
`resource prefix + resource_group_prefix + separator + resource name + resource suffix`.
34+
2835
You can specify a custom naming JSON file in your `tfvars` parameter file by using the `name_override_file` parameter.
2936

3037
The JSON file has sections for the different resource types.
@@ -35,9 +42,9 @@ The deployment types are:
3542
- SDU (SAP system infrastructure)
3643
- WORKLOAD_ZONE (workload zone)
3744

38-
### Availability set names
45+
### Define availability set names
3946

40-
The names for the availability sets are defined in the `availabilityset_names` structure. The following example lists the availability set names for a deployment.
47+
Availability set names are defined in the `availabilityset_names` structure. The following example shows the availability set names for a deployment.
4148

4249
```json
4350
"availabilityset_names" : {
@@ -48,9 +55,9 @@ The names for the availability sets are defined in the `availabilityset_names` s
4855
}
4956
```
5057

51-
### Key vault names
58+
### Define key vault names
5259

53-
The names for the key vaults are defined in the `keyvault_names` structure. The following example lists the key vault names for a deployment in the `DEV` environment in West Europe.
60+
Key vault names are defined in the `keyvault_names` structure. The following example shows the key vault names for a deployment in the `DEV` environment in West Europe.
5461

5562
```json
5663
"keyvault_names": {
@@ -69,13 +76,13 @@ The names for the key vaults are defined in the `keyvault_names` structure. The
6976
}
7077
```
7178

72-
The key vault names need to be unique across Azure. SAP Deployment Automation Framework appends three random characters (ABC in the example) at the end of the key vault name to reduce the likelihood for name conflicts.
79+
Key vault names must be unique across Azure. SAP Deployment Automation Framework appends three random characters (ABC in the example) at the end of the key vault name to reduce the likelihood of name conflicts.
7380

74-
The `private_access` names are currently not used.
81+
The `private_access` names aren't used.
7582

76-
### Storage account names
83+
### Define storage account names
7784

78-
The names for the storage accounts are defined in the `storageaccount_names` structure. The following example lists the storage account names for a deployment in the `DEV` environment in West Europe.
85+
Storage account names are defined in the `storageaccount_names` structure. The following example shows the storage account names for a deployment in the `DEV` environment in West Europe.
7986

8087
```json
8188
"storageaccount_names": {
@@ -94,13 +101,13 @@ The names for the storage accounts are defined in the `storageaccount_names` str
94101
```
95102

96103

97-
The key vault names need to be unique across Azure. SAP Deployment Automation Framework appends three random characters (abc in the example) at the end of the key vault name to reduce the likelihood for name conflicts.
104+
Storage account names must be unique across Azure. SAP Deployment Automation Framework appends three random characters (abc in the example) at the end of the storage account name to reduce the likelihood of name conflicts.
98105

99-
### Virtual machine names
106+
### Define virtual machine names
100107

101-
The names for the virtual machines are defined in the `virtualmachine_names` structure. Both the computer and the virtual machine names can be provided.
108+
Virtual machine names are defined in the `virtualmachine_names` structure. You can provide both the computer name and the virtual machine name.
102109

103-
The following example lists the virtual machine names for a deployment in the `DEV` environment in West Europe. The deployment has a database server, two application servers, a central services server, and a web dispatcher.
110+
The following example shows the virtual machine names for a deployment in the `DEV` environment in West Europe. The deployment has a database server, two application servers, a central services server, and a web dispatcher.
104111

105112
```json
106113
"virtualmachine_names": {
@@ -173,14 +180,14 @@ The following example lists the virtual machine names for a deployment in the `D
173180

174181
## Configure the custom naming module
175182

176-
There are multiple files within the module for naming resources:
183+
The module contains multiple files for naming resources:
177184

178-
- Virtual machine and computer names are defined in (`vm.tf`).
179-
- Resource group naming is defined in (`resourcegroup.tf`).
180-
- Key vaults are defined in (`keyvault.tf`).
181-
- Resource suffixes are defined in (`variables_local.tf`).
185+
- Virtual machine and computer names are defined in `vm.tf`.
186+
- Resource group naming is defined in `resourcegroup.tf`.
187+
- Key vaults are defined in `keyvault.tf`.
188+
- Resource suffixes are defined in `variables_local.tf`.
182189

183-
The different resource names are identified by prefixes in the Terraform code:
190+
The following prefixes in the Terraform code identify the resource names:
184191

185192
- SAP deployer deployments use resource names with the prefix `deployer_`.
186193
- SAP library deployments use resource names with the prefix `library`.
@@ -191,7 +198,7 @@ The calculated names are returned in a data dictionary, which is used by all the
191198

192199
## Use custom names
193200

194-
Some of the resource names can be changed by providing parameters in the `tfvars` parameter file.
201+
You can change some resource names by providing parameters in the `tfvars` parameter file.
195202

196203
| Resource | Parameter | Notes |
197204
| ---------------------- | ----------------------- | ------------------------------------------------------------------ |
@@ -205,13 +212,12 @@ Some of the resource names can be changed by providing parameters in the `tfvars
205212
| `app nsg name` | `app_subnet_nsg_name` | |
206213
| `web subnet name` | `web_subnet_name` | |
207214
| `web nsg name` | `web_subnet_nsg_name` | |
208-
| `admin nsg name` | `admin_subnet_nsg_name` | |
209215

210216
## Change the naming module
211217

212-
To prepare your Terraform environment for custom naming, you first need to create a custom naming module. The easiest way is to copy the existing module and make the required changes in the copied module.
218+
To prepare your Terraform environment for custom naming, create a custom naming module. The easiest way is to copy the existing module and make the required changes in the copied module.
213219

214-
1. Create a root-level folder in your Terraform environment. An example is `Azure_SAP_Automated_Deployment`.
220+
1. Create a root-level folder in your Terraform environment. For example, `Azure_SAP_Automated_Deployment`.
215221
1. Go to your new root-level folder.
216222
1. Clone the [automation framework repository](https://github.com/Azure/sap-automation). This step creates a new folder `sap-automation`.
217223
1. Create a folder within the root-level folder called `Contoso_naming`.
@@ -248,7 +254,7 @@ module "sap_namegenerator" {
248254
}
249255
```
250256

251-
Next, you need to point your other Terraform module files to your custom naming module. These module files include:
257+
Next, point your other Terraform module files to your custom naming module. These module files include:
252258

253259
- `deploy\terraform\run\sap_system\module.tf`
254260
- `deploy\terraform\bootstrap\sap_deployer\module.tf`
@@ -262,7 +268,11 @@ For each file, change the source for the module `sap_namegenerator` to point to
262268

263269
## Change resource group naming logic
264270

265-
To change your resource group's naming logic, go to your custom naming module folder (for example, `Workspaces\Contoso_naming`). Then, edit the file `resourcegroup.tf`. Modify the following code with your own naming logic.
271+
To change your resource group's naming logic:
272+
273+
1. Go to your custom naming module folder (for example, `Workspaces\Contoso_naming`).
274+
1. Open the file `resourcegroup.tf`.
275+
1. Modify the following code with your own naming logic:
266276

267277
```terraform
268278
locals {
@@ -289,11 +299,15 @@ locals {
289299

290300
## Change resource suffixes
291301

292-
To change your resource suffixes, go to your custom naming module folder (for example, `Workspaces\Contoso_naming`). Then, edit the file `variables_local.tf`. Modify the following map with your own resource suffixes.
302+
To change your resource suffixes:
303+
304+
1. Go to your custom naming module folder (for example, `Workspaces\Contoso_naming`).
305+
1. Open the file `variables_local.tf`.
306+
1. Modify the following map with your own resource suffixes.
293307

294308
> [!NOTE]
295309
> Only change the map *values*. Don't change the map *key*, which the Terraform code uses.
296-
> For example, if you want to rename the administrator network interface component, change `"admin-nic" = "-admin-nic"` to `"admin-nic" = "yourNICname"`.
310+
> For example, if you want to rename the administrator network interface component, change `"admin-nic" = "-admin-nic"` to `"admin-nic" = "yourNICname"`.
297311
298312
```terraform
299313
variable resource_suffixes {
@@ -363,7 +377,8 @@ variable resource_suffixes {
363377
}
364378
```
365379

366-
## Next step
380+
## Related content
367381

368-
> [!div class="nextstepaction"]
369-
> [Learn about naming conventions](naming.md)
382+
- [Naming conventions for SAP Deployment Automation Framework](naming.md)
383+
- [Configure the SAP system](configure-system.md)
384+
- [SAP Deployment Automation Framework overview](deployment-framework.md)

0 commit comments

Comments
 (0)