From 67186aafa422575921f1eaa8a2a3952d44e778d6 Mon Sep 17 00:00:00 2001 From: Rui Nogueira Date: Tue, 25 Jun 2024 07:41:00 +0000 Subject: [PATCH 1/2] update variable names and descriptions --- .../sap_build_code/step1/main.tf | 2 +- .../sap_build_code/step1/outputs.tf | 24 +++++++++---------- .../sap_build_code/step1/variables.tf | 10 ++++---- .../sap_build_code/step2/main.tf | 4 ++-- .../sap_build_code/step2/variables.tf | 8 +++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/released/usecases/services_apps/sap_build_code/step1/main.tf b/released/usecases/services_apps/sap_build_code/step1/main.tf index 664af8fa..7c686e3f 100644 --- a/released/usecases/services_apps/sap_build_code/step1/main.tf +++ b/released/usecases/services_apps/sap_build_code/step1/main.tf @@ -343,7 +343,7 @@ resource "local_file" "output_vars_step1" { cf_org_id = "${jsondecode(btp_subaccount_environment_instance.cf.labels)["Org ID"]}" cf_org_name = "${jsondecode(btp_subaccount_environment_instance.cf.labels)["Org Name"]}" - identity_provider = "${var.identity_provider}" + identity_provider = "${var.custom_idp}" cf_org_admins = ${jsonencode(var.cf_org_admins)} cf_space_developer = ${jsonencode(var.cf_space_developer)} diff --git a/released/usecases/services_apps/sap_build_code/step1/outputs.tf b/released/usecases/services_apps/sap_build_code/step1/outputs.tf index ccf81f2b..1cab0e79 100644 --- a/released/usecases/services_apps/sap_build_code/step1/outputs.tf +++ b/released/usecases/services_apps/sap_build_code/step1/outputs.tf @@ -1,49 +1,49 @@ output "globalaccount" { value = var.globalaccount - description = "The Global Account subdomain" + description = "The Global Account subdomain." } output "cli_server_url" { value = var.cli_server_url - description = "The Global Account subdomain" + description = "The BTP CLI server URL." } output "subaccount_id" { value = btp_subaccount.build_code.id - description = "The Global Account subdomain" + description = "The Global Account subdomain id." } output "cf_api_endpoint" { value = jsondecode(btp_subaccount_environment_instance.cf.labels)["API Endpoint"] - description = "The Global Account subdomain" + description = "The Cloudfoundry API endpoint." } output "cf_org_id" { value = jsondecode(btp_subaccount_environment_instance.cf.labels)["Org ID"] - description = "The Global Account subdomain" + description = "The Cloudfoundry org id." } output "cf_org_name" { value = jsondecode(btp_subaccount_environment_instance.cf.labels)["Org Name"] - description = "The Global Account subdomain" + description = "The Cloudfoundry org name." } -output "identity_provider" { - value = var.identity_provider - description = "The Global Account subdomain" +output "custom_idp" { + value = var.custom_idp + description = "The custom identity provider." } output "cf_org_admins" { value = var.cf_org_admins - description = "The Global Account subdomain" + description = "List of users to set as Cloudfoundry org administrators." } output "cf_space_developer" { value = var.cf_space_developer - description = "The Global Account subdomain" + description = "List of users to set as Cloudfoundry space developers." } output "cf_space_manager" { value = var.cf_space_manager - description = "The Global Account subdomain" + description = "List of users to set as Cloudfoundry space managers." } diff --git a/released/usecases/services_apps/sap_build_code/step1/variables.tf b/released/usecases/services_apps/sap_build_code/step1/variables.tf index 5ba893cd..90e007f0 100644 --- a/released/usecases/services_apps/sap_build_code/step1/variables.tf +++ b/released/usecases/services_apps/sap_build_code/step1/variables.tf @@ -40,7 +40,7 @@ variable "subaccount_admins" { variable "cf_org_admins" { type = list(string) - description = "Defines the colleagues who are added to a CF org as administrators." + description = "List of users to set as Cloudfoundry org administrators." # add validation to check if admins contains a list of valid email addresses validation { @@ -73,7 +73,7 @@ variable "cf_space_developer" { variable "build_code_admins" { type = list(string) - description = "Defines the colleagues who are added to a CF space as space developer." + description = "Defines the colleagues who are admins for SAP Build Code." # add validation to check if admins contains a list of valid email addresses validation { @@ -83,7 +83,7 @@ variable "build_code_admins" { } variable "build_code_developers" { type = list(string) - description = "Defines the colleagues who are added to a CF space as space developer." + description = "Defines the colleagues who are developers for SAP Build Code." # add validation to check if admins contains a list of valid email addresses validation { @@ -98,9 +98,9 @@ variable "cf_environment_label" { default = "" } -variable "identity_provider" { +variable "custom_idp" { type = string - description = "The identity provider for the subaccount." + description = "The custom identity provider for the subaccount." default = "sap.ids" } diff --git a/released/usecases/services_apps/sap_build_code/step2/main.tf b/released/usecases/services_apps/sap_build_code/step2/main.tf index f9ff5a30..cc5cfd83 100644 --- a/released/usecases/services_apps/sap_build_code/step2/main.tf +++ b/released/usecases/services_apps/sap_build_code/step2/main.tf @@ -231,7 +231,7 @@ resource "cloudfoundry_org_role" "organization_user" { username = each.value type = "organization_user" org = var.cf_org_id - origin = var.identity_provider + origin = var.custom_idp } # Define Org Manager role resource "cloudfoundry_org_role" "organization_manager" { @@ -239,7 +239,7 @@ resource "cloudfoundry_org_role" "organization_manager" { username = each.value type = "organization_manager" org = var.cf_org_id - origin = var.identity_provider + origin = var.custom_idp depends_on = [cloudfoundry_org_role.organization_user] } diff --git a/released/usecases/services_apps/sap_build_code/step2/variables.tf b/released/usecases/services_apps/sap_build_code/step2/variables.tf index 097a5b92..cbf896f0 100644 --- a/released/usecases/services_apps/sap_build_code/step2/variables.tf +++ b/released/usecases/services_apps/sap_build_code/step2/variables.tf @@ -9,14 +9,14 @@ variable "globalaccount" { # The subaccount id variable "subaccount_id" { type = string - description = "The subaccount id." + description = "The Global Account subdomain id." } # The BTP CLI server URL variable "cli_server_url" { type = string description = "The BTP CLI server URL." - default = "https://cpcli.cf.sap.hana.ondemand.com" + default = "https://cli.btp.cloud.sap" } # The CF Org ID from the Cloud Foundry environment instance @@ -72,8 +72,8 @@ variable "cf_space_developer" { } # The identity provider for the subaccount -variable "identity_provider" { +variable "custom_idp" { type = string - description = "The identity provider for the subaccount." + description = "The custom identity provider for the subaccount." default = "sap.ids" } From 6732a05d01620bd9fe6a2bf36f0bb03521d91935 Mon Sep 17 00:00:00 2001 From: Rui Nogueira Date: Tue, 25 Jun 2024 08:21:03 +0000 Subject: [PATCH 2/2] change to custom_idp --- released/usecases/services_apps/sap_build_code/step1/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/released/usecases/services_apps/sap_build_code/step1/main.tf b/released/usecases/services_apps/sap_build_code/step1/main.tf index 7c686e3f..0178d763 100644 --- a/released/usecases/services_apps/sap_build_code/step1/main.tf +++ b/released/usecases/services_apps/sap_build_code/step1/main.tf @@ -343,7 +343,7 @@ resource "local_file" "output_vars_step1" { cf_org_id = "${jsondecode(btp_subaccount_environment_instance.cf.labels)["Org ID"]}" cf_org_name = "${jsondecode(btp_subaccount_environment_instance.cf.labels)["Org Name"]}" - identity_provider = "${var.custom_idp}" + custom_idp = "${var.custom_idp}" cf_org_admins = ${jsonencode(var.cf_org_admins)} cf_space_developer = ${jsonencode(var.cf_space_developer)}