Skip to content

4356 Fix & polished the QAS enabled Mission #316

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
Sep 18, 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
4 changes: 0 additions & 4 deletions released/discovery_center/mission_4356/step1/locals.tf

This file was deleted.

259 changes: 179 additions & 80 deletions released/discovery_center/mission_4356/step1/main.tf

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions released/discovery_center/mission_4356/step1/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
output "globalaccount" {
value = var.globalaccount
description = "The globalaccount subdomain."
output "subaccount_id" {
value = data.btp_subaccount.dc_mission.id
description = "The ID of the subaccount."
}

output "cli_server_url" {
value = var.cli_server_url
description = "The BTP CLI server URL."
output "integrationsuite_subscription_url" {
value = btp_subaccount_subscription.integrationsuite.subscription_url
description = "SAP Integration Suite subscription URL."
}

output "subaccount_id" {
value = data.btp_subaccount.dc_mission.id
description = "The ID of the subaccount."
output "custom_idp" {
value = var.custom_idp
description = "The custom identity provider."
}

output "cf_api_url" {
value = jsondecode(btp_subaccount_environment_instance.cloudfoundry.labels)["API Endpoint"]
description = "The Cloudfoundry API endpoint."
description = "The Cloudfoundry API Url."
}

output "cf_landscape_label" {
Expand Down
34 changes: 24 additions & 10 deletions released/discovery_center/mission_4356/step1/sample.tfvars
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# ------------------------------------------------------------------------------------------------------
# Provider configuration
# ------------------------------------------------------------------------------------------------------
# Your global account subdomain
globalaccount = "yourglobalaccount"
custom_idp = "<<tenant-id>>.accounts.ondemand.com"

# ------------------------------------------------------------------------------------------------------
# Account settings
# ------------------------------------------------------------------------------------------------------
globalaccount = "<your-global-account-subdomain>"
region = "us10"
subaccount_name = "SAP Discovery Center Mission 4356"

# ------------------------------------------------------------------------------------------------------
# Project specific configuration (please adapt!)
# Use case specific configuration
# ------------------------------------------------------------------------------------------------------
subaccount_admins = ["another-user@test.com", "you@test.com"]
subaccount_service_admins = ["another-user@test.com", "you@test.com"]

integration_provisioners = ["another-user@test.com", "you@test.com"]
sapappstudio_admins = ["another-user@test.com", "you@test.com"]
sapappstudio_developers = ["another-user@test.com", "you@test.com"]

subaccount_admins = ["another.user@test.com"]
subaccount_service_admins = ["another.user@test.com"]
cf_org_admins = ["another.user@test.com"]
cf_org_users = ["another.user@test.com"]
cf_space_managers = ["another.user@test.com", "you@test.com"]
cf_space_developers = ["another.user@test.com", "you@test.com"]
cloud_connector_admins = ["another-user@test.com", "you@test.com"]
connectivity_destination_admins = ["another-user@test.com", "you@test.com"]

custom_idp = "sap.ids"
cf_org_admins = ["another-user@test.com", "you@test.com"]
cf_org_users = ["another-user@test.com", "you@test.com"]
cf_space_managers = ["another-user@test.com", "you@test.com"]
cf_space_developers = ["another-user@test.com", "you@test.com"]

# ------------------------------------------------------------------------------------------------------
# Create tfvars file for the step 2
# ------------------------------------------------------------------------------------------------------
create_tfvars_file_for_step2 = true
214 changes: 115 additions & 99 deletions released/discovery_center/mission_4356/step1/variables.tf
Original file line number Diff line number Diff line change
@@ -1,49 +1,63 @@
######################################################################
# Customer account setup
######################################################################
# subaccount
# ------------------------------------------------------------------------------------------------------
# Account variables
# ------------------------------------------------------------------------------------------------------
variable "globalaccount" {
type = string
description = "The globalaccount subdomain."
default = "yourglobalaccount"
description = "The globalaccount subdomain where the sub account shall be created."
}

variable "subaccount_id" {
variable "cli_server_url" {
type = string
description = "The subaccount ID."
description = "The BTP CLI server URL."
default = "https://cli.btp.cloud.sap"
}

variable "custom_idp" {
type = string
description = "The custom identity provider for the subaccount."
default = ""
}

# subaccount
variable "custom_idp_apps_origin_key" {
type = string
description = "The custom identity provider for the subaccount."
default = "sap.custom"
}

variable "region" {
type = string
description = "The region where the subaccount shall be created in."
default = "us10"
}

variable "subaccount_name" {
type = string
description = "The subaccount name."
default = "UC - Deliver Connected Experiences with a single view of Material Availability"
default = "My SAP Build Code subaccount."
}

variable "custom_idp" {
variable "subaccount_id" {
type = string
description = "Defines the custom IdP"
description = "The subaccount ID."
default = ""
}

# ------------------------------------------------------------------------------------------------------
# cf related variables
# ------------------------------------------------------------------------------------------------------
variable "origin" {
type = string
description = "Defines the origin of the identity provider"
description = "Defines the origin key of the identity provider"
default = "sap.ids"
# The value for the origin can be defined
# The value for the origin_key can be defined
# but are normally set to "sap.ids", "sap.default" or "sap.custom"
}

variable "cf_space_name" {
variable "origin_key" {
type = string
description = "Name of the Cloud Foundry space."
default = "dev"

validation {
condition = can(regex("^.{1,255}$", var.cf_space_name))
error_message = "The Cloud Foundry space name must not be emtpy and not exceed 255 characters."
}
description = "Defines the origin key of the identity provider"
default = ""
# The value for the origin_key can be defined, set to "sap.ids", "sap.default" or "sap.custom"
}

variable "cf_landscape_label" {
Expand All @@ -55,141 +69,140 @@ variable "cf_landscape_label" {
variable "cf_org_name" {
type = string
description = "Name of the Cloud Foundry org."
default = "mission-4356"
default = "mission-4441-sap-build-code"

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."
}
}
# Region
variable "region" {

variable "cf_space_name" {
type = string
description = "The region where the project account shall be created in."
default = "us10"
description = "Name of the Cloud Foundry space."
default = "dev"

validation {
condition = can(regex("^.{1,255}$", var.cf_space_name))
error_message = "The Cloud Foundry space name must not be emtpy and not exceed 255 characters."
}
}

/*
# hana password
variable "hana_cloud_system_password" {
type = string
description = "The system password for the hana_cloud service instance."
default = "Abcd1234"
}
*/

# CLI server
variable "cli_server_url" {
# ------------------------------------------------------------------------------------------------------
# services plans
# ------------------------------------------------------------------------------------------------------
variable "service_plan__cloudfoundry" {
type = string
description = "The BTP CLI server URL."
default = "https://cpcli.cf.eu10.hana.ondemand.com"
description = "The plan for service 'Destination Service' with technical name 'destination'"
default = "standard"
validation {
condition = contains(["standard"], var.service_plan__cloudfoundry)
error_message = "Invalid value for service_plan__cloudfoundry. Only 'standard' is allowed."
}
}

# subaccount variables
variable "subaccount_admins" {
type = list(string)
description = "Defines the colleagues who are added to each subaccount as subaccount administrators."
default = ["jane.doe@test.com", "john.doe@test.com"]
variable "service_plan__connectivity" {
type = string
description = "The plan for service 'Connectivity Service' with technical name 'connectivity'"
default = "lite"
}

variable "subaccount_service_admins" {
type = list(string)
description = "Defines the colleagues who are added to each subaccount as subaccount service administrators."
default = ["jane.doe@test.com", "john.doe@test.com"]
variable "service_plan__destination" {
type = string
description = "The plan for service 'Destination Service' with technical name 'destination'"
default = "lite"
}

variable "service_plan__html5_apps_repo" {
type = string
description = "The plan for service 'HTML5 Application Repository Service' with technical name 'html5-apps-repo'"
default = "app-host"
}

variable "service_plan__sap_integration_suite" {
variable "service_plan__xsuaa" {
type = string
description = "The plan for service 'Authorization and Trust Management Service' with technical name 'xsuaa'"
default = "application"
}

# ------------------------------------------------------------------------------------------------------
# app subscription plans
# ------------------------------------------------------------------------------------------------------
variable "service_plan__integrationsuite" {
type = string
description = "The plan for SAP Integration Suite"
description = "The plan for service 'Integration Suite' with technical name 'integrationsuite'"
default = "enterprise_agreement"
validation {
condition = contains(["free", "enterprise_agreement"], var.service_plan__sap_integration_suite)
error_message = "Invalid value for service_plan__sap_integration_suite. Only 'free' and 'enterprise_agreement' are allowed."
condition = contains(["enterprise_agreement", "free"], var.service_plan__integrationsuite)
error_message = "Invalid value for service_plan__integrationsuite. Only 'enterprise_agreement' and 'free' are allowed."
}
}

variable "service_plan__sap_business_app_studio" {
variable "service_plan__sapappstudio" {
type = string
description = "The plan for SAP Business Application Studio"
description = "The plan for service 'SAP Business Application Studio' with technical name 'sapappstudio'"
default = "standard-edition"
validation {
condition = contains(["standard-edition"], var.service_plan__sap_business_app_studio)
error_message = "Invalid value for service_plan__sap_business_app_studio. Only 'standard-edition' is allowed."
condition = contains(["standard-edition"], var.service_plan__sapappstudio)
error_message = "Invalid value for service_plan__sapappstudio. Only 'standard-edition' is allowed."
}
}

# ------------------------------------------------------------------------------------------------------
# Entitlements
# User lists
# ------------------------------------------------------------------------------------------------------
variable "entitlements" {
type = list(object({
service_name = string
plan_name = string
type = string
}))
description = "The list of entitlements that shall be added to the subaccount."
default = [
{
service_name = "connectivity"
plan_name = "lite",
type = "service"
},
{
service_name = "destination"
plan_name = "lite",
type = "service"
},
{
service_name = "html5-apps-repo"
plan_name = "app-host",
type = "service"
},
{
service_name = "xsuaa"
plan_name = "application",
type = "service"
}
]
}

variable "appstudio_developers" {
variable "subaccount_admins" {
type = list(string)
description = "Business Application Studio Developer"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Defines the colleagues who are added to subaccount as administrator"
}

variable "appstudio_admins" {
variable "subaccount_service_admins" {
type = list(string)
description = "Business Application Studio Administrator"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Defines the colleagues who are added to subaccount as service administrator"
}

variable "cloudconnector_admins" {
variable "integration_provisioners" {
type = list(string)
description = "Cloud Connector Administrator"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Integration Provisioner"
}

variable "conn_dest_admins" {
variable "sapappstudio_admins" {
type = list(string)
description = "Connectivity and Destination Administrator"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Defines the colleagues who are administrators for SAP Business Application Studio."
}

variable "int_provisioners" {
variable "sapappstudio_developers" {
type = list(string)
description = "Integration Provisioner"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Defines the colleagues who are developers for SAP Business Application Studio."
}

variable "cloud_connector_admins" {
type = list(string)
description = "Defines the colleagues who are administrators for Cloud Connector"
}

variable "cf_org_users" {
variable "connectivity_destination_admins" {
type = list(string)
description = "CF Org Users"
default = ["jane.doe@test.com", "john.doe@test.com"]
description = "Defines the colleagues who are administrators for Connectivity and Destinations"
}

variable "cf_org_admins" {
type = list(string)
description = "List of users to set as Cloudfoundry org administrators."
description = "Defines the colleagues who are added to a Cloudfoundry as org administrators."
}

variable "cf_org_users" {
type = list(string)
description = "Defines the colleagues who are added to a Cloudfoundry as org users."
}

variable "cf_space_managers" {
Expand All @@ -202,6 +215,9 @@ variable "cf_space_developers" {
description = "Defines the colleagues who are added to a CF space as space developer."
}

# ------------------------------------------------------------------------------------------------------
# Switch for creating tfvars for step 2
# ------------------------------------------------------------------------------------------------------
variable "create_tfvars_file_for_step2" {
type = bool
description = "Switch to enable the creation of the tfvars file for step 2."
Expand Down
Loading