Skip to content

fix: naming conventions ABAP mission #206

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 1 commit into from
Jun 26, 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
6 changes: 3 additions & 3 deletions released/discovery_center/mission_3061/step1/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ output "subaccount_name" {
description = "The name of the subaccount."
}

output "cloudfoundry_org_name" {
output "cf_org_name" {
value = local.subaccount_cf_org
description = "The name of the Cloud Foundry org connected to the subaccount."
}

output "cloudfoundry_org_id" {
output "cf_org_id" {
value = btp_subaccount_environment_instance.cf_abap.platform_id
description = "The ID of the Cloud Foundry org connected to the subaccount."
}

output "cloudfoundry_api_url" {
output "cf_api_url" {
value = lookup(jsondecode(btp_subaccount_environment_instance.cf_abap.labels), "API Endpoint", "not found")
description = "API endpoint of the Cloud Foundry environment."
}
Expand Down
5 changes: 5 additions & 0 deletions released/discovery_center/mission_3061/step1/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ variable "cf_landscape_label" {
variable "abap_sid" {
type = string
description = "The system ID (SID) of the ABAP system."

validation {
condition = regex("^[A-Z][A-Z0-9]{2}$", var.abap_sid)
error_message = "Please provide a valid system ID (SID). It must consist of exactly three alphanumeric characters. Only uppercase letters are allowed. The first character must be a letter (not a digit). The ID does not have to be technically unique."
}
}

variable "abap_si_plan" {
Expand Down
8 changes: 4 additions & 4 deletions released/discovery_center/mission_3061/step2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "cloudfoundry_org_role" "org_managers" {
for_each = toset("${var.cf_org_managers}")
username = each.value
type = "organization_manager"
org = var.cloudfoundry_org_id
org = var.cf_org_id
origin = var.origin
}

Expand All @@ -21,15 +21,15 @@ resource "cloudfoundry_org_role" "billing_managers" {
for_each = toset("${var.cf_org_billing_managers}")
username = each.value
type = "organization_billing_manager"
org = var.cloudfoundry_org_id
org = var.cf_org_id
origin = var.origin
}

resource "cloudfoundry_org_role" "org_auditors" {
for_each = toset("${var.cf_org_auditors}")
username = each.value
type = "organization_auditor"
org = var.cloudfoundry_org_id
org = var.cf_org_id
origin = var.origin
}

Expand All @@ -39,7 +39,7 @@ resource "cloudfoundry_org_role" "org_auditors" {
###
resource "cloudfoundry_space" "abap_space" {
name = var.cf_space_name
org = var.cloudfoundry_org_id
org = var.cf_org_id
}

###
Expand Down
2 changes: 1 addition & 1 deletion released/discovery_center/mission_3061/step2/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ terraform {

# This will only work if we know the region in advance
provider "cloudfoundry" {
api_url = var.cloudfoundry_api_url
api_url = var.cf_api_url
}
9 changes: 7 additions & 2 deletions released/discovery_center/mission_3061/step2/variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

variable "cloudfoundry_api_url" {
variable "cf_api_url" {
type = string
description = "The API endpoint of the Cloud Foundry environment."
}

variable "cloudfoundry_org_id" {
variable "cf_org_id" {
type = string
description = "The Cloud Foundry landscape (format example eu10-004)."
}
Expand Down Expand Up @@ -60,6 +60,11 @@ variable "cf_space_auditors" {
variable "abap_sid" {
type = string
description = "The system ID (SID) of the ABAP system."

validation {
condition = regex("^[A-Z][A-Z0-9]{2}$", var.abap_sid)
error_message = "Please provide a valid system ID (SID). It must consist of exactly three alphanumeric characters. Only uppercase letters are allowed. The first character must be a letter (not a digit). The ID does not have to be technically unique."
}
}

variable "abap_si_plan" {
Expand Down