Skip to content

Varnames update sap build code #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
custom_idp = "${var.custom_idp}"

cf_org_admins = ${jsonencode(var.cf_org_admins)}
cf_space_developer = ${jsonencode(var.cf_space_developer)}
Expand Down
24 changes: 12 additions & 12 deletions released/usecases/services_apps/sap_build_code/step1/outputs.tf
Original file line number Diff line number Diff line change
@@ -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."
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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"

}
Expand Down
4 changes: 2 additions & 2 deletions released/usecases/services_apps/sap_build_code/step2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ 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" {
for_each = toset("${var.cf_org_admins}")
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]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}