|
2 | 2 |
|
3 | 3 | ## Assumptions
|
4 | 4 |
|
5 |
| -- We assume that we use the directories as structuring element for the subaccounts i.e., in an unmanaged fashion. |
| 5 | +- We assume that we use the directories as structuring element for the subaccounts; that is, in an unmanaged fashion. |
6 | 6 | - We assume that we do the directory setup in one run for all involved departments.
|
7 | 7 |
|
8 | 8 | ## Design Decisions
|
9 | 9 |
|
10 |
| -We decouple the directory creation i.e., the setup of the basic structure from the creation of the operational units namely the subaccounts inside of the directories. The changes on directory level are probably a rare scenario compared to changes in the subaccounts additionally depending on their stage. We want to avoid side effects as well as lengthy state refreshes and keep the state of the directories separate. |
| 10 | +We decouple the directory creation (the setup of the basic structure) from the creation of the operational units (the subaccounts within the directories). Typically, changes on directory level happen less frequently than changes in the subaccounts additionally depending on their stage. We want to avoid side effects as well as lengthy state refreshes and keep the state of the directories separate. |
11 | 11 |
|
12 | 12 | ## Directory Setup
|
13 | 13 |
|
14 |
| -The creation of the directories is steered by a map of objects that define the business data relevant for a directory namely: |
| 14 | +To create the directories, we use a map of objects that define the business data relevant for a directory, such as the following: |
15 | 15 |
|
16 |
| -- business_unit (`string`): The business unit that owns the directory e.g., HR, IT, Finance |
17 |
| -- costcenter (`string`): Cost center of the business unit |
18 |
| -- directory_contacts (`list(string)`): List of email addresses representing the directory contacts |
19 |
| -- region (`string`): The geographical region of the directory e.g., EMEA |
| 16 | +- business_unit (`string`): The business unit that owns the directory, such as HR, IT, or Sales |
| 17 | +- costcenter (`string`): The cost center of the business unit |
| 18 | +- directory_contacts (`list(string)`): The list of email addresses representing the directory contacts |
| 19 | +- region (`string`): The geographical region of the directory, for example, EMEA |
20 | 20 |
|
21 |
| -This is input data is reflected by the variables defined in the [variables.tf](./variables.tf) file |
| 21 | +This is input data is reflected by the variables defined in the [variables.tf](./variables.tf) file. |
22 | 22 |
|
23 |
| -The directories are provisioned via the [main.tf](./main.tf) file which delegates to the module [base-directory-setup](../../modules/base-directory-setup/README.md). This module combines the corresponding module containing the naming and labeling conventions for a directory and calls the Terraform resource [btp_directory](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/directory). |
| 23 | +The directories are provisioned with the [main.tf](./main.tf) file, which delegates to the module [base-directory-setup](../../modules/base-directory-setup/README.md). This module combines the corresponding module containing the naming and labeling conventions for a directory, and calls the Terraform resource [btp_directory](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/directory). |
24 | 24 |
|
25 |
| -After provisioning the output summarizes the executed setup as given by the [outputs.tf](./outputs.tf) file. Here is an example how the output could look like: |
| 25 | +After provisioning the output, it summarizes the executed setup as given by the [outputs.tf](./outputs.tf) file. See the following example how the output could look like: |
26 | 26 |
|
27 |
| - |
| 27 | +<!-- screenshots are disencouraged because they're harder to keep up to date  --> |
| 28 | + |
| 29 | +```json |
| 30 | +Outputs: |
| 31 | + |
| 32 | +directories = { |
| 33 | + "directory1" = { |
| 34 | + "business_unit" = "HR" |
| 35 | + "costcenter" = "123456" |
| 36 | + "id" = "cf12345f-1234567890" |
| 37 | + "name" = "Sales-EMEA" |
| 38 | + "region" = "EMEA" |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
28 | 42 |
|
29 | 43 | ## SAP BTP Administrator's Guide - References
|
30 | 44 |
|
|
0 commit comments