Skip to content

3585: removed not used cicd service #305

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 5, 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
37 changes: 0 additions & 37 deletions released/discovery_center/mission_3585/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,6 @@ resource "btp_subaccount" "dc_mission" {
region = lower(var.region)
}

# ------------------------------------------------------------------------------------------------------
# SERVICES
# ------------------------------------------------------------------------------------------------------
#
locals {
# optional
service_name__cicd_service = "cicd-service"
}
# ------------------------------------------------------------------------------------------------------
# Setup cicd-service (SAP Continuous Integration and Delivery), (not running in CF environment)
# ------------------------------------------------------------------------------------------------------
# Entitle
resource "btp_subaccount_entitlement" "cicd_service" {
count = var.use_optional_resources ? 1 : 0
subaccount_id = btp_subaccount.dc_mission.id
service_name = local.service_name__cicd_service
plan_name = var.service_plan__cicd_service
}
# Get serviceplan_id for cicd-service with plan_name "default"
data "btp_subaccount_service_plan" "cicd_service" {
count = var.use_optional_resources ? 1 : 0
subaccount_id = btp_subaccount.dc_mission.id
offering_name = local.service_name__cicd_service
name = var.service_plan__cicd_service
depends_on = [btp_subaccount_entitlement.cicd_service]
}
# Create service instance
resource "btp_subaccount_service_instance" "cicd_service" {
count = var.use_optional_resources ? 1 : 0
subaccount_id = btp_subaccount.dc_mission.id
serviceplan_id = data.btp_subaccount_service_plan.cicd_service[0].id
name = "default_cicd-service"
# Subscription to the cicd-app subscription is required for creating the service instance
# See as well https://help.sap.com/docs/continuous-integration-and-delivery/sap-continuous-integration-and-delivery/optional-enabling-api-usage?language=en-US
depends_on = [btp_subaccount_subscription.cicd_app]
}

# ------------------------------------------------------------------------------------------------------
# APP SUBSCRIPTIONS
# ------------------------------------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions released/discovery_center/mission_3585/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ output "sap_launchpad_subscription_url" {
description = "SAP Build Work Zone, standard edition subscription URL."
}

output "cicd_service_id" {
value = var.use_optional_resources ? btp_subaccount_service_instance.cicd_service[0].id : null
}

output "cicd_app_subscription_url" {
value = var.use_optional_resources ? btp_subaccount_subscription.cicd_app[0].subscription_url : null
description = "Continuous Integration & Delivery subscription URL."
Expand Down
13 changes: 0 additions & 13 deletions released/discovery_center/mission_3585/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ variable "use_optional_resources" {
default = true
}

# ------------------------------------------------------------------------------------------------------
# service plans
# ------------------------------------------------------------------------------------------------------
variable "service_plan__cicd_service" {
type = string
description = "The plan for service 'SAP Continuous Integration and Delivery' with technical name 'cicd-service'"
default = "default"
validation {
condition = contains(["default"], var.service_plan__cicd_service)
error_message = "Invalid value for service_plan__cicd_service. Only 'default' is allowed."
}
}

# ------------------------------------------------------------------------------------------------------
# app subscription plans
# ------------------------------------------------------------------------------------------------------
Expand Down