You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sap/automation/naming-module.md
+57-42Lines changed: 57 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,37 @@
1
1
---
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.
4
4
author: kimforss
5
5
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
9
8
ms.service: sap-on-azure
10
9
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.
12
11
---
13
12
14
-
# Configure custom naming for the automation framework
13
+
# Configure custom naming for SAP Deployment Automation Framework
15
14
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.
17
16
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.
19
18
20
-
The naming of the resources uses the following format:
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.
25
26
26
27
## Provide name overrides by using a JSON file
27
28
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).
You can specify a custom naming JSON file in your `tfvars` parameter file by using the `name_override_file` parameter.
29
36
30
37
The JSON file has sections for the different resource types.
@@ -35,9 +42,9 @@ The deployment types are:
35
42
- SDU (SAP system infrastructure)
36
43
- WORKLOAD_ZONE (workload zone)
37
44
38
-
### Availability set names
45
+
### Define availability set names
39
46
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.
41
48
42
49
```json
43
50
"availabilityset_names" : {
@@ -48,9 +55,9 @@ The names for the availability sets are defined in the `availabilityset_names` s
48
55
}
49
56
```
50
57
51
-
### Key vault names
58
+
### Define key vault names
52
59
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.
54
61
55
62
```json
56
63
"keyvault_names": {
@@ -69,13 +76,13 @@ The names for the key vaults are defined in the `keyvault_names` structure. The
69
76
}
70
77
```
71
78
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.
73
80
74
-
The `private_access` names are currently not used.
81
+
The `private_access` names aren't used.
75
82
76
-
### Storage account names
83
+
### Define storage account names
77
84
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.
79
86
80
87
```json
81
88
"storageaccount_names": {
@@ -94,13 +101,13 @@ The names for the storage accounts are defined in the `storageaccount_names` str
94
101
```
95
102
96
103
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.
98
105
99
-
### Virtual machine names
106
+
### Define virtual machine names
100
107
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.
102
109
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.
104
111
105
112
```json
106
113
"virtualmachine_names": {
@@ -173,14 +180,14 @@ The following example lists the virtual machine names for a deployment in the `D
173
180
174
181
## Configure the custom naming module
175
182
176
-
There are multiple files within the module for naming resources:
183
+
The module contains multiple files for naming resources:
177
184
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`.
182
189
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:
184
191
185
192
- SAP deployer deployments use resource names with the prefix `deployer_`.
186
193
- 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
191
198
192
199
## Use custom names
193
200
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.
@@ -205,13 +212,12 @@ Some of the resource names can be changed by providing parameters in the `tfvars
205
212
|`app nsg name`|`app_subnet_nsg_name`||
206
213
|`web subnet name`|`web_subnet_name`||
207
214
|`web nsg name`|`web_subnet_nsg_name`||
208
-
|`admin nsg name`|`admin_subnet_nsg_name`||
209
215
210
216
## Change the naming module
211
217
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.
213
219
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`.
215
221
1. Go to your new root-level folder.
216
222
1. Clone the [automation framework repository](https://github.com/Azure/sap-automation). This step creates a new folder `sap-automation`.
217
223
1. Create a folder within the root-level folder called `Contoso_naming`.
@@ -248,7 +254,7 @@ module "sap_namegenerator" {
248
254
}
249
255
```
250
256
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:
@@ -262,7 +268,11 @@ For each file, change the source for the module `sap_namegenerator` to point to
262
268
263
269
## Change resource group naming logic
264
270
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:
266
276
267
277
```terraform
268
278
locals {
@@ -289,11 +299,15 @@ locals {
289
299
290
300
## Change resource suffixes
291
301
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.
293
307
294
308
> [!NOTE]
295
309
> 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"`.
297
311
298
312
```terraform
299
313
variable resource_suffixes {
@@ -363,7 +377,8 @@ variable resource_suffixes {
363
377
}
364
378
```
365
379
366
-
## Next step
380
+
## Related content
367
381
368
-
> [!div class="nextstepaction"]
369
-
> [Learn about naming conventions](naming.md)
382
+
-[Naming conventions for SAP Deployment Automation Framework](naming.md)
0 commit comments