From 0bb2d4d0f9984c4067697fa250768f93a7b99f15 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Mon, 31 Mar 2025 15:58:03 +0200 Subject: [PATCH 01/15] first version of namming module --- .gitignore | 4 + sample-setup/README.md | 33 +++++ .../sap-btp-naming-conventions/README.md | 3 + .../sap-btp-naming-conventions/main.tf | 109 +++++++++++++++++ .../sap-btp-naming-conventions/outputs.tf | 44 +++++++ .../sap-btp-naming-conventions/variables.tf | 114 ++++++++++++++++++ .../sap-btp-naming-conventions/versions.tf | 3 + 7 files changed, 310 insertions(+) create mode 100644 sample-setup/README.md create mode 100644 sample-setup/modules/sap-btp-naming-conventions/README.md create mode 100644 sample-setup/modules/sap-btp-naming-conventions/main.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions/outputs.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions/variables.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions/versions.tf diff --git a/.gitignore b/.gitignore index ff2c4e2..4d8e93c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,8 @@ override.tf.json .terraformrc terraform.rc +.DS_Store + *.env + +playground/** diff --git a/sample-setup/README.md b/sample-setup/README.md new file mode 100644 index 0000000..e2c05db --- /dev/null +++ b/sample-setup/README.md @@ -0,0 +1,33 @@ +# Terraform Samples for SAP BTP Administrator's Guide + +## Paradigms + +We follow the paradigms of a simpel and clear Terraform configuration as laid out in the [Simple, Clear, Maintainable](https://rosesecurity.dev/blog/2024/11/24/terraform-proverbs) blog post of the [Development Log](https://rosesecurity.dev/) namely: + +- Clear is better than clever. +- Version everything. +- Modules should be reusable, not rigid. +- State is a liability; manage it wisely. +- Every apply should be predictable. +- Outputs are for sharing. +- Tags are free; use them liberally. +- Understanding count versus for_each is essential. +- Descriptions are for users. +- Use positive variable names to avoid double negatives. +- Null is not the same as nothing. +- Prefer a single object over many related variables. +- Terraform is declarative; trust it to converge. +- Never output secrets. +- Upgrade deliberately, not impulsively. +- Name with underscores, not dashes. +- Using locals makes code descriptive and maintainable. + +These paradigms will be reflected in the code samples provided in this repository and we encourage you to follow them in your own Terraform code. + +## Naming Conventions and Tagging + +Ensuring naming conventions is one import aspect when provisioing and managing your SAP BTP account. We will align our samples in accordance to the [Naming Conventions for SAP BTP Accounts](https://help.sap.com/docs/btp/btp-admin-guide/naming-conventions-for-sap-btp-accounts). + +To ensure consistent naming of your resources, we encapsulate the guidlines in a dedicated module. + +Besides the naming we will also include the labels that can be attached to some resources on SAP BTP. diff --git a/sample-setup/modules/sap-btp-naming-conventions/README.md b/sample-setup/modules/sap-btp-naming-conventions/README.md new file mode 100644 index 0000000..72d75bc --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions/README.md @@ -0,0 +1,3 @@ +# SAP BTP - Naming module + +This module encapsulates the naming conventions for SAP BTP accounts and the labels that can be attached to some resources on SAP BTP. diff --git a/sample-setup/modules/sap-btp-naming-conventions/main.tf b/sample-setup/modules/sap-btp-naming-conventions/main.tf new file mode 100644 index 0000000..15f942b --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions/main.tf @@ -0,0 +1,109 @@ +resource "random_uuid" "self" { +} + +locals { + # The length limit for the subdomain is 63 characters. + subdomain_length_limit = 63 + costcenter_label_name = "Costcenter" + directory_contact_label_name = "Directory responsibles" + subaccount_contact_label_name = "Subaccount responsibles" + stage_label_name = "Stage" + managedby_label_name = "Managed by" + + directory_name = var.region == null ? var.business_unit : format( + "%s%s%s", + upper(var.business_unit), + var.delimiter, + var.region + ) + + directory_description = var.region == null ? format( + "Directory for business Unit %s", + var.business_unit + ) : format( + "Directory for business Unit %s (%s)", + var.business_unit, + var.region + ) + + costcenter_label_name_formatted = var.label_name_case == "lower" ? lower(local.costcenter_label_name) : var.label_name_case == "title" ? title(local.costcenter_label_name) : upper(local.costcenter_label_name) + directory_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.directory_contact_label_name) : var.label_name_case == "title" ? title(local.directory_contact_label_name) : upper(local.directory_contact_label_name) + subaccount_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.subaccount_contact_label_name) : var.label_name_case == "title" ? title(local.subaccount_contact_label_name) : upper(local.subaccount_contact_label_name) + stage_label_name_formatted = var.label_name_case == "lower" ? lower(local.stage_label_name) : var.label_name_case == "title" ? title(local.stage_label_name) : upper(local.stage_label_name) + managedby_label_name_formatted = var.label_name_case == "lower" ? lower(local.managedby_label_name) : var.label_name_case == "title" ? title(local.managedby_label_name) : upper(local.managedby_label_name) + + costcenter_label_value_formatted = var.label_value_case == "lower" ? lower(var.costcenter) : var.label_value_case == "title" ? title(var.costcenter) : var.label_value_case == "upper" ? upper(var.costcenter) : var.costcenter + stage_label_value_formatted = var.label_value_case == "lower" ? lower(var.stage) : var.label_value_case == "title" ? title(var.stage) : var.label_value_case == "upper" ? upper(var.stage) : var.stage + management_label_value_formatted = var.label_value_case == "lower" ? lower(var.management_tool) : var.label_value_case == "title" ? title(var.management_tool) : var.label_value_case == "upper" ? upper(var.management_tool) : var.management_tool + + basic_labels = { + "${local.costcenter_label_name_formatted}" = [local.costcenter_label_value_formatted] + "${local.stage_label_name_formatted}" = [local.stage_label_value_formatted] + } + + basic_labels_final = var.add_managed_by_label ? merge( + local.basic_labels, + { + "${local.managedby_label_name_formatted}" = [local.management_label_value_formatted] + } + ) : local.basic_labels + + directory_labels = merge( + local.basic_labels_final, + { + "${local.directory_contact_label_name_formatted}" = var.directory_contacts + } + ) + + subaccount_name = format( + "%s%s%s", + upper(var.business_unit), + var.delimiter, + var.stage) + + + subaccount_subdomain_base = var.company_name == null ? format( + "%s%s%s", + lower(var.business_unit), + var.delimiter, + lower(var.stage) + ) : format( + "%s%s%s%s%s", + lower(var.company_name), + var.delimiter, + lower(var.business_unit), + var.delimiter, + lower(var.stage) + ) + + subaccount_sudomain_with_UUID = format( + "%s%s%s", + local.subaccount_subdomain_base, + var.delimiter, + random_uuid.self.id + ) + + subaccount_subdomain = length(local.subaccount_sudomain_with_UUID) > local.subdomain_length_limit ? substr( + local.subaccount_sudomain_with_UUID, + 0, + local.subdomain_length_limit + ) : local.subaccount_sudomain_with_UUID + + + subaccount_description = format( + "Subaccount for Business Unit %s (%s)", + upper(var.business_unit), + title(lower(var.stage)) + ) + + subaccount_labels = merge( + local.basic_labels_final, + { + "${local.subaccount_contact_label_name_formatted}" = var.subaccount_contacts + } + ) + + subaccount_usage = var.stage == "Prod" ? "USED_FOR_PRODUCTIO" : "NOT_USED_FOR_PRODUCTIO" + + cloudfoundry_org_name = local.subaccount_subdomain +} diff --git a/sample-setup/modules/sap-btp-naming-conventions/outputs.tf b/sample-setup/modules/sap-btp-naming-conventions/outputs.tf new file mode 100644 index 0000000..6d3106d --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions/outputs.tf @@ -0,0 +1,44 @@ +output "directory_name" { + value = local.directory_name + description = "Name of the directory" +} + +output "directory_description" { + value = local.directory_description + description = "Description of the directory" +} + +output "directory_labels" { + value = local.directory_labels + description = "Labels for the directory" +} + +output "subaccount_name" { + value = local.subaccount_name + description = "Name of the subaccount" +} + +output "subaccount_subdomain" { + value = local.subaccount_subdomain + description = "Subdomain of the subaccount" +} + +output "subaccount_description" { + value = local.subaccount_description + description = "Description of the subaccount" +} + +output "subaccount_labels" { + value = local.subaccount_labels + description = "Labels for the subaccount" +} + +output "subaccount_usage" { + value = local.subaccount_usage + description = "Usage of the subaccount" +} + +output "cloudfoundry_org_name" { + value = local.cloudfoundry_org_name + description = "Name of the Cloud Foundry org" +} diff --git a/sample-setup/modules/sap-btp-naming-conventions/variables.tf b/sample-setup/modules/sap-btp-naming-conventions/variables.tf new file mode 100644 index 0000000..c98e6d9 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions/variables.tf @@ -0,0 +1,114 @@ +variable "business_unit" { + type = string + description = "Business unit of the project e.g., HR, IT or Sales" +} + +variable "region" { + type = string + default = null + description = <<-EOT + The geographical region for a directory. The parameter is optional + If you set it the possible values are: `EMEA`, `APAC`, `AMER`. + Default value: `null`. + EOT + + validation { + condition = var.region == null ? true : contains(["EMEA", "APAC", "AMER"], var.region) + error_message = "Allowed values are: `EMEA`, `APAC`, `AMER`." + } +} + +variable "stage" { + type = string + description = <<-EOT + Stage of the environment to be setup up. + Possible values: `Dev`, `Test`, `Prod`. + EOT + + validation { + condition = contains(["Dev", "Test", "Prod"], var.stage) + error_message = "Stage must be one of the following: `DEV`, `TEST`, `PROD`, `SBX`" + } +} + +variable "company_name" { + type = string + description = <<-EOT + Company name to be used for subaccount subdomains. The parameter is optional + Default value: `null`. + EOT + + default = null +} + +variable "costcenter" { + type = string + description = "Cost center to be used for subaccounts" +} + +variable "directory_contacts" { + type = list(string) + description = "Contact persons to be used for directories, added as label" +} + +variable "subaccount_contacts" { + type = list(string) + description = "Contact persons to be used for subaccounts, added as label" +} + +variable "add_managed_by_label" { + type = bool + description = "Add label that resource is managed by Terraform" + default = true +} + +variable "management_tool" { + type = string + description = <<-EOT + Defines which tool is used for management of infrastructure. + Possible values: `Terraform`, `OpenTofu`. + Default value: `Terraform`. + EOT + + validation { + condition = contains(["Terraform", "OpenTofu"], var.management_tool) + error_message = "Allowed values are: `Terraform`, `OpenTofu`." + } + default = "Terraform" +} + +variable "delimiter" { + type = string + description = "Delimiter to be used for namings" + default = "-" +} + +variable "label_name_case" { + type = string + default = "title" + description = <<-EOT + Controls the letter case of the `label` names for labels generated by this module. + Possible values: `lower`, `title`, `upper`. + Default value: `title`. + EOT + + validation { + condition = contains(["lower", "title", "upper"], var.label_name_case) + error_message = "Allowed values are: `lower`, `title`, `upper`." + } +} + +variable "label_value_case" { + type = string + default = "lower" + description = <<-EOT + Controls the letter case of the `label` values for labels generated by this module. + Possible values: `lower`, `title`, `upper` and `none` (no transformation). + Default value: `lower`. + EOT + + validation { + condition = contains(["lower", "title", "upper", "none"], var.label_value_case) + error_message = "Allowed values are: `lower`, `title`, `upper`, `none`." + } +} diff --git a/sample-setup/modules/sap-btp-naming-conventions/versions.tf b/sample-setup/modules/sap-btp-naming-conventions/versions.tf new file mode 100644 index 0000000..2dc2c98 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 1.11" +} From 3e0b586056bfb46aefcf310446d0cd6c3a66ff3c Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Mon, 31 Mar 2025 16:17:26 +0200 Subject: [PATCH 02/15] update docs --- .../sap-btp-naming-conventions/README.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/sample-setup/modules/sap-btp-naming-conventions/README.md b/sample-setup/modules/sap-btp-naming-conventions/README.md index 72d75bc..acfcdcf 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/README.md +++ b/sample-setup/modules/sap-btp-naming-conventions/README.md @@ -1,3 +1,56 @@ # SAP BTP - Naming module This module encapsulates the naming conventions for SAP BTP accounts and the labels that can be attached to some resources on SAP BTP. + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | + +## Providers + +| Name | Version | +|------|---------| +| [random](#provider\_random) | n/a | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [random_uuid.self](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [add\_managed\_by\_label](#input\_add\_managed\_by\_label) | Add label that resource is managed by Terraform | `bool` | `true` | no | +| [business\_unit](#input\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | `string` | n/a | yes | +| [company\_name](#input\_company\_name) | Company name to be used for subaccount subdomains. The parameter is optional
Default value: `null`. | `string` | `null` | no | +| [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | +| [delimiter](#input\_delimiter) | Delimiter to be used for namings | `string` | `"-"` | no | +| [directory\_contacts](#input\_directory\_contacts) | Contact persons to be used for directories, added as label | `list(string)` | n/a | yes | +| [label\_name\_case](#input\_label\_name\_case) | Controls the letter case of the `label` names for labels generated by this module.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `"title"` | no | +| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of the `label` values for labels generated by this module.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Default value: `lower`. | `string` | `"lower"` | no | +| [management\_tool](#input\_management\_tool) | Defines which tool is used for management of infrastructure.
Possible values: `Terraform`, `OpenTofu`.
Default value: `Terraform`. | `string` | `"Terraform"` | no | +| [region](#input\_region) | The geographical region for a directory. The parameter is optional
If you set it the possible values are: `EMEA`, `APAC`, `AMER`.
Default value: `null`. | `string` | `null` | no | +| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`. | `string` | n/a | yes | +| [subaccount\_contacts](#input\_subaccount\_contacts) | Contact persons to be used for subaccounts, added as label | `list(string)` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [cloudfoundry\_org\_name](#output\_cloudfoundry\_org\_name) | Name of the Cloud Foundry org | +| [directory\_description](#output\_directory\_description) | Description of the directory | +| [directory\_labels](#output\_directory\_labels) | Labels for the directory | +| [directory\_name](#output\_directory\_name) | Name of the directory | +| [subaccount\_description](#output\_subaccount\_description) | Description of the subaccount | +| [subaccount\_labels](#output\_subaccount\_labels) | Labels for the subaccount | +| [subaccount\_name](#output\_subaccount\_name) | Name of the subaccount | +| [subaccount\_subdomain](#output\_subaccount\_subdomain) | Subdomain of the subaccount | +| [subaccount\_usage](#output\_subaccount\_usage) | Usage of the subaccount | From 964ca0d2cc41f7f7e6e187aa7af4b1d92a5cba8e Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 1 Apr 2025 11:28:42 +0200 Subject: [PATCH 03/15] update variables for naming conventions --- sample-setup/basic-setup/directory-setup/README.md | 3 +++ sample-setup/basic-setup/directory-setup/main.tf | 0 sample-setup/basic-setup/directory-setup/outputs.tf | 0 sample-setup/basic-setup/directory-setup/provider.tf | 0 sample-setup/basic-setup/directory-setup/variables.tf | 0 sample-setup/basic-setup/subaccount-setup/README.md | 0 sample-setup/basic-setup/subaccount-setup/main.tf | 0 sample-setup/basic-setup/subaccount-setup/outputs.tf | 0 sample-setup/basic-setup/subaccount-setup/provider.tf | 0 sample-setup/basic-setup/subaccount-setup/variables.tf | 0 .../modules/sap-btp-naming-conventions/variables.tf | 6 +++--- 11 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 sample-setup/basic-setup/directory-setup/README.md create mode 100644 sample-setup/basic-setup/directory-setup/main.tf create mode 100644 sample-setup/basic-setup/directory-setup/outputs.tf create mode 100644 sample-setup/basic-setup/directory-setup/provider.tf create mode 100644 sample-setup/basic-setup/directory-setup/variables.tf create mode 100644 sample-setup/basic-setup/subaccount-setup/README.md create mode 100644 sample-setup/basic-setup/subaccount-setup/main.tf create mode 100644 sample-setup/basic-setup/subaccount-setup/outputs.tf create mode 100644 sample-setup/basic-setup/subaccount-setup/provider.tf create mode 100644 sample-setup/basic-setup/subaccount-setup/variables.tf diff --git a/sample-setup/basic-setup/directory-setup/README.md b/sample-setup/basic-setup/directory-setup/README.md new file mode 100644 index 0000000..0cf52a0 --- /dev/null +++ b/sample-setup/basic-setup/directory-setup/README.md @@ -0,0 +1,3 @@ +# Sample Setup for a Basic Directory Structure + + diff --git a/sample-setup/basic-setup/directory-setup/main.tf b/sample-setup/basic-setup/directory-setup/main.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/directory-setup/outputs.tf b/sample-setup/basic-setup/directory-setup/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/directory-setup/provider.tf b/sample-setup/basic-setup/directory-setup/provider.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/directory-setup/variables.tf b/sample-setup/basic-setup/directory-setup/variables.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/subaccount-setup/main.tf b/sample-setup/basic-setup/subaccount-setup/main.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/subaccount-setup/outputs.tf b/sample-setup/basic-setup/subaccount-setup/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/subaccount-setup/provider.tf b/sample-setup/basic-setup/subaccount-setup/provider.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/basic-setup/subaccount-setup/variables.tf b/sample-setup/basic-setup/subaccount-setup/variables.tf new file mode 100644 index 0000000..e69de29 diff --git a/sample-setup/modules/sap-btp-naming-conventions/variables.tf b/sample-setup/modules/sap-btp-naming-conventions/variables.tf index c98e6d9..cd055fa 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/variables.tf +++ b/sample-setup/modules/sap-btp-naming-conventions/variables.tf @@ -22,12 +22,12 @@ variable "stage" { type = string description = <<-EOT Stage of the environment to be setup up. - Possible values: `Dev`, `Test`, `Prod`. + Possible values: `Dev`, `Test`, `Prod`, `Shared`. EOT validation { - condition = contains(["Dev", "Test", "Prod"], var.stage) - error_message = "Stage must be one of the following: `DEV`, `TEST`, `PROD`, `SBX`" + condition = contains(["Dev", "Test", "Prod", "Shared"], var.stage) + error_message = "Stage must be one of the following: `Dev`, `Test`, `Prod`, `Shared`." } } From f666996d0f5b5eb69f49b916e89c3e97a0d0a78d Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 1 Apr 2025 15:04:30 +0200 Subject: [PATCH 04/15] basic setup --- .../directory-setup/.terraform.lock.hcl | 25 +++++ .../basic-setup/directory-setup/README.md | 19 ++++ .../basic-setup/directory-setup/main.tf | 8 ++ .../basic-setup/directory-setup/outputs.tf | 11 +++ .../basic-setup/directory-setup/provider.tf | 13 +++ .../basic-setup/directory-setup/test.tfplan | Bin 0 -> 7922 bytes .../basic-setup/directory-setup/variables.tf | 22 +++++ .../base-directory-setup/.terraform.lock.hcl | 25 +++++ .../modules/base-directory-setup/README.md | 43 +++++++++ .../modules/base-directory-setup/main.tf | 14 +++ .../modules/base-directory-setup/outputs.tf | 24 +++++ .../modules/base-directory-setup/variables.tf | 24 +++++ .../modules/base-directory-setup/versions.tf | 9 ++ .../modules/base-subaccount-setup/README.md | 46 ++++++++++ .../modules/base-subaccount-setup/main.tf | 18 ++++ .../modules/base-subaccount-setup/outputs.tf | 24 +++++ .../base-subaccount-setup/variables.tf | 42 +++++++++ .../modules/base-subaccount-setup/versions.tf | 9 ++ .../README.md | 31 +++++++ .../main.tf | 46 ++++++++++ .../outputs.tf | 29 ++++++ .../variables.tf | 86 ++++++++++++++++++ .../versions.tf | 0 .../README.md | 9 +- .../main.tf | 27 +----- .../outputs.tf | 15 --- .../variables.tf | 21 ----- .../versions.tf | 3 + 28 files changed, 574 insertions(+), 69 deletions(-) create mode 100644 sample-setup/basic-setup/directory-setup/.terraform.lock.hcl create mode 100644 sample-setup/basic-setup/directory-setup/test.tfplan create mode 100644 sample-setup/modules/base-directory-setup/.terraform.lock.hcl create mode 100644 sample-setup/modules/base-directory-setup/README.md create mode 100644 sample-setup/modules/base-directory-setup/main.tf create mode 100644 sample-setup/modules/base-directory-setup/outputs.tf create mode 100644 sample-setup/modules/base-directory-setup/variables.tf create mode 100644 sample-setup/modules/base-directory-setup/versions.tf create mode 100644 sample-setup/modules/base-subaccount-setup/README.md create mode 100644 sample-setup/modules/base-subaccount-setup/main.tf create mode 100644 sample-setup/modules/base-subaccount-setup/outputs.tf create mode 100644 sample-setup/modules/base-subaccount-setup/variables.tf create mode 100644 sample-setup/modules/base-subaccount-setup/versions.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions-directory/README.md create mode 100644 sample-setup/modules/sap-btp-naming-conventions-directory/main.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions-directory/outputs.tf create mode 100644 sample-setup/modules/sap-btp-naming-conventions-directory/variables.tf rename sample-setup/modules/{sap-btp-naming-conventions => sap-btp-naming-conventions-directory}/versions.tf (100%) rename sample-setup/modules/{sap-btp-naming-conventions => sap-btp-naming-conventions-subaccount}/README.md (77%) rename sample-setup/modules/{sap-btp-naming-conventions => sap-btp-naming-conventions-subaccount}/main.tf (79%) rename sample-setup/modules/{sap-btp-naming-conventions => sap-btp-naming-conventions-subaccount}/outputs.tf (67%) rename sample-setup/modules/{sap-btp-naming-conventions => sap-btp-naming-conventions-subaccount}/variables.tf (81%) create mode 100644 sample-setup/modules/sap-btp-naming-conventions-subaccount/versions.tf diff --git a/sample-setup/basic-setup/directory-setup/.terraform.lock.hcl b/sample-setup/basic-setup/directory-setup/.terraform.lock.hcl new file mode 100644 index 0000000..a41edc8 --- /dev/null +++ b/sample-setup/basic-setup/directory-setup/.terraform.lock.hcl @@ -0,0 +1,25 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/sap/btp" { + version = "1.11.0" + constraints = ">= 1.11.0, ~> 1.11.0" + hashes = [ + "h1:q9XDheshVlSVbcWKmAlOjF+EGTxvpgS+CyMOyPzh3uw=", + "zh:16647cac2e5062c4ac9db89d622b1de3375e57372841f65f3e6997a26a2f283d", + "zh:548d023762dbd3c2830a151f0beadf58401a70368299625f4c90100997348aed", + "zh:55aba6fba636e2d6524f4b180fb1ff0df6328dd3812682726a0b9972c921dbdf", + "zh:624fb982f4cfb2c26b1448e6270b6ad891592e4e52a00718781579fb5a079adb", + "zh:6319aa5b8c60c3916eff4142ecf6f297a8baf1bc903c98a29b6c248a3984f488", + "zh:7979a475dd06d12255269fe6ec004d1c460bb64869a9d814bec58bec88b65147", + "zh:967b5d6b71053e19dbb017319b8b8bd84d8c7f7cfba6fbb4b23243ce860c370e", + "zh:97b02bc0cd9d74bbf4b89b4f8cd9508f0eec7b772b88704f70b696c425a5165e", + "zh:a398f2697184f49cb5e32a6c7b3f586a8a723a2d533a4cc13e11d8739fabf6b2", + "zh:b9e0a0a986cf8a790c10d469f61c81e9cfc41f4a188f060fb1c5a7612101a4da", + "zh:d03b1276c08f7b9d5da9d89505d1a71c0f806142ef336f26abd85a144a68b895", + "zh:dd6e32cf30f53707fec2acb1e5c69c044a76349706785bfcdee8fbaa6bb053c6", + "zh:e7afd57c00ba45a6be5005620e44db08eec2e6adb97b0af1ffb57963767f8229", + "zh:f29dc297897b96bf39f4b6737e6b9e2b8339c3ddc362fc5466ce901d84ef8cb9", + "zh:f6057496ac45093be445ed8423dc9dfcdbb21e5cc6d6348dbe3a8d5641882f3f", + ] +} diff --git a/sample-setup/basic-setup/directory-setup/README.md b/sample-setup/basic-setup/directory-setup/README.md index 0cf52a0..15fcaf1 100644 --- a/sample-setup/basic-setup/directory-setup/README.md +++ b/sample-setup/basic-setup/directory-setup/README.md @@ -1,3 +1,22 @@ # Sample Setup for a Basic Directory Structure +## Assumptions +- We assume that we use the directories as structuring element for the subaccounts i.e., un an unmanaged fashion. +- We assume that we do the directory setup in one run for all involved departments. + +## Design Decsion + +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 directory. The changes on directory level are probably a rare sceanrio compared to the subaccounts (depending on their stage) and we therefore want to avoid side effects as well as lengthy state refreshes. + +## Directory Setup + +We will create directories for the following departments: + +- HR +- Sales +- Finance + +In addition we create a directory for shared services. + +All directories are located in EMEA. diff --git a/sample-setup/basic-setup/directory-setup/main.tf b/sample-setup/basic-setup/directory-setup/main.tf index e69de29..d442271 100644 --- a/sample-setup/basic-setup/directory-setup/main.tf +++ b/sample-setup/basic-setup/directory-setup/main.tf @@ -0,0 +1,8 @@ +module "directory" { + source = "../../modules/base-directory-setup" + for_each = var.directory_inputs + business_unit = each.value.business_unit + costcenter = each.value.costcenter + directory_contacts = each.value.directory_contacts + region = each.value.region +} diff --git a/sample-setup/basic-setup/directory-setup/outputs.tf b/sample-setup/basic-setup/directory-setup/outputs.tf index e69de29..5dd17ad 100644 --- a/sample-setup/basic-setup/directory-setup/outputs.tf +++ b/sample-setup/basic-setup/directory-setup/outputs.tf @@ -0,0 +1,11 @@ +output "directories" { + value = { + for k, v in module.directory : k => { + id = v.directory_id + name = v.directory_name + business_unit = v.business_unit + costcenter = v.costcenter + region = v.region + } + } +} diff --git a/sample-setup/basic-setup/directory-setup/provider.tf b/sample-setup/basic-setup/directory-setup/provider.tf index e69de29..52f55ff 100644 --- a/sample-setup/basic-setup/directory-setup/provider.tf +++ b/sample-setup/basic-setup/directory-setup/provider.tf @@ -0,0 +1,13 @@ +terraform { + required_providers { + btp = { + source = "SAP/btp" + version = "~>1.11.0" + } + } +} + +# Configure the BTP Provider +provider "btp" { + globalaccount = var.globalaccount +} diff --git a/sample-setup/basic-setup/directory-setup/test.tfplan b/sample-setup/basic-setup/directory-setup/test.tfplan new file mode 100644 index 0000000000000000000000000000000000000000..5ab81df0582f897e39e0a65063d6a4b1f8429ee4 GIT binary patch literal 7922 zcmd5>bySqyw;sAfLTUg}Nl9sG1f-=qq-z*phE9=^E(JtTLTN-g2BbldR8qRTOOUw3 z{VhNExZ-uK`_J98-ap=1>+G}R?C0$Lyh?IN$V32i_>a%YR|jxOPyrYKM{|3S5m;Rf z1%QA(v0_p3Ld=HZ5mBp)T0gNWra5DCf=W}Ixc>YnkUwn-ajUr0pVVc$h z*Po}g2R?T6d(qx^5FY6>p=;=If!d!b$#@AN82YZwm=8~OVb-^QKDKC*j8g`72&BFX zleP*9V@kJ_re(+_BSV5_vm1pxuLl`oK{N0*?ptRz)ZLNF7|qR9yB~OqyIuQiq_kbf ztfs%U!rfKe-6geeS#DkTFuP&*;Gnymn|j(z?0wqvS5)<1!k%jfBN9S=YVTF@)^eSN zzVUn8FSvdS>J#%{r6{77pyRi}`ozo?13W3x69K1Ks4Ki78%;DCkr5Uw2 z(arG(KTAqSOfPa3ibg!rKm^m3>1g4)P9bU4>9(}!gA#1bZ%(B_ot55 z!hPHdR23Pod2D+TBhFb>jaY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zAW+cb7xlcKU9tzidNni4cek7BL7?fVu8hbLo0Ew4IOV{%n3X-ffp3uXl{M|b5wcL> zqz&+Hb(Mjk2l<=5SU2*6sN8TdL6UKICk5XDG8VG-Rl) z-zehQq`rQG79v7k3n;t=*oR&**c5G>hR&EGj#yriBDKKKgHFSoh*X~D)W^)j4Y6la z&*n147b6|kmt~Rk*Re=8RC=hup-?#GUxy$BQ)ji}E|xGxim=o}AVXIQ4aTn!#R;uW z!FNw&H$C987tO8Nkw`Jls#giBTZKN26Mq@Ja!ZCnN1AIj##&u1sL*7Kj@ZJyfHH%g z4xRC}Id}Y5JuNY8$_F-t>%*_u7zhZ~xNc)gp^zdeL8f;TR>@Z9;3=D=T75Bl*e#V$!L`^)Z%32WAs3SO)NLy&1spe~ zl}GRKnIXwck^T;%Nyb;GZfc4P=>w(+Icu!sr{YduSivSdN{&Twe#+VyiQ-`cC9pvr z8=MTf>^Mt%u~!{wk^#N3FWt4T@Y$`xG< zh?O^PDl;H6lTgnwh`|DrbPlj1^gjz47$+XqYM~|Oqi`*YNmouy!d=!_uqR@xxo5N@ zjuIU7zBMT+BgEW{s};*S#vFTFMgFH!3BN2Ey4gOJhO1&wFnQV7qhj;#x9X*&+W-(T zT4_G?!YB+Ko;I*_I9;MVJ6NGw()FPJFEi;PWZ*LXL6&Vu!y9 z&gGW&yq&%fUV^{b<1Yerx#>CYjW4A0Z??GFDPN7!<=*4GbGi^*;>#ZVu8+E^>oRiw e8(-$(y8hI=D9NF~OC12X0smQ^BM8~~+kXM~JdUgY literal 0 HcmV?d00001 diff --git a/sample-setup/basic-setup/directory-setup/variables.tf b/sample-setup/basic-setup/directory-setup/variables.tf index e69de29..da7bafb 100644 --- a/sample-setup/basic-setup/directory-setup/variables.tf +++ b/sample-setup/basic-setup/directory-setup/variables.tf @@ -0,0 +1,22 @@ +variable "globalaccount" { + type = string + description = "The subdomain of the global account on SAP BTP" +} + +variable "directory_inputs" { + type = map(object({ + business_unit = string + costcenter = string + directory_contacts = list(string) + region = string + })) + description = <<-EOT + The inputs for the directory module. + - `business_unit`: Business unit of the project e.g., HR, IT or Sales + - `costcenter`: Cost center to be used for subaccounts + - `directory_contacts`: Contact persons to be used for directories, added as label + - `region`: The geographical region for a directory. The parameter is optional + If you set it the possible values are: `EMEA`, `APAC`, `AMER`. + Default value: `null`. + EOT +} diff --git a/sample-setup/modules/base-directory-setup/.terraform.lock.hcl b/sample-setup/modules/base-directory-setup/.terraform.lock.hcl new file mode 100644 index 0000000..1da39de --- /dev/null +++ b/sample-setup/modules/base-directory-setup/.terraform.lock.hcl @@ -0,0 +1,25 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/sap/btp" { + version = "1.11.0" + constraints = ">= 1.11.0" + hashes = [ + "h1:q9XDheshVlSVbcWKmAlOjF+EGTxvpgS+CyMOyPzh3uw=", + "zh:16647cac2e5062c4ac9db89d622b1de3375e57372841f65f3e6997a26a2f283d", + "zh:548d023762dbd3c2830a151f0beadf58401a70368299625f4c90100997348aed", + "zh:55aba6fba636e2d6524f4b180fb1ff0df6328dd3812682726a0b9972c921dbdf", + "zh:624fb982f4cfb2c26b1448e6270b6ad891592e4e52a00718781579fb5a079adb", + "zh:6319aa5b8c60c3916eff4142ecf6f297a8baf1bc903c98a29b6c248a3984f488", + "zh:7979a475dd06d12255269fe6ec004d1c460bb64869a9d814bec58bec88b65147", + "zh:967b5d6b71053e19dbb017319b8b8bd84d8c7f7cfba6fbb4b23243ce860c370e", + "zh:97b02bc0cd9d74bbf4b89b4f8cd9508f0eec7b772b88704f70b696c425a5165e", + "zh:a398f2697184f49cb5e32a6c7b3f586a8a723a2d533a4cc13e11d8739fabf6b2", + "zh:b9e0a0a986cf8a790c10d469f61c81e9cfc41f4a188f060fb1c5a7612101a4da", + "zh:d03b1276c08f7b9d5da9d89505d1a71c0f806142ef336f26abd85a144a68b895", + "zh:dd6e32cf30f53707fec2acb1e5c69c044a76349706785bfcdee8fbaa6bb053c6", + "zh:e7afd57c00ba45a6be5005620e44db08eec2e6adb97b0af1ffb57963767f8229", + "zh:f29dc297897b96bf39f4b6737e6b9e2b8339c3ddc362fc5466ce901d84ef8cb9", + "zh:f6057496ac45093be445ed8423dc9dfcdbb21e5cc6d6348dbe3a8d5641882f3f", + ] +} diff --git a/sample-setup/modules/base-directory-setup/README.md b/sample-setup/modules/base-directory-setup/README.md new file mode 100644 index 0000000..ef10a84 --- /dev/null +++ b/sample-setup/modules/base-directory-setup/README.md @@ -0,0 +1,43 @@ +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | +| [btp](#requirement\_btp) | >= 1.11.0 | + +## Providers + +| Name | Version | +|------|---------| +| [btp](#provider\_btp) | 1.11.0 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [dir\_namings](#module\_dir\_namings) | ../sap-btp-naming-conventions-directory | n/a | + +## Resources + +| Name | Type | +|------|------| +| [btp_directory.self](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/directory) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [business\_unit](#input\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | `string` | n/a | yes | +| [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | +| [directory\_contacts](#input\_directory\_contacts) | Contact persons to be used for directory, added as label | `list(string)` | n/a | yes | +| [region](#input\_region) | The geographical region for a directory. The parameter is optional
If you set it the possible values are: `EMEA`, `APAC`, `AMER`.
Default value: `null`. | `string` | `null` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [business\_unit](#output\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | +| [costcenter](#output\_costcenter) | Cost center to be used for subaccounts | +| [directory\_id](#output\_directory\_id) | Technical ID of the directory | +| [directory\_name](#output\_directory\_name) | The name of the directory | +| [region](#output\_region) | The geographical region for a directory. The parameter is optional | diff --git a/sample-setup/modules/base-directory-setup/main.tf b/sample-setup/modules/base-directory-setup/main.tf new file mode 100644 index 0000000..d2cd72c --- /dev/null +++ b/sample-setup/modules/base-directory-setup/main.tf @@ -0,0 +1,14 @@ +module "dir_namings" { + source = "../sap-btp-naming-conventions-directory" + business_unit = var.business_unit + costcenter = var.costcenter + directory_contacts = var.directory_contacts + region = var.region +} + + +resource "btp_directory" "self" { + name = module.dir_namings.directory_name + description = module.dir_namings.directory_description + labels = module.dir_namings.directory_labels +} diff --git a/sample-setup/modules/base-directory-setup/outputs.tf b/sample-setup/modules/base-directory-setup/outputs.tf new file mode 100644 index 0000000..085eab8 --- /dev/null +++ b/sample-setup/modules/base-directory-setup/outputs.tf @@ -0,0 +1,24 @@ +output "directory_id" { + value = btp_directory.self.id + description = "Technical ID of the directory" +} + +output "directory_name" { + value = btp_directory.self.name + description = "The name of the directory" +} + +output "business_unit" { + value = var.business_unit + description = "Business unit of the project e.g., HR, IT or Sales" +} + +output "costcenter" { + value = var.costcenter + description = "Cost center to be used for subaccounts" +} + +output "region" { + value = var.region + description = "The geographical region for a directory. The parameter is optional" +} diff --git a/sample-setup/modules/base-directory-setup/variables.tf b/sample-setup/modules/base-directory-setup/variables.tf new file mode 100644 index 0000000..d26d95a --- /dev/null +++ b/sample-setup/modules/base-directory-setup/variables.tf @@ -0,0 +1,24 @@ +variable "business_unit" { + type = string + description = "Business unit of the project e.g., HR, IT or Sales" +} + +variable "region" { + type = string + default = null + description = <<-EOT + The geographical region for a directory. The parameter is optional + If you set it the possible values are: `EMEA`, `APAC`, `AMER`. + Default value: `null`. + EOT +} + +variable "costcenter" { + type = string + description = "Cost center to be used for subaccounts" +} + +variable "directory_contacts" { + type = list(string) + description = "Contact persons to be used for directory, added as label" +} diff --git a/sample-setup/modules/base-directory-setup/versions.tf b/sample-setup/modules/base-directory-setup/versions.tf new file mode 100644 index 0000000..9bbde7b --- /dev/null +++ b/sample-setup/modules/base-directory-setup/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.11" + required_providers { + btp = { + source = "SAP/btp" + version = ">= 1.11.0" + } + } +} diff --git a/sample-setup/modules/base-subaccount-setup/README.md b/sample-setup/modules/base-subaccount-setup/README.md new file mode 100644 index 0000000..4381de3 --- /dev/null +++ b/sample-setup/modules/base-subaccount-setup/README.md @@ -0,0 +1,46 @@ +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | +| [btp](#requirement\_btp) | >= 1.11.0 | + +## Providers + +| Name | Version | +|------|---------| +| [btp](#provider\_btp) | >= 1.11.0 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [subaccount\_namings](#module\_subaccount\_namings) | ../sap-btp-naming-conventions-subaccount | n/a | + +## Resources + +| Name | Type | +|------|------| +| [btp_subaccount.self](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [business\_unit](#input\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | `string` | n/a | yes | +| [company\_name](#input\_company\_name) | Company name to be used for subaccount subdomains. The parameter is optional
Default value: `null`. | `string` | `null` | no | +| [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | +| [parent\_id](#input\_parent\_id) | ID of the parent directory | `string` | `null` | no | +| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`, `Shared`. | `string` | n/a | yes | +| [subaccount\_contacts](#input\_subaccount\_contacts) | Contact persons to be used for subaccount, added as label | `list(string)` | n/a | yes | +| [subaccount\_region](#input\_subaccount\_region) | Region of the subaccount. | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [business\_unit](#output\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | +| [costcenter](#output\_costcenter) | Cost center to be used for subaccounts | +| [stage](#output\_stage) | The geographical region for a directory. The parameter is optional | +| [subaccount\_id](#output\_subaccount\_id) | Technical ID of the directory | +| [subaccount\_name](#output\_subaccount\_name) | The name of the directory | diff --git a/sample-setup/modules/base-subaccount-setup/main.tf b/sample-setup/modules/base-subaccount-setup/main.tf new file mode 100644 index 0000000..6d44c7e --- /dev/null +++ b/sample-setup/modules/base-subaccount-setup/main.tf @@ -0,0 +1,18 @@ +module "subaccount_namings" { + source = "../sap-btp-naming-conventions-subaccount" + business_unit = var.business_unit + costcenter = var.costcenter + stage = var.stage + subaccount_contacts = var.subaccount_contacts +} + + +resource "btp_subaccount" "self" { + parent_id = var.parent_id + name = module.subaccount_namings.subaccount_name + subdomain = module.subaccount_namings.subaccount_subdomain + region = var.subaccount_region + description = module.subaccount_namings.subaccount_description + usage = module.subaccount_namings.subaccount_usage + labels = module.subaccount_namings_namings.directory_labels +} diff --git a/sample-setup/modules/base-subaccount-setup/outputs.tf b/sample-setup/modules/base-subaccount-setup/outputs.tf new file mode 100644 index 0000000..6abca3c --- /dev/null +++ b/sample-setup/modules/base-subaccount-setup/outputs.tf @@ -0,0 +1,24 @@ +output "subaccount_id" { + value = btp_directory.self.id + description = "Technical ID of the directory" +} + +output "subaccount_name" { + value = btp_directory.self.name + description = "The name of the directory" +} + +output "business_unit" { + value = var.business_unit + description = "Business unit of the project e.g., HR, IT or Sales" +} + +output "costcenter" { + value = var.costcenter + description = "Cost center to be used for subaccounts" +} + +output "stage" { + value = var.stage + description = "The geographical region for a directory. The parameter is optional" +} diff --git a/sample-setup/modules/base-subaccount-setup/variables.tf b/sample-setup/modules/base-subaccount-setup/variables.tf new file mode 100644 index 0000000..59cf5de --- /dev/null +++ b/sample-setup/modules/base-subaccount-setup/variables.tf @@ -0,0 +1,42 @@ +variable "business_unit" { + type = string + description = "Business unit of the project e.g., HR, IT or Sales" +} + +variable "subaccount_region" { + type = string + description = "Region of the subaccount." +} + +variable "costcenter" { + type = string + description = "Cost center to be used for subaccounts" +} + +variable "company_name" { + type = string + description = <<-EOT + Company name to be used for subaccount subdomains. The parameter is optional + Default value: `null`. + EOT + default = null +} + +variable "stage" { + type = string + description = <<-EOT + Stage of the environment to be setup up. + Possible values: `Dev`, `Test`, `Prod`, `Shared`. + EOT +} + +variable "subaccount_contacts" { + type = list(string) + description = "Contact persons to be used for subaccount, added as label" +} + +variable "parent_id" { + type = string + description = "ID of the parent directory" + default = null +} diff --git a/sample-setup/modules/base-subaccount-setup/versions.tf b/sample-setup/modules/base-subaccount-setup/versions.tf new file mode 100644 index 0000000..9bbde7b --- /dev/null +++ b/sample-setup/modules/base-subaccount-setup/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.11" + required_providers { + btp = { + source = "SAP/btp" + version = ">= 1.11.0" + } + } +} diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/README.md b/sample-setup/modules/sap-btp-naming-conventions-directory/README.md new file mode 100644 index 0000000..097f2b0 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/README.md @@ -0,0 +1,31 @@ +# SAP BTP - Naming module + +This module encapsulates the naming conventions for SAP BTP directories and the labels that can be attached to some resources on SAP BTP. + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [add\_managed\_by\_label](#input\_add\_managed\_by\_label) | Add label that resource is managed by Terraform | `bool` | `true` | no | +| [business\_unit](#input\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | `string` | n/a | yes | +| [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | +| [delimiter](#input\_delimiter) | Delimiter to be used for namings | `string` | `"-"` | no | +| [directory\_contacts](#input\_directory\_contacts) | Contact persons to be used for directories, added as label | `list(string)` | n/a | yes | +| [label\_name\_case](#input\_label\_name\_case) | Controls the letter case of the `label` names for labels generated by this module.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `"title"` | no | +| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of the `label` values for labels generated by this module.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Default value: `lower`. | `string` | `"lower"` | no | +| [management\_tool](#input\_management\_tool) | Defines which tool is used for management of infrastructure.
Possible values: `Terraform`, `OpenTofu`.
Default value: `Terraform`. | `string` | `"Terraform"` | no | +| [region](#input\_region) | The geographical region for a directory. The parameter is optional
If you set it the possible values are: `EMEA`, `APAC`, `AMER`.
Default value: `null`. | `string` | `null` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [directory\_description](#output\_directory\_description) | Description of the directory | +| [directory\_labels](#output\_directory\_labels) | Labels for the directory | +| [directory\_name](#output\_directory\_name) | Name of the directory | diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf b/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf new file mode 100644 index 0000000..0c5a021 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf @@ -0,0 +1,46 @@ +locals { + costcenter_label_name = "Costcenter" + directory_contact_label_name = "Directory responsibles" + managedby_label_name = "Managed by" + + directory_name = var.region == null ? var.business_unit : format( + "%s%s%s", + upper(var.business_unit), + var.delimiter, + var.region + ) + + directory_description = var.region == null ? format( + "Directory for business Unit %s", + var.business_unit + ) : format( + "Directory for business Unit %s (%s)", + var.business_unit, + var.region + ) + + costcenter_label_name_formatted = var.label_name_case == "lower" ? lower(local.costcenter_label_name) : var.label_name_case == "title" ? title(local.costcenter_label_name) : upper(local.costcenter_label_name) + directory_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.directory_contact_label_name) : var.label_name_case == "title" ? title(local.directory_contact_label_name) : upper(local.directory_contact_label_name) + managedby_label_name_formatted = var.label_name_case == "lower" ? lower(local.managedby_label_name) : var.label_name_case == "title" ? title(local.managedby_label_name) : upper(local.managedby_label_name) + + costcenter_label_value_formatted = var.label_value_case == "lower" ? lower(var.costcenter) : var.label_value_case == "title" ? title(var.costcenter) : var.label_value_case == "upper" ? upper(var.costcenter) : var.costcenter + management_label_value_formatted = var.label_value_case == "lower" ? lower(var.management_tool) : var.label_value_case == "title" ? title(var.management_tool) : var.label_value_case == "upper" ? upper(var.management_tool) : var.management_tool + + basic_labels = { + "${local.costcenter_label_name_formatted}" = [local.costcenter_label_value_formatted] + } + + basic_labels_final = var.add_managed_by_label ? merge( + local.basic_labels, + { + "${local.managedby_label_name_formatted}" = [local.management_label_value_formatted] + } + ) : local.basic_labels + + directory_labels = merge( + local.basic_labels_final, + { + "${local.directory_contact_label_name_formatted}" = var.directory_contacts + } + ) +} diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/outputs.tf b/sample-setup/modules/sap-btp-naming-conventions-directory/outputs.tf new file mode 100644 index 0000000..e1482a5 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/outputs.tf @@ -0,0 +1,29 @@ +output "directory_name" { + value = local.directory_name + description = "Name of the directory" +} + +output "directory_description" { + value = local.directory_description + description = "Description of the directory" +} + +output "directory_labels" { + value = local.directory_labels + description = "Labels for the directory" +} + +output "business_unit" { + value = var.business_unit + description = "Business unit of the project e.g., HR, IT or Sales" +} + +output "costcenter" { + value = var.costcenter + description = "Cost center to be used for subaccounts" +} + +output "region" { + value = var.region + description = "The geographical region for a directory. The parameter is optional" +} diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/variables.tf b/sample-setup/modules/sap-btp-naming-conventions-directory/variables.tf new file mode 100644 index 0000000..8527a3c --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/variables.tf @@ -0,0 +1,86 @@ +variable "business_unit" { + type = string + description = "Business unit of the project e.g., HR, IT or Sales" +} + +variable "region" { + type = string + default = null + description = <<-EOT + The geographical region for a directory. The parameter is optional + If you set it the possible values are: `EMEA`, `APAC`, `AMER`. + Default value: `null`. + EOT + + validation { + condition = var.region == null ? true : contains(["EMEA", "APAC", "AMER"], var.region) + error_message = "Allowed values are: `EMEA`, `APAC`, `AMER`." + } +} + +variable "costcenter" { + type = string + description = "Cost center to be used for subaccounts" +} + +variable "directory_contacts" { + type = list(string) + description = "Contact persons to be used for directories, added as label" +} + +variable "add_managed_by_label" { + type = bool + description = "Add label that resource is managed by Terraform" + default = true +} + +variable "management_tool" { + type = string + description = <<-EOT + Defines which tool is used for management of infrastructure. + Possible values: `Terraform`, `OpenTofu`. + Default value: `Terraform`. + EOT + + validation { + condition = contains(["Terraform", "OpenTofu"], var.management_tool) + error_message = "Allowed values are: `Terraform`, `OpenTofu`." + } + default = "Terraform" +} + +variable "delimiter" { + type = string + description = "Delimiter to be used for namings" + default = "-" +} + +variable "label_name_case" { + type = string + default = "title" + description = <<-EOT + Controls the letter case of the `label` names for labels generated by this module. + Possible values: `lower`, `title`, `upper`. + Default value: `title`. + EOT + + validation { + condition = contains(["lower", "title", "upper"], var.label_name_case) + error_message = "Allowed values are: `lower`, `title`, `upper`." + } +} + +variable "label_value_case" { + type = string + default = "lower" + description = <<-EOT + Controls the letter case of the `label` values for labels generated by this module. + Possible values: `lower`, `title`, `upper` and `none` (no transformation). + Default value: `lower`. + EOT + + validation { + condition = contains(["lower", "title", "upper", "none"], var.label_value_case) + error_message = "Allowed values are: `lower`, `title`, `upper`, `none`." + } +} diff --git a/sample-setup/modules/sap-btp-naming-conventions/versions.tf b/sample-setup/modules/sap-btp-naming-conventions-directory/versions.tf similarity index 100% rename from sample-setup/modules/sap-btp-naming-conventions/versions.tf rename to sample-setup/modules/sap-btp-naming-conventions-directory/versions.tf diff --git a/sample-setup/modules/sap-btp-naming-conventions/README.md b/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md similarity index 77% rename from sample-setup/modules/sap-btp-naming-conventions/README.md rename to sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md index acfcdcf..ceeb4f7 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/README.md +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md @@ -1,6 +1,6 @@ # SAP BTP - Naming module -This module encapsulates the naming conventions for SAP BTP accounts and the labels that can be attached to some resources on SAP BTP. +This module encapsulates the naming conventions for SAP BTP subaccounts and the labels that can be attached to some resources on SAP BTP. ## Requirements @@ -33,12 +33,10 @@ No modules. | [company\_name](#input\_company\_name) | Company name to be used for subaccount subdomains. The parameter is optional
Default value: `null`. | `string` | `null` | no | | [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | | [delimiter](#input\_delimiter) | Delimiter to be used for namings | `string` | `"-"` | no | -| [directory\_contacts](#input\_directory\_contacts) | Contact persons to be used for directories, added as label | `list(string)` | n/a | yes | | [label\_name\_case](#input\_label\_name\_case) | Controls the letter case of the `label` names for labels generated by this module.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `"title"` | no | | [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of the `label` values for labels generated by this module.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Default value: `lower`. | `string` | `"lower"` | no | | [management\_tool](#input\_management\_tool) | Defines which tool is used for management of infrastructure.
Possible values: `Terraform`, `OpenTofu`.
Default value: `Terraform`. | `string` | `"Terraform"` | no | -| [region](#input\_region) | The geographical region for a directory. The parameter is optional
If you set it the possible values are: `EMEA`, `APAC`, `AMER`.
Default value: `null`. | `string` | `null` | no | -| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`. | `string` | n/a | yes | +| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`, `Shared`. | `string` | n/a | yes | | [subaccount\_contacts](#input\_subaccount\_contacts) | Contact persons to be used for subaccounts, added as label | `list(string)` | n/a | yes | ## Outputs @@ -46,9 +44,6 @@ No modules. | Name | Description | |------|-------------| | [cloudfoundry\_org\_name](#output\_cloudfoundry\_org\_name) | Name of the Cloud Foundry org | -| [directory\_description](#output\_directory\_description) | Description of the directory | -| [directory\_labels](#output\_directory\_labels) | Labels for the directory | -| [directory\_name](#output\_directory\_name) | Name of the directory | | [subaccount\_description](#output\_subaccount\_description) | Description of the subaccount | | [subaccount\_labels](#output\_subaccount\_labels) | Labels for the subaccount | | [subaccount\_name](#output\_subaccount\_name) | Name of the subaccount | diff --git a/sample-setup/modules/sap-btp-naming-conventions/main.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf similarity index 79% rename from sample-setup/modules/sap-btp-naming-conventions/main.tf rename to sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf index 15f942b..3fb006a 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/main.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf @@ -5,29 +5,11 @@ locals { # The length limit for the subdomain is 63 characters. subdomain_length_limit = 63 costcenter_label_name = "Costcenter" - directory_contact_label_name = "Directory responsibles" subaccount_contact_label_name = "Subaccount responsibles" stage_label_name = "Stage" managedby_label_name = "Managed by" - directory_name = var.region == null ? var.business_unit : format( - "%s%s%s", - upper(var.business_unit), - var.delimiter, - var.region - ) - - directory_description = var.region == null ? format( - "Directory for business Unit %s", - var.business_unit - ) : format( - "Directory for business Unit %s (%s)", - var.business_unit, - var.region - ) - costcenter_label_name_formatted = var.label_name_case == "lower" ? lower(local.costcenter_label_name) : var.label_name_case == "title" ? title(local.costcenter_label_name) : upper(local.costcenter_label_name) - directory_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.directory_contact_label_name) : var.label_name_case == "title" ? title(local.directory_contact_label_name) : upper(local.directory_contact_label_name) subaccount_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.subaccount_contact_label_name) : var.label_name_case == "title" ? title(local.subaccount_contact_label_name) : upper(local.subaccount_contact_label_name) stage_label_name_formatted = var.label_name_case == "lower" ? lower(local.stage_label_name) : var.label_name_case == "title" ? title(local.stage_label_name) : upper(local.stage_label_name) managedby_label_name_formatted = var.label_name_case == "lower" ? lower(local.managedby_label_name) : var.label_name_case == "title" ? title(local.managedby_label_name) : upper(local.managedby_label_name) @@ -48,13 +30,6 @@ locals { } ) : local.basic_labels - directory_labels = merge( - local.basic_labels_final, - { - "${local.directory_contact_label_name_formatted}" = var.directory_contacts - } - ) - subaccount_name = format( "%s%s%s", upper(var.business_unit), @@ -103,7 +78,7 @@ locals { } ) - subaccount_usage = var.stage == "Prod" ? "USED_FOR_PRODUCTIO" : "NOT_USED_FOR_PRODUCTIO" + subaccount_usage = var.stage == "Prod" ? "USED_FOR_PRODUCTION" : "NOT_USED_FOR_PRODUCTION" cloudfoundry_org_name = local.subaccount_subdomain } diff --git a/sample-setup/modules/sap-btp-naming-conventions/outputs.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/outputs.tf similarity index 67% rename from sample-setup/modules/sap-btp-naming-conventions/outputs.tf rename to sample-setup/modules/sap-btp-naming-conventions-subaccount/outputs.tf index 6d3106d..a7297f4 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/outputs.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/outputs.tf @@ -1,18 +1,3 @@ -output "directory_name" { - value = local.directory_name - description = "Name of the directory" -} - -output "directory_description" { - value = local.directory_description - description = "Description of the directory" -} - -output "directory_labels" { - value = local.directory_labels - description = "Labels for the directory" -} - output "subaccount_name" { value = local.subaccount_name description = "Name of the subaccount" diff --git a/sample-setup/modules/sap-btp-naming-conventions/variables.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf similarity index 81% rename from sample-setup/modules/sap-btp-naming-conventions/variables.tf rename to sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf index cd055fa..4d5e817 100644 --- a/sample-setup/modules/sap-btp-naming-conventions/variables.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf @@ -3,21 +3,6 @@ variable "business_unit" { description = "Business unit of the project e.g., HR, IT or Sales" } -variable "region" { - type = string - default = null - description = <<-EOT - The geographical region for a directory. The parameter is optional - If you set it the possible values are: `EMEA`, `APAC`, `AMER`. - Default value: `null`. - EOT - - validation { - condition = var.region == null ? true : contains(["EMEA", "APAC", "AMER"], var.region) - error_message = "Allowed values are: `EMEA`, `APAC`, `AMER`." - } -} - variable "stage" { type = string description = <<-EOT @@ -37,7 +22,6 @@ variable "company_name" { Company name to be used for subaccount subdomains. The parameter is optional Default value: `null`. EOT - default = null } @@ -46,11 +30,6 @@ variable "costcenter" { description = "Cost center to be used for subaccounts" } -variable "directory_contacts" { - type = list(string) - description = "Contact persons to be used for directories, added as label" -} - variable "subaccount_contacts" { type = list(string) description = "Contact persons to be used for subaccounts, added as label" diff --git a/sample-setup/modules/sap-btp-naming-conventions-subaccount/versions.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/versions.tf new file mode 100644 index 0000000..2dc2c98 --- /dev/null +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 1.11" +} From 67c016b3dcee41637faaf2d0aea8e8f9f4de2bc8 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 1 Apr 2025 15:19:59 +0200 Subject: [PATCH 05/15] subaccount setup --- .../basic-setup/directory-setup/test.tfplan | Bin 7922 -> 0 bytes .../basic-setup/subaccount-setup/README.md | 3 ++ .../basic-setup/subaccount-setup/main.tf | 17 +++++++ .../basic-setup/subaccount-setup/outputs.tf | 9 ++++ .../basic-setup/subaccount-setup/provider.tf | 13 +++++ .../basic-setup/subaccount-setup/variables.tf | 47 ++++++++++++++++++ .../modules/base-subaccount-setup/README.md | 46 ----------------- .../modules/base-subaccount-setup/main.tf | 18 ------- .../modules/base-subaccount-setup/outputs.tf | 24 --------- .../base-subaccount-setup/variables.tf | 42 ---------------- .../modules/base-subaccount-setup/versions.tf | 9 ---- 11 files changed, 89 insertions(+), 139 deletions(-) delete mode 100644 sample-setup/basic-setup/directory-setup/test.tfplan delete mode 100644 sample-setup/modules/base-subaccount-setup/README.md delete mode 100644 sample-setup/modules/base-subaccount-setup/main.tf delete mode 100644 sample-setup/modules/base-subaccount-setup/outputs.tf delete mode 100644 sample-setup/modules/base-subaccount-setup/variables.tf delete mode 100644 sample-setup/modules/base-subaccount-setup/versions.tf diff --git a/sample-setup/basic-setup/directory-setup/test.tfplan b/sample-setup/basic-setup/directory-setup/test.tfplan deleted file mode 100644 index 5ab81df0582f897e39e0a65063d6a4b1f8429ee4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7922 zcmd5>bySqyw;sAfLTUg}Nl9sG1f-=qq-z*phE9=^E(JtTLTN-g2BbldR8qRTOOUw3 z{VhNExZ-uK`_J98-ap=1>+G}R?C0$Lyh?IN$V32i_>a%YR|jxOPyrYKM{|3S5m;Rf z1%QA(v0_p3Ld=HZ5mBp)T0gNWra5DCf=W}Ixc>YnkUwn-ajUr0pVVc$h z*Po}g2R?T6d(qx^5FY6>p=;=If!d!b$#@AN82YZwm=8~OVb-^QKDKC*j8g`72&BFX zleP*9V@kJ_re(+_BSV5_vm1pxuLl`oK{N0*?ptRz)ZLNF7|qR9yB~OqyIuQiq_kbf ztfs%U!rfKe-6geeS#DkTFuP&*;Gnymn|j(z?0wqvS5)<1!k%jfBN9S=YVTF@)^eSN zzVUn8FSvdS>J#%{r6{77pyRi}`ozo?13W3x69K1Ks4Ki78%;DCkr5Uw2 z(arG(KTAqSOfPa3ibg!rKm^m3>1g4)P9bU4>9(}!gA#1bZ%(B_ot55 z!hPHdR23Pod2D+TBhFb>jaYL^jN%>YA*b1ZrWWZKjwj3w6Ws`;MS~1O2zzQOyg>m= z>rU9D#haO5XdDG38eT`^h+yZAN=9O@R&Jst)dCx`HApPB1PX$wYj8uL8(vz9rQ|3q zn{M9sMUs=5P3iMR@;wWm5My!rh#*dK01A)*fU`3tIW%-`i#4_-L;&Cv6#!7Wwo1_c zyGo#rMvi9xl!-)04JIN7_R|Al$+ZVo}Q_o;cmHG4=SCk<1(^kh}T)h z+z-W$i}fCLSsi4j_(@2A>t^p~?MfaP#n~h>@W8l@Jgr^(bPieV)4P~jVY{^OZ?Ogl zzw&_+7+4ht&&31yKiB8u<`w_!oE+_)9HEz8bnH~d^kc_HopgD;HM28>fV$2!4dQv0 z7{+s>WplmpLz;(Hs?zD1O&a(yZ=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y&1spe~ zl}GRKnIXwck^T;%Nyb;GZfc4P=>w(+Icu!sr{YduSivSdN{&Twe#+VyiQ-`cC9pvr z8=MTf>^Mt%u~!{wk^#N3FWt4T@Y$`xG< zh?O^PDl;H6lTgnwh`|DrbPlj1^gjz47$+XqYM~|Oqi`*YNmouy!d=!_uqR@xxo5N@ zjuIU7zBMT+BgEW{s};*S#vFTFMgFH!3BN2Ey4gOJhO1&wFnQV7qhj;#x9X*&+W-(T zT4_G?!YB+Ko;I*_I9;MVJ6NGw()FPJFEi;PWZ*LXL6&Vu!y9 z&gGW&yq&%fUV^{b<1Yerx#>CYjW4A0Z??GFDPN7!<=*4GbGi^*;>#ZVu8+E^>oRiw e8(-$(y8hI=D9NF~OC12X0smQ^BM8~~+kXM~JdUgY diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md index e69de29..bff837c 100644 --- a/sample-setup/basic-setup/subaccount-setup/README.md +++ b/sample-setup/basic-setup/subaccount-setup/README.md @@ -0,0 +1,3 @@ +# Setup of a Subaccount + +Basic setup of a subaccount. Every subaccount is created seperately diff --git a/sample-setup/basic-setup/subaccount-setup/main.tf b/sample-setup/basic-setup/subaccount-setup/main.tf index e69de29..ed5be4a 100644 --- a/sample-setup/basic-setup/subaccount-setup/main.tf +++ b/sample-setup/basic-setup/subaccount-setup/main.tf @@ -0,0 +1,17 @@ +module "subaccount_namings" { + source = "../sap-btp-naming-conventions-subaccount" + business_unit = var.business_unit + costcenter = var.costcenter + stage = var.stage + subaccount_contacts = var.subaccount_contacts +} + +resource "btp_subaccount" "self" { + parent_id = var.parent_id + name = module.subaccount_namings.subaccount_name + subdomain = module.subaccount_namings.subaccount_subdomain + region = var.subaccount_region + description = module.subaccount_namings.subaccount_description + usage = module.subaccount_namings.subaccount_usage + labels = module.subaccount_namings.subaccount_labels +} diff --git a/sample-setup/basic-setup/subaccount-setup/outputs.tf b/sample-setup/basic-setup/subaccount-setup/outputs.tf index e69de29..3a5c93a 100644 --- a/sample-setup/basic-setup/subaccount-setup/outputs.tf +++ b/sample-setup/basic-setup/subaccount-setup/outputs.tf @@ -0,0 +1,9 @@ +output "subaccount_id" { + value = btp_subaccount.self.id + description = "Technical ID of the subaccount" +} + +output "subaccount_name" { + value = btp_subaccount.self.name + description = "The name of the subaccount" +} diff --git a/sample-setup/basic-setup/subaccount-setup/provider.tf b/sample-setup/basic-setup/subaccount-setup/provider.tf index e69de29..52f55ff 100644 --- a/sample-setup/basic-setup/subaccount-setup/provider.tf +++ b/sample-setup/basic-setup/subaccount-setup/provider.tf @@ -0,0 +1,13 @@ +terraform { + required_providers { + btp = { + source = "SAP/btp" + version = "~>1.11.0" + } + } +} + +# Configure the BTP Provider +provider "btp" { + globalaccount = var.globalaccount +} diff --git a/sample-setup/basic-setup/subaccount-setup/variables.tf b/sample-setup/basic-setup/subaccount-setup/variables.tf index e69de29..6b32f9f 100644 --- a/sample-setup/basic-setup/subaccount-setup/variables.tf +++ b/sample-setup/basic-setup/subaccount-setup/variables.tf @@ -0,0 +1,47 @@ +variable "globalaccount" { + type = string + description = "The subdomain of the global account on SAP BTP" +} + +variable "business_unit" { + type = string + description = "Business unit of the project e.g., HR, IT or Sales" +} + +variable "subaccount_region" { + type = string + description = "Region of the subaccount." +} + +variable "costcenter" { + type = string + description = "Cost center to be used for subaccounts" +} + +variable "company_name" { + type = string + description = <<-EOT + Company name to be used for subaccount subdomains. The parameter is optional + Default value: `null`. + EOT + default = null +} + +variable "stage" { + type = string + description = <<-EOT + Stage of the environment to be setup up. + Possible values: `Dev`, `Test`, `Prod`, `Shared`. + EOT +} + +variable "subaccount_contacts" { + type = list(string) + description = "Contact persons to be used for subaccount, added as label" +} + +variable "parent_id" { + type = string + description = "ID of the parent directory" + default = null +} diff --git a/sample-setup/modules/base-subaccount-setup/README.md b/sample-setup/modules/base-subaccount-setup/README.md deleted file mode 100644 index 4381de3..0000000 --- a/sample-setup/modules/base-subaccount-setup/README.md +++ /dev/null @@ -1,46 +0,0 @@ -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | >= 1.11 | -| [btp](#requirement\_btp) | >= 1.11.0 | - -## Providers - -| Name | Version | -|------|---------| -| [btp](#provider\_btp) | >= 1.11.0 | - -## Modules - -| Name | Source | Version | -|------|--------|---------| -| [subaccount\_namings](#module\_subaccount\_namings) | ../sap-btp-naming-conventions-subaccount | n/a | - -## Resources - -| Name | Type | -|------|------| -| [btp_subaccount.self](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount) | resource | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [business\_unit](#input\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | `string` | n/a | yes | -| [company\_name](#input\_company\_name) | Company name to be used for subaccount subdomains. The parameter is optional
Default value: `null`. | `string` | `null` | no | -| [costcenter](#input\_costcenter) | Cost center to be used for subaccounts | `string` | n/a | yes | -| [parent\_id](#input\_parent\_id) | ID of the parent directory | `string` | `null` | no | -| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`, `Shared`. | `string` | n/a | yes | -| [subaccount\_contacts](#input\_subaccount\_contacts) | Contact persons to be used for subaccount, added as label | `list(string)` | n/a | yes | -| [subaccount\_region](#input\_subaccount\_region) | Region of the subaccount. | `string` | n/a | yes | - -## Outputs - -| Name | Description | -|------|-------------| -| [business\_unit](#output\_business\_unit) | Business unit of the project e.g., HR, IT or Sales | -| [costcenter](#output\_costcenter) | Cost center to be used for subaccounts | -| [stage](#output\_stage) | The geographical region for a directory. The parameter is optional | -| [subaccount\_id](#output\_subaccount\_id) | Technical ID of the directory | -| [subaccount\_name](#output\_subaccount\_name) | The name of the directory | diff --git a/sample-setup/modules/base-subaccount-setup/main.tf b/sample-setup/modules/base-subaccount-setup/main.tf deleted file mode 100644 index 6d44c7e..0000000 --- a/sample-setup/modules/base-subaccount-setup/main.tf +++ /dev/null @@ -1,18 +0,0 @@ -module "subaccount_namings" { - source = "../sap-btp-naming-conventions-subaccount" - business_unit = var.business_unit - costcenter = var.costcenter - stage = var.stage - subaccount_contacts = var.subaccount_contacts -} - - -resource "btp_subaccount" "self" { - parent_id = var.parent_id - name = module.subaccount_namings.subaccount_name - subdomain = module.subaccount_namings.subaccount_subdomain - region = var.subaccount_region - description = module.subaccount_namings.subaccount_description - usage = module.subaccount_namings.subaccount_usage - labels = module.subaccount_namings_namings.directory_labels -} diff --git a/sample-setup/modules/base-subaccount-setup/outputs.tf b/sample-setup/modules/base-subaccount-setup/outputs.tf deleted file mode 100644 index 6abca3c..0000000 --- a/sample-setup/modules/base-subaccount-setup/outputs.tf +++ /dev/null @@ -1,24 +0,0 @@ -output "subaccount_id" { - value = btp_directory.self.id - description = "Technical ID of the directory" -} - -output "subaccount_name" { - value = btp_directory.self.name - description = "The name of the directory" -} - -output "business_unit" { - value = var.business_unit - description = "Business unit of the project e.g., HR, IT or Sales" -} - -output "costcenter" { - value = var.costcenter - description = "Cost center to be used for subaccounts" -} - -output "stage" { - value = var.stage - description = "The geographical region for a directory. The parameter is optional" -} diff --git a/sample-setup/modules/base-subaccount-setup/variables.tf b/sample-setup/modules/base-subaccount-setup/variables.tf deleted file mode 100644 index 59cf5de..0000000 --- a/sample-setup/modules/base-subaccount-setup/variables.tf +++ /dev/null @@ -1,42 +0,0 @@ -variable "business_unit" { - type = string - description = "Business unit of the project e.g., HR, IT or Sales" -} - -variable "subaccount_region" { - type = string - description = "Region of the subaccount." -} - -variable "costcenter" { - type = string - description = "Cost center to be used for subaccounts" -} - -variable "company_name" { - type = string - description = <<-EOT - Company name to be used for subaccount subdomains. The parameter is optional - Default value: `null`. - EOT - default = null -} - -variable "stage" { - type = string - description = <<-EOT - Stage of the environment to be setup up. - Possible values: `Dev`, `Test`, `Prod`, `Shared`. - EOT -} - -variable "subaccount_contacts" { - type = list(string) - description = "Contact persons to be used for subaccount, added as label" -} - -variable "parent_id" { - type = string - description = "ID of the parent directory" - default = null -} diff --git a/sample-setup/modules/base-subaccount-setup/versions.tf b/sample-setup/modules/base-subaccount-setup/versions.tf deleted file mode 100644 index 9bbde7b..0000000 --- a/sample-setup/modules/base-subaccount-setup/versions.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_version = ">= 1.11" - required_providers { - btp = { - source = "SAP/btp" - version = ">= 1.11.0" - } - } -} From 7232caf7db0681a4933d3ddfb53f0b46da624d9f Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 1 Apr 2025 16:07:20 +0200 Subject: [PATCH 06/15] subaccount --- .../subaccount-setup/.terraform.lock.hcl | 44 +++++++++++++++++++ .../basic-setup/subaccount-setup/main.tf | 23 +++++++++- .../basic-setup/subaccount-setup/variables.tf | 14 ++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl diff --git a/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl b/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl new file mode 100644 index 0000000..f949e55 --- /dev/null +++ b/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl @@ -0,0 +1,44 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/random" { + version = "3.7.1" + hashes = [ + "h1:t152MY0tQH4a8fLzTtEWx70ITd3azVOrFDn/pQblbto=", + "zh:3193b89b43bf5805493e290374cdda5132578de6535f8009547c8b5d7a351585", + "zh:3218320de4be943e5812ed3de995946056db86eb8d03aa3f074e0c7316599bef", + "zh:419861805a37fa443e7d63b69fb3279926ccf98a79d256c422d5d82f0f387d1d", + "zh:4df9bd9d839b8fc11a3b8098a604b9b46e2235eb65ef15f4432bde0e175f9ca6", + "zh:5814be3f9c9cc39d2955d6f083bae793050d75c572e70ca11ccceb5517ced6b1", + "zh:63c6548a06de1231c8ee5570e42ca09c4b3db336578ded39b938f2156f06dd2e", + "zh:697e434c6bdee0502cc3deb098263b8dcd63948e8a96d61722811628dce2eba1", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:a0b8e44927e6327852bbfdc9d408d802569367f1e22a95bcdd7181b1c3b07601", + "zh:b7d3af018683ef22794eea9c218bc72d7c35a2b3ede9233b69653b3c782ee436", + "zh:d63b911d618a6fe446c65bfc21e793a7663e934b2fef833d42d3ccd38dd8d68d", + "zh:fa985cd0b11e6d651f47cff3055f0a9fd085ec190b6dbe99bf5448174434cdea", + ] +} + +provider "registry.terraform.io/sap/btp" { + version = "1.11.0" + constraints = "~> 1.11.0" + hashes = [ + "h1:q9XDheshVlSVbcWKmAlOjF+EGTxvpgS+CyMOyPzh3uw=", + "zh:16647cac2e5062c4ac9db89d622b1de3375e57372841f65f3e6997a26a2f283d", + "zh:548d023762dbd3c2830a151f0beadf58401a70368299625f4c90100997348aed", + "zh:55aba6fba636e2d6524f4b180fb1ff0df6328dd3812682726a0b9972c921dbdf", + "zh:624fb982f4cfb2c26b1448e6270b6ad891592e4e52a00718781579fb5a079adb", + "zh:6319aa5b8c60c3916eff4142ecf6f297a8baf1bc903c98a29b6c248a3984f488", + "zh:7979a475dd06d12255269fe6ec004d1c460bb64869a9d814bec58bec88b65147", + "zh:967b5d6b71053e19dbb017319b8b8bd84d8c7f7cfba6fbb4b23243ce860c370e", + "zh:97b02bc0cd9d74bbf4b89b4f8cd9508f0eec7b772b88704f70b696c425a5165e", + "zh:a398f2697184f49cb5e32a6c7b3f586a8a723a2d533a4cc13e11d8739fabf6b2", + "zh:b9e0a0a986cf8a790c10d469f61c81e9cfc41f4a188f060fb1c5a7612101a4da", + "zh:d03b1276c08f7b9d5da9d89505d1a71c0f806142ef336f26abd85a144a68b895", + "zh:dd6e32cf30f53707fec2acb1e5c69c044a76349706785bfcdee8fbaa6bb053c6", + "zh:e7afd57c00ba45a6be5005620e44db08eec2e6adb97b0af1ffb57963767f8229", + "zh:f29dc297897b96bf39f4b6737e6b9e2b8339c3ddc362fc5466ce901d84ef8cb9", + "zh:f6057496ac45093be445ed8423dc9dfcdbb21e5cc6d6348dbe3a8d5641882f3f", + ] +} diff --git a/sample-setup/basic-setup/subaccount-setup/main.tf b/sample-setup/basic-setup/subaccount-setup/main.tf index ed5be4a..33bbc57 100644 --- a/sample-setup/basic-setup/subaccount-setup/main.tf +++ b/sample-setup/basic-setup/subaccount-setup/main.tf @@ -1,5 +1,26 @@ +locals { + valid_region_combination = { + eu10 = "EMEA" + eu11 = "EMEA" + eu20 = "EMEA" + eu30 = "EMEA" + us10 = "AMER" + us11 = "AMER" + us20 = "AMER" + us21 = "AMER" + us30 = "AMER" + ap10 = "APAC" + ap11 = "APAC" + ap12 = "APAC" + ap20 = "APAC" + ap12 = "APAC" + ap30 = "APAC" + } +} + + module "subaccount_namings" { - source = "../sap-btp-naming-conventions-subaccount" + source = "../../modules/sap-btp-naming-conventions-subaccount" business_unit = var.business_unit costcenter = var.costcenter stage = var.stage diff --git a/sample-setup/basic-setup/subaccount-setup/variables.tf b/sample-setup/basic-setup/subaccount-setup/variables.tf index 6b32f9f..a803a5f 100644 --- a/sample-setup/basic-setup/subaccount-setup/variables.tf +++ b/sample-setup/basic-setup/subaccount-setup/variables.tf @@ -8,9 +8,23 @@ variable "business_unit" { description = "Business unit of the project e.g., HR, IT or Sales" } +variable "region" { + type = string + default = null + description = <<-EOT + The geographical region for a directory. The parameter is optional + If you set it the possible values are: `EMEA`, `APAC`, `AMER`. + Default value: `null`. + EOT +} + variable "subaccount_region" { type = string description = "Region of the subaccount." + validation { + condition = lookup(local.valid_region_combination, var.subaccount_region, "INVALID") == var.region + error_message = "Please provide a fitting subaccount region for the region" + } } variable "costcenter" { From 3373672e67c4726cd30723acb3489ae7d34cdc5a Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 1 Apr 2025 17:02:26 +0200 Subject: [PATCH 07/15] add stacks --- sample-setup/basic-setup/directory-setup/stack.tm.hcl | 6 ++++++ sample-setup/basic-setup/subaccount-setup/stack.tm.hcl | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 sample-setup/basic-setup/directory-setup/stack.tm.hcl create mode 100644 sample-setup/basic-setup/subaccount-setup/stack.tm.hcl diff --git a/sample-setup/basic-setup/directory-setup/stack.tm.hcl b/sample-setup/basic-setup/directory-setup/stack.tm.hcl new file mode 100644 index 0000000..245fb79 --- /dev/null +++ b/sample-setup/basic-setup/directory-setup/stack.tm.hcl @@ -0,0 +1,6 @@ +stack { + name = "directory-setup" + description = "Basic setup of a directory structure on SAP BTP" + id = "d749e4a0-6673-43b9-a383-98dc3aa04478" + tags = ["basic", "directory"] +} diff --git a/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl b/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl new file mode 100644 index 0000000..f257d72 --- /dev/null +++ b/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl @@ -0,0 +1,7 @@ +stack { + name = "subaccount-setup" + description = "Basic Setup of a subaccount on SAP BTP" + id = "58708cca-3217-4730-8fe3-532238e90796" + tags = ["basic", "subaccount"] + after = ["tag:basic:directory"] +} From b83fed5f9846d667ddd3ac2af47334b056c89f38 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Fri, 4 Apr 2025 15:24:10 +0200 Subject: [PATCH 08/15] upodate naming --- .../modules/sap-btp-naming-conventions-subaccount/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf index 3fb006a..f18cc1a 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf @@ -32,10 +32,10 @@ locals { subaccount_name = format( "%s%s%s", - upper(var.business_unit), + lower(var.business_unit), var.delimiter, - var.stage) - + lower(var.stage) + ) subaccount_subdomain_base = var.company_name == null ? format( "%s%s%s", From fe1113f127cbdd085ed367aba85a8966d7f64e19 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 15 Apr 2025 14:04:39 +0200 Subject: [PATCH 09/15] enhanced subaccount setup --- .../basic-setup/directory-setup/main.tf | 6 ++- .../basic-setup/directory-setup/stack.tm.hcl | 6 --- .../basic-setup/subaccount-setup/README.md | 6 ++- .../basic-setup/subaccount-setup/main.tf | 20 +++++++++ .../basic-setup/subaccount-setup/outputs.tf | 17 ++++--- .../basic-setup/subaccount-setup/stack.tm.hcl | 7 --- .../basic-setup/subaccount-setup/variables.tf | 11 +++++ .../modules/base-directory-setup/README.md | 4 ++ .../CloudFoundry/README.md | 45 +++++++++++++++++++ .../sap-btp-environment/CloudFoundry/main.tf | 26 +++++++++++ .../CloudFoundry/outputs.tf | 9 ++++ .../CloudFoundry/variables.tf | 29 ++++++++++++ .../CloudFoundry/versions.tf | 9 ++++ .../README.md | 2 +- .../README.md | 2 +- 15 files changed, 175 insertions(+), 24 deletions(-) delete mode 100644 sample-setup/basic-setup/directory-setup/stack.tm.hcl delete mode 100644 sample-setup/basic-setup/subaccount-setup/stack.tm.hcl create mode 100644 sample-setup/modules/sap-btp-environment/CloudFoundry/README.md create mode 100644 sample-setup/modules/sap-btp-environment/CloudFoundry/main.tf create mode 100644 sample-setup/modules/sap-btp-environment/CloudFoundry/outputs.tf create mode 100644 sample-setup/modules/sap-btp-environment/CloudFoundry/variables.tf create mode 100644 sample-setup/modules/sap-btp-environment/CloudFoundry/versions.tf diff --git a/sample-setup/basic-setup/directory-setup/main.tf b/sample-setup/basic-setup/directory-setup/main.tf index d442271..7b4ba45 100644 --- a/sample-setup/basic-setup/directory-setup/main.tf +++ b/sample-setup/basic-setup/directory-setup/main.tf @@ -1,6 +1,8 @@ module "directory" { - source = "../../modules/base-directory-setup" - for_each = var.directory_inputs + source = "../../modules/base-directory-setup" + + for_each = var.directory_inputs + business_unit = each.value.business_unit costcenter = each.value.costcenter directory_contacts = each.value.directory_contacts diff --git a/sample-setup/basic-setup/directory-setup/stack.tm.hcl b/sample-setup/basic-setup/directory-setup/stack.tm.hcl deleted file mode 100644 index 245fb79..0000000 --- a/sample-setup/basic-setup/directory-setup/stack.tm.hcl +++ /dev/null @@ -1,6 +0,0 @@ -stack { - name = "directory-setup" - description = "Basic setup of a directory structure on SAP BTP" - id = "d749e4a0-6673-43b9-a383-98dc3aa04478" - tags = ["basic", "directory"] -} diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md index bff837c..082c8b6 100644 --- a/sample-setup/basic-setup/subaccount-setup/README.md +++ b/sample-setup/basic-setup/subaccount-setup/README.md @@ -1,3 +1,7 @@ # Setup of a Subaccount -Basic setup of a subaccount. Every subaccount is created seperately +- Basic setup of a subaccount. Every subaccount is created seperately +- Naming Conventions and Labels +- Validation of Geo Region and Subaccount region +- Default Setup of custom IdP +- Provision CF env (optional) diff --git a/sample-setup/basic-setup/subaccount-setup/main.tf b/sample-setup/basic-setup/subaccount-setup/main.tf index 33bbc57..cad0cfc 100644 --- a/sample-setup/basic-setup/subaccount-setup/main.tf +++ b/sample-setup/basic-setup/subaccount-setup/main.tf @@ -18,6 +18,7 @@ locals { } } +data "btp_globalaccount" "this" {} module "subaccount_namings" { source = "../../modules/sap-btp-naming-conventions-subaccount" @@ -36,3 +37,22 @@ resource "btp_subaccount" "self" { usage = module.subaccount_namings.subaccount_usage labels = module.subaccount_namings.subaccount_labels } + +resource "btp_subaccount_trust_configuration" "custom_idp" { + subaccount_id = btp_subaccount.self.id + identity_provider = var.custom_indentity_provider + name = "default-corp-custom-idp" + description = "Default Custom IdP of Corporate" + auto_create_shadow_users = true + available_for_user_logon = true +} + +module "cf_environment" { + source = "../../modules/sap-btp-environment/CloudFoundry" + + count = var.provision_cf_environment ? 1 : 0 + + subaccount_id = btp_subaccount.self.id + instance_name = module.subaccount_namings.cloudfoundry_org_name + cf_org_name = module.subaccount_namings.cloudfoundry_org_name +} diff --git a/sample-setup/basic-setup/subaccount-setup/outputs.tf b/sample-setup/basic-setup/subaccount-setup/outputs.tf index 3a5c93a..5c18aef 100644 --- a/sample-setup/basic-setup/subaccount-setup/outputs.tf +++ b/sample-setup/basic-setup/subaccount-setup/outputs.tf @@ -1,9 +1,14 @@ -output "subaccount_id" { - value = btp_subaccount.self.id - description = "Technical ID of the subaccount" +output "subaccount_url" { + value = "https://emea.cockpit.btp.cloud.sap/cockpit/#globalaccount/${data.btp_globalaccount.this.id}/subaccount/${btp_subaccount.project_subaccount.id}" + description = "The URL to the provisioned subaccount on SAP BTP" } -output "subaccount_name" { - value = btp_subaccount.self.name - description = "The name of the subaccount" +output "cf_api_url" { + value = module.cf_environment.cf_api_url + description = "The Cloud Foundry API URL" +} + +output "cf_org_id" { + value = module.cf_environment.cf_org_id + description = "The Cloud Foundry org ID" } diff --git a/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl b/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl deleted file mode 100644 index f257d72..0000000 --- a/sample-setup/basic-setup/subaccount-setup/stack.tm.hcl +++ /dev/null @@ -1,7 +0,0 @@ -stack { - name = "subaccount-setup" - description = "Basic Setup of a subaccount on SAP BTP" - id = "58708cca-3217-4730-8fe3-532238e90796" - tags = ["basic", "subaccount"] - after = ["tag:basic:directory"] -} diff --git a/sample-setup/basic-setup/subaccount-setup/variables.tf b/sample-setup/basic-setup/subaccount-setup/variables.tf index a803a5f..b5f483d 100644 --- a/sample-setup/basic-setup/subaccount-setup/variables.tf +++ b/sample-setup/basic-setup/subaccount-setup/variables.tf @@ -59,3 +59,14 @@ variable "parent_id" { description = "ID of the parent directory" default = null } + +variable "custom_indentity_provider" { + type = string + description = "Custom IdP to be used for subaccount" +} + +variable "provision_cf_environment" { + type = bool + description = "Provision Cloud Foundry environment in subaccount" + default = true +} diff --git a/sample-setup/modules/base-directory-setup/README.md b/sample-setup/modules/base-directory-setup/README.md index ef10a84..ce840ef 100644 --- a/sample-setup/modules/base-directory-setup/README.md +++ b/sample-setup/modules/base-directory-setup/README.md @@ -1,3 +1,7 @@ +# SAP BTP - Directory Setup + +This module encapsulates the creation of a directory on SAP BTP following standardized naming conventions. + ## Requirements | Name | Version | diff --git a/sample-setup/modules/sap-btp-environment/CloudFoundry/README.md b/sample-setup/modules/sap-btp-environment/CloudFoundry/README.md new file mode 100644 index 0000000..ad4a0c2 --- /dev/null +++ b/sample-setup/modules/sap-btp-environment/CloudFoundry/README.md @@ -0,0 +1,45 @@ +# SAP BTP - Environment Setup + +This module encapsulates the creation of a Cloud Foundry environment in a subaccounton SAP BTP. + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | +| [btp](#requirement\_btp) | >= 1.11.0 | + +## Providers + +| Name | Version | +|------|---------| +| [btp](#provider\_btp) | >= 1.11.0 | +| [null](#provider\_null) | n/a | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [btp_subaccount_environment_instance.self](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_environment_instance) | resource | +| [null_resource.cache_target_environment](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | +| [btp_subaccount_environments.all](https://registry.terraform.io/providers/SAP/btp/latest/docs/data-sources/subaccount_environments) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [cf\_org\_name](#input\_cf\_org\_name) | Name of the Cloud Foundry org. | `string` | n/a | yes | +| [instance\_name](#input\_instance\_name) | Name of the Cloud Foundry environment instance. | `string` | n/a | yes | +| [plan\_name](#input\_plan\_name) | Desired service plan for the Cloud Foundry environment instance. | `string` | `"standard"` | no | +| [subaccount\_id](#input\_subaccount\_id) | ID of the subaccount where the Cloud Foundry environment will be created. | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [cf\_api\_url](#output\_cf\_api\_url) | The Cloud Foundry API URL | +| [cf\_org\_id](#output\_cf\_org\_id) | The Cloud Foundry org ID | diff --git a/sample-setup/modules/sap-btp-environment/CloudFoundry/main.tf b/sample-setup/modules/sap-btp-environment/CloudFoundry/main.tf new file mode 100644 index 0000000..0d9ccaf --- /dev/null +++ b/sample-setup/modules/sap-btp-environment/CloudFoundry/main.tf @@ -0,0 +1,26 @@ +data "btp_subaccount_environments" "all" { + subaccount_id = var.subaccount_id +} + +resource "null_resource" "cache_target_environment" { + triggers = { + label = [for env in data.btp_subaccount_environments.all.values : env if env.service_name == "cloudfoundry" && env.environment_type == "cloudfoundry"][0].landscape_label + } + + lifecycle { + ignore_changes = all + } +} + +resource "btp_subaccount_environment_instance" "self" { + subaccount_id = var.subaccount_id + name = var.instance_name + environment_type = "cloudfoundry" + service_name = "cloudfoundry" + plan_name = var.plan_name + landscape_label = null_resource.cache_target_environment.triggers.label + + parameters = jsonencode({ + instance_name = var.cf_org_name + }) +} diff --git a/sample-setup/modules/sap-btp-environment/CloudFoundry/outputs.tf b/sample-setup/modules/sap-btp-environment/CloudFoundry/outputs.tf new file mode 100644 index 0000000..36140e8 --- /dev/null +++ b/sample-setup/modules/sap-btp-environment/CloudFoundry/outputs.tf @@ -0,0 +1,9 @@ +output "cf_api_url" { + value = jsondecode(btp_subaccount_environment_instance.self.labels)["API Endpoint"] + description = "The Cloud Foundry API URL" +} + +output "cf_org_id" { + value = jsondecode(btp_subaccount_environment_instance.self.labels)["Org ID"] + description = "The Cloud Foundry org ID" +} diff --git a/sample-setup/modules/sap-btp-environment/CloudFoundry/variables.tf b/sample-setup/modules/sap-btp-environment/CloudFoundry/variables.tf new file mode 100644 index 0000000..5500b45 --- /dev/null +++ b/sample-setup/modules/sap-btp-environment/CloudFoundry/variables.tf @@ -0,0 +1,29 @@ +variable "subaccount_id" { + type = string + description = "ID of the subaccount where the Cloud Foundry environment will be created." +} +variable "instance_name" { + type = string + description = "Name of the Cloud Foundry environment instance." + + validation { + condition = can(regex("^[a-zA-Z0-9_\\-\\.]{1,32}$", var.instance_name)) + error_message = "Please provide a valid instance name (^[a-zA-Z0-9_\\-\\.]{1,32})." + } +} + +variable "plan_name" { + type = string + description = "Desired service plan for the Cloud Foundry environment instance." + default = "standard" +} + +variable "cf_org_name" { + type = string + description = "Name of the Cloud Foundry org." + + validation { + condition = can(regex("^.{1,255}$", var.cf_org_name)) + error_message = "The Cloud Foundry org name must not be emtpy and not exceed 255 characters." + } +} diff --git a/sample-setup/modules/sap-btp-environment/CloudFoundry/versions.tf b/sample-setup/modules/sap-btp-environment/CloudFoundry/versions.tf new file mode 100644 index 0000000..9bbde7b --- /dev/null +++ b/sample-setup/modules/sap-btp-environment/CloudFoundry/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.11" + required_providers { + btp = { + source = "SAP/btp" + version = ">= 1.11.0" + } + } +} diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/README.md b/sample-setup/modules/sap-btp-naming-conventions-directory/README.md index 097f2b0..1ef08ee 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-directory/README.md +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/README.md @@ -1,4 +1,4 @@ -# SAP BTP - Naming module +# SAP BTP - Naming Conventions for a Directory This module encapsulates the naming conventions for SAP BTP directories and the labels that can be attached to some resources on SAP BTP. diff --git a/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md b/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md index ceeb4f7..5f498a1 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/README.md @@ -1,4 +1,4 @@ -# SAP BTP - Naming module +# SAP BTP - Naming Conventions for a Subaccount This module encapsulates the naming conventions for SAP BTP subaccounts and the labels that can be attached to some resources on SAP BTP. From f2fd128b653dd243c68b19bd77ff9201f5cf405b Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 15 Apr 2025 15:42:13 +0200 Subject: [PATCH 10/15] feat: enhancements of subaccount setup --- sample-setup/README.md | 15 ++--------- .../subaccount-setup/.terraform.lock.hcl | 19 ++++++++++++++ .../basic-setup/subaccount-setup/README.md | 1 + .../basic-setup/subaccount-setup/main.tf | 22 ++++++++++++++++ .../basic-setup/subaccount-setup/outputs.tf | 6 ++--- .../basic-setup/subaccount-setup/variables.tf | 6 +++++ .../main.tf | 12 ++++----- .../main.tf | 2 +- .../variables.tf | 2 +- .../main.tf | 25 +++++++++++++++++++ .../outputs.tf | 4 +++ .../variables.tf | 12 +++++++++ .../versions.tf | 3 +++ 13 files changed, 105 insertions(+), 24 deletions(-) create mode 100644 sample-setup/modules/sap-btp-subaccount-default-entitlements/main.tf create mode 100644 sample-setup/modules/sap-btp-subaccount-default-entitlements/outputs.tf create mode 100644 sample-setup/modules/sap-btp-subaccount-default-entitlements/variables.tf create mode 100644 sample-setup/modules/sap-btp-subaccount-default-entitlements/versions.tf diff --git a/sample-setup/README.md b/sample-setup/README.md index e2c05db..3b2b7aa 100644 --- a/sample-setup/README.md +++ b/sample-setup/README.md @@ -2,28 +2,17 @@ ## Paradigms -We follow the paradigms of a simpel and clear Terraform configuration as laid out in the [Simple, Clear, Maintainable](https://rosesecurity.dev/blog/2024/11/24/terraform-proverbs) blog post of the [Development Log](https://rosesecurity.dev/) namely: +We follow the paradigms of a simpel and clear Terraform configuration as laid out in the [Simple, Clear, Maintainable](https://rosesecurity.dev/blog/2024/11/24/terraform-proverbs) blog post of the [Development Log](https://rosesecurity.dev/) especially: - Clear is better than clever. -- Version everything. - Modules should be reusable, not rigid. -- State is a liability; manage it wisely. -- Every apply should be predictable. - Outputs are for sharing. -- Tags are free; use them liberally. -- Understanding count versus for_each is essential. +- Labels are free; use them liberally. - Descriptions are for users. - Use positive variable names to avoid double negatives. -- Null is not the same as nothing. -- Prefer a single object over many related variables. -- Terraform is declarative; trust it to converge. -- Never output secrets. -- Upgrade deliberately, not impulsively. - Name with underscores, not dashes. - Using locals makes code descriptive and maintainable. -These paradigms will be reflected in the code samples provided in this repository and we encourage you to follow them in your own Terraform code. - ## Naming Conventions and Tagging Ensuring naming conventions is one import aspect when provisioing and managing your SAP BTP account. We will align our samples in accordance to the [Naming Conventions for SAP BTP Accounts](https://help.sap.com/docs/btp/btp-admin-guide/naming-conventions-for-sap-btp-accounts). diff --git a/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl b/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl index f949e55..6451737 100644 --- a/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl +++ b/sample-setup/basic-setup/subaccount-setup/.terraform.lock.hcl @@ -1,6 +1,25 @@ # This file is maintained automatically by "terraform init". # Manual edits may be lost in future updates. +provider "registry.terraform.io/hashicorp/null" { + version = "3.2.3" + hashes = [ + "h1:I0Um8UkrMUb81Fxq/dxbr3HLP2cecTH2WMJiwKSrwQY=", + "zh:22d062e5278d872fe7aed834f5577ba0a5afe34a3bdac2b81f828d8d3e6706d2", + "zh:23dead00493ad863729495dc212fd6c29b8293e707b055ce5ba21ee453ce552d", + "zh:28299accf21763ca1ca144d8f660688d7c2ad0b105b7202554ca60b02a3856d3", + "zh:55c9e8a9ac25a7652df8c51a8a9a422bd67d784061b1de2dc9fe6c3cb4e77f2f", + "zh:756586535d11698a216291c06b9ed8a5cc6a4ec43eee1ee09ecd5c6a9e297ac1", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:9d5eea62fdb587eeb96a8c4d782459f4e6b73baeece4d04b4a40e44faaee9301", + "zh:a6355f596a3fb8fc85c2fb054ab14e722991533f87f928e7169a486462c74670", + "zh:b5a65a789cff4ada58a5baffc76cb9767dc26ec6b45c00d2ec8b1b027f6db4ed", + "zh:db5ab669cf11d0e9f81dc380a6fdfcac437aea3d69109c7aef1a5426639d2d65", + "zh:de655d251c470197bcbb5ac45d289595295acb8f829f6c781d4a75c8c8b7c7dd", + "zh:f5c68199f2e6076bce92a12230434782bf768103a427e9bb9abee99b116af7b5", + ] +} + provider "registry.terraform.io/hashicorp/random" { version = "3.7.1" hashes = [ diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md index 082c8b6..1960086 100644 --- a/sample-setup/basic-setup/subaccount-setup/README.md +++ b/sample-setup/basic-setup/subaccount-setup/README.md @@ -5,3 +5,4 @@ - Validation of Geo Region and Subaccount region - Default Setup of custom IdP - Provision CF env (optional) +- Execute default plus à la carte entitlements diff --git a/sample-setup/basic-setup/subaccount-setup/main.tf b/sample-setup/basic-setup/subaccount-setup/main.tf index cad0cfc..12bc390 100644 --- a/sample-setup/basic-setup/subaccount-setup/main.tf +++ b/sample-setup/basic-setup/subaccount-setup/main.tf @@ -47,6 +47,28 @@ resource "btp_subaccount_trust_configuration" "custom_idp" { available_for_user_logon = true } +module "subaccount_default_entitlements" { + source = "../../modules/sap-btp-subaccount-default-entitlements" + + stage = var.stage +} + +locals { + finalized_entitlements = var.additional_entitlements == {} ? module.subaccount_default_entitlements.default_entitlements_for_stage : merge( + module.subaccount_default_entitlements.default_entitlements_for_stage, + var.additional_entitlements + ) +} + +module "sap_btp_entitlements" { + + source = "aydin-ozcan/sap-btp-entitlements/btp" + version = "~> 1.0.1" + + subaccount = btp_subaccount.self.id + entitlements = local.finalized_entitlements +} + module "cf_environment" { source = "../../modules/sap-btp-environment/CloudFoundry" diff --git a/sample-setup/basic-setup/subaccount-setup/outputs.tf b/sample-setup/basic-setup/subaccount-setup/outputs.tf index 5c18aef..136e2c4 100644 --- a/sample-setup/basic-setup/subaccount-setup/outputs.tf +++ b/sample-setup/basic-setup/subaccount-setup/outputs.tf @@ -1,14 +1,14 @@ output "subaccount_url" { - value = "https://emea.cockpit.btp.cloud.sap/cockpit/#globalaccount/${data.btp_globalaccount.this.id}/subaccount/${btp_subaccount.project_subaccount.id}" + value = "https://emea.cockpit.btp.cloud.sap/cockpit/#globalaccount/${data.btp_globalaccount.this.id}/subaccount/${btp_subaccount.self.id}/overview" description = "The URL to the provisioned subaccount on SAP BTP" } output "cf_api_url" { - value = module.cf_environment.cf_api_url + value = var.provision_cf_environment ? module.cf_environment[0].cf_api_url : "No Cloud Foundry environment was requested to be provisioned" description = "The Cloud Foundry API URL" } output "cf_org_id" { - value = module.cf_environment.cf_org_id + value = var.provision_cf_environment ? module.cf_environment[0].cf_org_id : "No Cloud Foundry environment was requested to be provisioned" description = "The Cloud Foundry org ID" } diff --git a/sample-setup/basic-setup/subaccount-setup/variables.tf b/sample-setup/basic-setup/subaccount-setup/variables.tf index b5f483d..0b29175 100644 --- a/sample-setup/basic-setup/subaccount-setup/variables.tf +++ b/sample-setup/basic-setup/subaccount-setup/variables.tf @@ -65,6 +65,12 @@ variable "custom_indentity_provider" { description = "Custom IdP to be used for subaccount" } +variable "additional_entitlements" { + type = map(list(string)) + description = "Entitlements to be provided in addition to the standard entitlements" + default = {} +} + variable "provision_cf_environment" { type = bool description = "Provision Cloud Foundry environment in subaccount" diff --git a/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf b/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf index 0c5a021..8443281 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-directory/main.tf @@ -1,7 +1,7 @@ locals { - costcenter_label_name = "Costcenter" - directory_contact_label_name = "Directory responsibles" - managedby_label_name = "Managed by" + costcenter_label_name = "Costcenter" + directory_contact_label_name = "Directory responsibles" + managedby_label_name = "Managed by" directory_name = var.region == null ? var.business_unit : format( "%s%s%s", @@ -19,9 +19,9 @@ locals { var.region ) - costcenter_label_name_formatted = var.label_name_case == "lower" ? lower(local.costcenter_label_name) : var.label_name_case == "title" ? title(local.costcenter_label_name) : upper(local.costcenter_label_name) - directory_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.directory_contact_label_name) : var.label_name_case == "title" ? title(local.directory_contact_label_name) : upper(local.directory_contact_label_name) - managedby_label_name_formatted = var.label_name_case == "lower" ? lower(local.managedby_label_name) : var.label_name_case == "title" ? title(local.managedby_label_name) : upper(local.managedby_label_name) + costcenter_label_name_formatted = var.label_name_case == "lower" ? lower(local.costcenter_label_name) : var.label_name_case == "title" ? title(local.costcenter_label_name) : upper(local.costcenter_label_name) + directory_contact_label_name_formatted = var.label_name_case == "lower" ? lower(local.directory_contact_label_name) : var.label_name_case == "title" ? title(local.directory_contact_label_name) : upper(local.directory_contact_label_name) + managedby_label_name_formatted = var.label_name_case == "lower" ? lower(local.managedby_label_name) : var.label_name_case == "title" ? title(local.managedby_label_name) : upper(local.managedby_label_name) costcenter_label_value_formatted = var.label_value_case == "lower" ? lower(var.costcenter) : var.label_value_case == "title" ? title(var.costcenter) : var.label_value_case == "upper" ? upper(var.costcenter) : var.costcenter management_label_value_formatted = var.label_value_case == "lower" ? lower(var.management_tool) : var.label_value_case == "title" ? title(var.management_tool) : var.label_value_case == "upper" ? upper(var.management_tool) : var.management_tool diff --git a/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf index f18cc1a..df37bde 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/main.tf @@ -80,5 +80,5 @@ locals { subaccount_usage = var.stage == "Prod" ? "USED_FOR_PRODUCTION" : "NOT_USED_FOR_PRODUCTION" - cloudfoundry_org_name = local.subaccount_subdomain + cloudfoundry_org_name = substr(local.subaccount_subdomain, 0, 32) } diff --git a/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf b/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf index 4d5e817..a7b4a1e 100644 --- a/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf +++ b/sample-setup/modules/sap-btp-naming-conventions-subaccount/variables.tf @@ -22,7 +22,7 @@ variable "company_name" { Company name to be used for subaccount subdomains. The parameter is optional Default value: `null`. EOT - default = null + default = null } variable "costcenter" { diff --git a/sample-setup/modules/sap-btp-subaccount-default-entitlements/main.tf b/sample-setup/modules/sap-btp-subaccount-default-entitlements/main.tf new file mode 100644 index 0000000..4acd7c0 --- /dev/null +++ b/sample-setup/modules/sap-btp-subaccount-default-entitlements/main.tf @@ -0,0 +1,25 @@ +locals { + default_entitlements = { + "Dev" = { + "alert-notification" = ["standard"], + "auditlog" = ["standard=1"], + "sapappstudio" = ["build-code"], + "xsuaa" = ["application"] + }, + "Test" = { + "alert-notification" = ["standard"], + "auditlog" = ["standard=1"], + "xsuaa" = ["application"] + }, + "Prod" = { + "alert-notification" = ["standard"], + "auditlog" = ["standard=1"], + "xsuaa" = ["application"] + }, + "Shared" = { + "credstore" = ["standard"], + "hana-cloud" = ["hana"], + "hana" = ["hdi-shared"] + } + } +} diff --git a/sample-setup/modules/sap-btp-subaccount-default-entitlements/outputs.tf b/sample-setup/modules/sap-btp-subaccount-default-entitlements/outputs.tf new file mode 100644 index 0000000..847f890 --- /dev/null +++ b/sample-setup/modules/sap-btp-subaccount-default-entitlements/outputs.tf @@ -0,0 +1,4 @@ +output "default_entitlements_for_stage" { + value = local.default_entitlements[var.stage] + description = "Default entitlements for stage specified by the stage variable" +} diff --git a/sample-setup/modules/sap-btp-subaccount-default-entitlements/variables.tf b/sample-setup/modules/sap-btp-subaccount-default-entitlements/variables.tf new file mode 100644 index 0000000..ddbe7be --- /dev/null +++ b/sample-setup/modules/sap-btp-subaccount-default-entitlements/variables.tf @@ -0,0 +1,12 @@ +variable "stage" { + type = string + description = <<-EOT + Stage of the environment to be setup up. + Possible values: `Dev`, `Test`, `Prod`, `Shared`. + EOT + + validation { + condition = contains(["Dev", "Test", "Prod", "Shared"], var.stage) + error_message = "Stage must be one of the following: `Dev`, `Test`, `Prod`, `Shared`." + } +} diff --git a/sample-setup/modules/sap-btp-subaccount-default-entitlements/versions.tf b/sample-setup/modules/sap-btp-subaccount-default-entitlements/versions.tf new file mode 100644 index 0000000..2dc2c98 --- /dev/null +++ b/sample-setup/modules/sap-btp-subaccount-default-entitlements/versions.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 1.11" +} From 045080be552b4cd67c7a6a5a9a12ac595475a750 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 15 Apr 2025 15:42:54 +0200 Subject: [PATCH 11/15] update .gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 4d8e93c..75f01ae 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,11 @@ override.tf.json .terraformrc terraform.rc +# Ignore typical plan output files +*.tfplan +*.out +*.plan + .DS_Store *.env From 1ef0b514f2e64eaa81ce7f96495ae046007cf682 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 15 Apr 2025 16:01:12 +0200 Subject: [PATCH 12/15] docs: update READMEs --- sample-setup/README.md | 12 ++++++++++-- .../basic-setup/directory-setup/README.md | 19 +++++++++++-------- .../basic-setup/subaccount-setup/README.md | 19 +++++++++++++++++++ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/sample-setup/README.md b/sample-setup/README.md index 3b2b7aa..aa9639f 100644 --- a/sample-setup/README.md +++ b/sample-setup/README.md @@ -17,6 +17,14 @@ We follow the paradigms of a simpel and clear Terraform configuration as laid ou Ensuring naming conventions is one import aspect when provisioing and managing your SAP BTP account. We will align our samples in accordance to the [Naming Conventions for SAP BTP Accounts](https://help.sap.com/docs/btp/btp-admin-guide/naming-conventions-for-sap-btp-accounts). -To ensure consistent naming of your resources, we encapsulate the guidlines in a dedicated module. +To ensure consistent naming of your resources, we encapsulate the guidlines in dedicated module. Besides the naming we will also include the labels that can be attached to some resources on SAP BTP. -Besides the naming we will also include the labels that can be attached to some resources on SAP BTP. +We have created one module for the level of the [directory](./modules/sap-btp-naming-conventions-directory/README.md) and one for the level of the [subaccount](./modules/sap-btp-naming-conventions-subaccount/README.md). + +## Setup of Directories + +The setup of directories as a structuring element for the subaccounts is configured in the folder `basic-setup/directory-setup`. The Details about the setup are described in the [README.md](./basic-setup/directory-setup/README.md) file. + +## Setup of Subaccounts + +The setup of subaccounts is configured in the folder `basic-setup/subaccount-setup`. The Details about the setup are described in the [README.md](./basic-setup/subaccount-setup/README.md) file. diff --git a/sample-setup/basic-setup/directory-setup/README.md b/sample-setup/basic-setup/directory-setup/README.md index 15fcaf1..ce81980 100644 --- a/sample-setup/basic-setup/directory-setup/README.md +++ b/sample-setup/basic-setup/directory-setup/README.md @@ -5,18 +5,21 @@ - We assume that we use the directories as structuring element for the subaccounts i.e., un an unmanaged fashion. - We assume that we do the directory setup in one run for all involved departments. -## Design Decsion +## Design Decsions -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 directory. The changes on directory level are probably a rare sceanrio compared to the subaccounts (depending on their stage) and we therefore want to avoid side effects as well as lengthy state refreshes. +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 sceanrio 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 seperate. ## Directory Setup -We will create directories for the following departments: +The creation of the directories is steered by a map of objects that define the business data relevant for a directory namely: -- HR -- Sales -- Finance +- business_unit (`string`): The business unit that owns the directory e.g., HR, IT, Finance +- costcenter (`string`): Cost center of the business unit +- directory_contacts (`list(string)`): List of email addresses representing the directory contacts +- region (`string`): The geographical region of the directory e.g., EMEA -In addition we create a directory for shared services. +This is input data is reflected by the variables defined in the [variables.tf](./variables.tf) file -All directories are located in EMEA. +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). + +After provisioning the output summarizes the executed setup as given by the [outputs.tf](./outputs.tf) file. diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md index 1960086..a0610ab 100644 --- a/sample-setup/basic-setup/subaccount-setup/README.md +++ b/sample-setup/basic-setup/subaccount-setup/README.md @@ -1,8 +1,27 @@ # Setup of a Subaccount +## Assumptions + +- We assume that we use the directories as structuring element for the subaccounts i.e., un an unmanaged fashion. +- We assume that we do the directory setup in one run for all involved departments. + +## Design Decsions + +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 directory. The changes on directory level are probably a rare sceanrio compared to the subaccounts (depending on their stage) and we therefore want to avoid side effects as well as lengthy state refreshes. + +## Subaccount Setup + - Basic setup of a subaccount. Every subaccount is created seperately - Naming Conventions and Labels - Validation of Geo Region and Subaccount region - Default Setup of custom IdP - Provision CF env (optional) - Execute default plus à la carte entitlements + +### Validations for Geographies and BTP Regions + +### Trust Configuration for Custom IdP + +### Setup of Entitlements + +### Setup of Cloud Foundry Environment From c9e72eeceb880056ccd9ca4a01cf38a710365696 Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Tue, 15 Apr 2025 16:22:26 +0200 Subject: [PATCH 13/15] docs: refinement of docs --- .../basic-setup/subaccount-setup/README.md | 42 ++++++++++++++----- .../README.md | 33 +++++++++++++++ 2 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 sample-setup/modules/sap-btp-subaccount-default-entitlements/README.md diff --git a/sample-setup/basic-setup/subaccount-setup/README.md b/sample-setup/basic-setup/subaccount-setup/README.md index a0610ab..e528ee6 100644 --- a/sample-setup/basic-setup/subaccount-setup/README.md +++ b/sample-setup/basic-setup/subaccount-setup/README.md @@ -2,26 +2,48 @@ ## Assumptions -- We assume that we use the directories as structuring element for the subaccounts i.e., un an unmanaged fashion. -- We assume that we do the directory setup in one run for all involved departments. +- We assume a bsaic setup of a subaccount is executed by the platform team/ SAP BTP administrator team +- We assume that the responsibility of the platform team is restricted to a basic setup of a subacount leaving out app subscriptions and service instance creation. ## Design Decsions -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 directory. The changes on directory level are probably a rare sceanrio compared to the subaccounts (depending on their stage) and we therefore want to avoid side effects as well as lengthy state refreshes. +To keep the Terraform state files clearly seperated the setup is done per subaccount i.e. per stage. ## Subaccount Setup -- Basic setup of a subaccount. Every subaccount is created seperately -- Naming Conventions and Labels -- Validation of Geo Region and Subaccount region -- Default Setup of custom IdP -- Provision CF env (optional) -- Execute default plus à la carte entitlements +The setup of the subaccount comprises: + +- The setup of a subaccount in accordance to the naming conventions and labeling startegy of the company +- The trust configuration to a custom IdP is configured by default. +- Default entitlements are added depending on the stage. In addition the requesting team can add additional project specific entitlements ("à la carte entitlements") +- Optionally a Cloud Foundry Environment is created + +### Naming Conventions and Labels + +The naming conventions and labels are centralized in the module [sap-btp-naming-conventions-subaccount](../../modules/sap-btp-naming-conventions-subaccount/README.md). The names and labels are drived based on input variables defined in the [variables.tf](./variables.tf) file. ### Validations for Geographies and BTP Regions -### Trust Configuration for Custom IdP +According to the SAP BTP Administrators Guide one part of the naming is the geographical region. To ensure that this region fits to the subaccount region, a validation is implemented in the [variables.tf](./variables.tf) file. The validation checks if the region of the subaccount is part of the geographical region. The geographical regions are defined in a local variable sdefined in the [main.tf](main.tf) file. ### Setup of Entitlements +The setup of entitlements is split into two parts: + +- The default entitlements that are defined per stage and sourced from the module [](../../modules/sap-btp-subaccount-default-entitlements/README.md) +- Optional additional entitlements that might be needed due to project specific requirements. These entitlements are defined in the [variables.tf](./variables.tf) file + +The configuration merges the two files and adds the entitlements to the subaccount. + ### Setup of Cloud Foundry Environment + +The setup of a Cloud Foundry environment is optional. The caller can decide if a Cloud Foundry environment is required or not e.g. when setting up a shared subaccount. The boolean variable is `provision_cf_environment` in the [variables.tf](./variables.tf) file. + + +### Output + +The output defined in the [outputs.tf](./outputs.tf) file returns the main information relevant for the development team namely: + +- a link to the subaccount +- The ID of the Cloud Foundry org +- The API endpoint of the Cloud Foundry environment diff --git a/sample-setup/modules/sap-btp-subaccount-default-entitlements/README.md b/sample-setup/modules/sap-btp-subaccount-default-entitlements/README.md new file mode 100644 index 0000000..9ac8d35 --- /dev/null +++ b/sample-setup/modules/sap-btp-subaccount-default-entitlements/README.md @@ -0,0 +1,33 @@ +# SAP BTP - Default Subaccount Entitlements + +This module encapsulates the default entitlements for SAP BTP subaccounts. It distinguishes between the different stages of the environment (Dev, Test, Prod, Shared) and provides a default set of entitlements for each stage. + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.11 | + +## Providers + +No providers. + +## Modules + +No modules. + +## Resources + +No resources. + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [stage](#input\_stage) | Stage of the environment to be setup up.
Possible values: `Dev`, `Test`, `Prod`, `Shared`. | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [default\_entitlements\_for\_stage](#output\_default\_entitlements\_for\_stage) | Default entitlements for stage specified by the stage variable | From 74ec9d6f1110ce5487fe8220009a9f6f7eaec51c Mon Sep 17 00:00:00 2001 From: Christian Lechner <22294087+lechnerc77@users.noreply.github.com.> Date: Wed, 16 Apr 2025 11:56:42 +0200 Subject: [PATCH 14/15] docs: update --- assets/base-directory-output.png | Bin 0 -> 27971 bytes {sample-setup => sample-setups}/README.md | 0 .../directory-setup/.terraform.lock.hcl | 0 .../basic-setup/directory-setup/README.md | 10 ++++++++-- .../basic-setup/directory-setup/main.tf | 0 .../basic-setup/directory-setup/outputs.tf | 0 .../basic-setup/directory-setup/provider.tf | 0 .../basic-setup/directory-setup/variables.tf | 0 .../subaccount-setup/.terraform.lock.hcl | 0 .../basic-setup/subaccount-setup/README.md | 11 +++++++++++ .../basic-setup/subaccount-setup/main.tf | 0 .../basic-setup/subaccount-setup/outputs.tf | 0 .../basic-setup/subaccount-setup/provider.tf | 0 .../basic-setup/subaccount-setup/variables.tf | 0 .../base-directory-setup/.terraform.lock.hcl | 0 .../modules/base-directory-setup/README.md | 0 .../modules/base-directory-setup/main.tf | 0 .../modules/base-directory-setup/outputs.tf | 0 .../modules/base-directory-setup/variables.tf | 0 .../modules/base-directory-setup/versions.tf | 0 .../sap-btp-environment/CloudFoundry/README.md | 0 .../sap-btp-environment/CloudFoundry/main.tf | 0 .../sap-btp-environment/CloudFoundry/outputs.tf | 0 .../CloudFoundry/variables.tf | 0 .../CloudFoundry/versions.tf | 0 .../README.md | 0 .../main.tf | 0 .../outputs.tf | 0 .../variables.tf | 0 .../versions.tf | 0 .../README.md | 0 .../main.tf | 0 .../outputs.tf | 0 .../variables.tf | 0 .../versions.tf | 0 .../README.md | 0 .../main.tf | 0 .../outputs.tf | 0 .../variables.tf | 0 .../versions.tf | 0 40 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 assets/base-directory-output.png rename {sample-setup => sample-setups}/README.md (100%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/.terraform.lock.hcl (100%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/README.md (83%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/main.tf (100%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/outputs.tf (100%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/provider.tf (100%) rename {sample-setup => sample-setups}/basic-setup/directory-setup/variables.tf (100%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/.terraform.lock.hcl (100%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/README.md (78%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/main.tf (100%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/outputs.tf (100%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/provider.tf (100%) rename {sample-setup => sample-setups}/basic-setup/subaccount-setup/variables.tf (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/.terraform.lock.hcl (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/README.md (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/main.tf (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/outputs.tf (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/variables.tf (100%) rename {sample-setup => sample-setups}/modules/base-directory-setup/versions.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-environment/CloudFoundry/README.md (100%) rename {sample-setup => sample-setups}/modules/sap-btp-environment/CloudFoundry/main.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-environment/CloudFoundry/outputs.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-environment/CloudFoundry/variables.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-environment/CloudFoundry/versions.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-directory/README.md (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-directory/main.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-directory/outputs.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-directory/variables.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-directory/versions.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-subaccount/README.md (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-subaccount/main.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-subaccount/outputs.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-subaccount/variables.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-naming-conventions-subaccount/versions.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-subaccount-default-entitlements/README.md (100%) rename {sample-setup => sample-setups}/modules/sap-btp-subaccount-default-entitlements/main.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-subaccount-default-entitlements/outputs.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-subaccount-default-entitlements/variables.tf (100%) rename {sample-setup => sample-setups}/modules/sap-btp-subaccount-default-entitlements/versions.tf (100%) diff --git a/assets/base-directory-output.png b/assets/base-directory-output.png new file mode 100644 index 0000000000000000000000000000000000000000..d366016289e8c3f986f6c601860e5b8c828a53a8 GIT binary patch literal 27971 zcmd43Wmg)-~@Mf2o^M0aCe8d$xg1l$35O3 z@O1wKU|`7aB}Em%z#sr%VBm0YFrXtTNtkM&AN0*d zMC9L#h>*%V*qWGI8H0h*##zS#r6Cp2#O0j&I7O@8MEH@yDHuh$U|Uea(QSyIeYc*& z4aNneV|}Ydd+_@d6(w0!H90I!d5Z`U9#Al^j%d#IwN^Z;5{R_AZfKGUl;7k`lCtcS z>aUI(G}Cjj;g^323dx4SH)k*ZiXYbZMX|f+*{eX)D@*6bqn28ZwePX-y=z5db@~zy z&#mUmCi`2;+T`7`U$F&NuwG>A^UZm@Ke25ZjOo_BW0bJ?&$txUyFJGeS*X1z4jYn3 zq1PqW^)}M8@B10{*bfY0Z6A`2On8_U$rj$H+JAWizJY`$oC3!xB6@u3tGnA~8>xbs zKF^q7053ru`6*8_0W*s

e)KKhtMO=;UX|iTafbihd(<-DW8c``TBvc0J{`3Rtt2 z0BP;C`a5TB-S;C*D7#oT{GrW!KfJU2?}=$wn~q1C4w5hAJyC%X;$o#s` zS-XH1JC+XNJ4PqVZr4b6ZzN#SW{nF zm$fA-HqSE-IuDyC^hTGBFN`>9g_QI1THXaN|C=dap`1w;06c0#viB&TFP0+z6GnxJ zR&rgV=jS0_-WL5e9+o@Jx^Hgde?`{ia8hX<_}x z$Vokay#M6eilJCwa~2sSYs10(0`|5)bU z>UFy*Kt^-LIB{@A-u82oD96DKO>1O0xHdgnXt5~00Hy6Kr*$U`eJ_;ABSm?Rg%@+S za8F6?G9tH~&4@kM^Ii57j5oE1nI@bKF}&%^hrmlf{jNqL&A-b92M%-C9saA5Qt4<* z{0I>aC8m}Uc#G9#fub4Kc%>p|5D+k%9wc%{+P6@Gi$9ow<5#1?ASAEFoYIn&GEsSp z-b)DPSgKW4N{OYVlz~gRdqv&8tTd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$54# z*`?a{Orc-!26TEtaAEZnK5z&qQxLcwc?|W-zD)0dO^J$+T)kiO)`v+Z^0yw_n_Djm z59nctujl;jzmN#thG?2c6DrrWH9+`#?`=2s8!SAK)EtA~ty?x%Z@y zeAC%=eSg#O*|B5>!sY(=4L&Uht<9$nYGr57!+Os9(>-!NOe<7DF3mn=P{L+G=F|St zSHy$P-F%c$=qF9u$Y7T=_Nf#z*cDv%DA!CRhL>|wkOpNgOyoZ03VjXWg(FHqP9xUVHp~_p?fs_U|C@#4i4+tFfFC5(0Y`O<9wdRd*-OxamWa zLY(7G^d=jh6W1j4r+S)4h_U6{HGl@A(ob$TrznxD+`{__K zJ~ozxzTA+nuFjM|#VcsymbxSKFy;n?RwnS)_T(v5O03>1mLi3>S7RN zS-ai#M<>4O#df%m3=8JA^ef%@C^^^CZGm(`R1WkQ6`!|^$*9xRk6s4jY zsg=_Amk1oZEmAlR?7T(V++H+tt4=UH^iNhvX_)I8B9YVhbrbjH%qBP5!-Si0S=E~Z z#Q6q0OH6HZ@|^#T7~C#%f7r-JA%~SOao`^Qeyo*MJT7HpK}2M`Dd#N)bxKcEXJ&qm zj!d07+Eg(6uv2gdy-4ADZn6ai{p%t0yjUpxKB+ZFmt|Nc@DtDejYx%FWg0kb;(t$D z0$}1k$?+w2U}Hi3-_-*LpMxM3nv{`&##cB{l)FGm#QlOSg8c6>fkQ|@kg_34n8L+3 zH>pvjX72lUEe86;teF<6j8#eI3|H<;##&%M%+=))usC61@{K(*pVmy15-I;pN(`86 zbz^nD30hsPI~Jw&{e28}Wt+lN_6&`z?l*QQ(7drpM*O!0?P$KmQbZUS7=y Date: Wed, 16 Apr 2025 16:16:01 +0200 Subject: [PATCH 15/15] docs: fix typos --- .wordlist.txt | 20 ++++++++++++++++++- sample-setups/README.md | 6 +++--- .../basic-setup/directory-setup/README.md | 4 ++-- .../basic-setup/subaccount-setup/README.md | 14 ++++++------- .../CloudFoundry/README.md | 2 +- 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.wordlist.txt b/.wordlist.txt index 42dd981..4060549 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1,4 +1,5 @@ -APIs +API +api autocompletion APIs backend @@ -6,18 +7,26 @@ Backend breakpoint BTP btp +carte CLA CLI CLIs +cloudfoundry +Cloudfoundry CodeQL config Copilot +costcenter +Costcenter customizations DCO dependabot +Dev +dev devcontainer devcontainers dir +EMEA faq Github github @@ -32,8 +41,11 @@ JSON js JS jq +Kyma macOS md +namings +Namings NextSteps OAuth OpenSSF @@ -70,6 +82,12 @@ TOML toolchain UIs UI +Unmanaged +unmanaged +URL +url +uuid +UUID VS workspace workspaces diff --git a/sample-setups/README.md b/sample-setups/README.md index aa9639f..186b3dc 100644 --- a/sample-setups/README.md +++ b/sample-setups/README.md @@ -2,7 +2,7 @@ ## Paradigms -We follow the paradigms of a simpel and clear Terraform configuration as laid out in the [Simple, Clear, Maintainable](https://rosesecurity.dev/blog/2024/11/24/terraform-proverbs) blog post of the [Development Log](https://rosesecurity.dev/) especially: +We follow the paradigms of a simple and clear Terraform configuration as laid out in the [Simple, Clear, Maintainable](https://rosesecurity.dev/blog/2024/11/24/terraform-proverbs) blog post of the [Development Log](https://rosesecurity.dev/) especially: - Clear is better than clever. - Modules should be reusable, not rigid. @@ -15,9 +15,9 @@ We follow the paradigms of a simpel and clear Terraform configuration as laid ou ## Naming Conventions and Tagging -Ensuring naming conventions is one import aspect when provisioing and managing your SAP BTP account. We will align our samples in accordance to the [Naming Conventions for SAP BTP Accounts](https://help.sap.com/docs/btp/btp-admin-guide/naming-conventions-for-sap-btp-accounts). +Ensuring naming conventions is one import aspect when provisioning and managing your SAP BTP account. We will align our samples in accordance to the [Naming Conventions for SAP BTP Accounts](https://help.sap.com/docs/btp/btp-admin-guide/naming-conventions-for-sap-btp-accounts). -To ensure consistent naming of your resources, we encapsulate the guidlines in dedicated module. Besides the naming we will also include the labels that can be attached to some resources on SAP BTP. +To ensure consistent naming of your resources, we encapsulate the guidelines in dedicated module. Besides the naming we will also include the labels that can be attached to some resources on SAP BTP. We have created one module for the level of the [directory](./modules/sap-btp-naming-conventions-directory/README.md) and one for the level of the [subaccount](./modules/sap-btp-naming-conventions-subaccount/README.md). diff --git a/sample-setups/basic-setup/directory-setup/README.md b/sample-setups/basic-setup/directory-setup/README.md index 0c196f9..1d7d952 100644 --- a/sample-setups/basic-setup/directory-setup/README.md +++ b/sample-setups/basic-setup/directory-setup/README.md @@ -2,12 +2,12 @@ ## Assumptions -- We assume that we use the directories as structuring element for the subaccounts i.e., un an unmanaged fashion. +- We assume that we use the directories as structuring element for the subaccounts i.e., in an unmanaged fashion. - We assume that we do the directory setup in one run for all involved departments. ## Design Decisions -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 sceanrio 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 seperate. +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. ## Directory Setup diff --git a/sample-setups/basic-setup/subaccount-setup/README.md b/sample-setups/basic-setup/subaccount-setup/README.md index c190a27..59ee6c9 100644 --- a/sample-setups/basic-setup/subaccount-setup/README.md +++ b/sample-setups/basic-setup/subaccount-setup/README.md @@ -2,29 +2,29 @@ ## Assumptions -- We assume a bsaic setup of a subaccount is executed by the platform team/ SAP BTP administrator team -- We assume that the responsibility of the platform team is restricted to a basic setup of a subacount leaving out app subscriptions and service instance creation. +- We assume a basic setup of a subaccount is executed by the platform team/ SAP BTP administrator team +- We assume that the responsibility of the platform team is restricted to a basic setup of a subaccount leaving out app subscriptions and service instance creation. -## Design Decsions +## Design Decisions -To keep the Terraform state files clearly seperated the setup is done per subaccount i.e. per stage. +To keep the Terraform state files clearly separated the setup is done per subaccount i.e. per stage. ## Subaccount Setup The setup of the subaccount comprises: -- The setup of a subaccount in accordance to the naming conventions and labeling startegy of the company +- The setup of a subaccount in accordance to the naming conventions and labeling strategy of the company - The trust configuration to a custom IdP is configured by default. - Default entitlements are added depending on the stage. In addition the requesting team can add additional project specific entitlements ("à la carte entitlements") - Optionally a Cloud Foundry Environment is created ### Naming Conventions and Labels -The naming conventions and labels are centralized in the module [sap-btp-naming-conventions-subaccount](../../modules/sap-btp-naming-conventions-subaccount/README.md). The names and labels are drived based on input variables defined in the [variables.tf](./variables.tf) file. +The naming conventions and labels are centralized in the module [sap-btp-naming-conventions-subaccount](../../modules/sap-btp-naming-conventions-subaccount/README.md). The names and labels are derived based on input variables defined in the [variables.tf](./variables.tf) file. ### Validations for Geographies and BTP Regions -According to the SAP BTP Administrators Guide one part of the naming is the geographical region. To ensure that this region fits to the subaccount region, a validation is implemented in the [variables.tf](./variables.tf) file. The validation checks if the region of the subaccount is part of the geographical region. The geographical regions are defined in a local variable sdefined in the [main.tf](main.tf) file. +According to the SAP BTP Administrators Guide one part of the naming is the geographical region. To ensure that this region fits to the subaccount region, a validation is implemented in the [variables.tf](./variables.tf) file. The validation checks if the region of the subaccount is part of the geographical region. The geographical regions are defined in a local variables defined in the [main.tf](main.tf) file. ### Setup of Entitlements diff --git a/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md b/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md index ad4a0c2..ceb9464 100644 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md +++ b/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md @@ -1,6 +1,6 @@ # SAP BTP - Environment Setup -This module encapsulates the creation of a Cloud Foundry environment in a subaccounton SAP BTP. +This module encapsulates the creation of a Cloud Foundry environment in a subaccount on SAP BTP. ## Requirements