From 219acc8f084b66bf5ce63a643751c049d685f9bd Mon Sep 17 00:00:00 2001 From: Christian Lechner Date: Mon, 28 Apr 2025 06:26:34 +0000 Subject: [PATCH] chore: remove duplicate folder --- .../CloudFoundry/README.md | 45 ------------------- .../sap-btp-environment/CloudFoundry/main.tf | 26 ----------- .../CloudFoundry/outputs.tf | 9 ---- .../CloudFoundry/variables.tf | 30 ------------- .../CloudFoundry/versions.tf | 9 ---- 5 files changed, 119 deletions(-) delete mode 100644 sample-setups/modules/sap-btp-environment/CloudFoundry/README.md delete mode 100644 sample-setups/modules/sap-btp-environment/CloudFoundry/main.tf delete mode 100644 sample-setups/modules/sap-btp-environment/CloudFoundry/outputs.tf delete mode 100644 sample-setups/modules/sap-btp-environment/CloudFoundry/variables.tf delete mode 100644 sample-setups/modules/sap-btp-environment/CloudFoundry/versions.tf diff --git a/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md b/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md deleted file mode 100644 index 274d105..0000000 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# SAP BTP - Cloud Foundry Environment Setup - -This module encapsulates the creation of a Cloud Foundry environment in a subaccount on 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-setups/modules/sap-btp-environment/CloudFoundry/main.tf b/sample-setups/modules/sap-btp-environment/CloudFoundry/main.tf deleted file mode 100644 index 0d9ccaf..0000000 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -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-setups/modules/sap-btp-environment/CloudFoundry/outputs.tf b/sample-setups/modules/sap-btp-environment/CloudFoundry/outputs.tf deleted file mode 100644 index 36140e8..0000000 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/outputs.tf +++ /dev/null @@ -1,9 +0,0 @@ -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-setups/modules/sap-btp-environment/CloudFoundry/variables.tf b/sample-setups/modules/sap-btp-environment/CloudFoundry/variables.tf deleted file mode 100644 index eac52f9..0000000 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/variables.tf +++ /dev/null @@ -1,30 +0,0 @@ -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-setups/modules/sap-btp-environment/CloudFoundry/versions.tf b/sample-setups/modules/sap-btp-environment/CloudFoundry/versions.tf deleted file mode 100644 index 9bbde7b..0000000 --- a/sample-setups/modules/sap-btp-environment/CloudFoundry/versions.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_version = ">= 1.11" - required_providers { - btp = { - source = "SAP/btp" - version = ">= 1.11.0" - } - } -}