Skip to content

Commit ed0f66c

Browse files
committed
chore: Update mission 4327
1 parent fc25444 commit ed0f66c

File tree

1 file changed

+14
-1
lines changed
  • released/discovery_center/mission_4327/step1

1 file changed

+14
-1
lines changed

released/discovery_center/mission_4327/step1/main.tf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,28 @@ data "btp_subaccount_environments" "all" {
3030
resource "terraform_data" "cf_landscape_label" {
3131
input = length(var.cf_landscape_label) > 0 ? var.cf_landscape_label : [for env in data.btp_subaccount_environments.all.values : env if env.service_name == "cloudfoundry" && env.environment_type == "cloudfoundry"][0].landscape_label
3232
}
33+
resource "btp_subaccount_entitlement" "cf_free"{
34+
subaccount_id = btp_subaccount.project.id
35+
service_name = "cloudfoundry"
36+
plan_name = "free"
37+
amount = 1
38+
}
39+
40+
data "btp_subaccount_environments" "available_environments" {
41+
subaccount_id = btp_subaccount.project.id
42+
}
43+
3344
###############################################################################################
3445
# Creation of Cloud Foundry environment
3546
###############################################################################################
3647
resource "btp_subaccount_environment_instance" "cloudfoundry" {
48+
depends_on = [ btp_subaccount_entitlement.cf_free ]
3749
subaccount_id = btp_subaccount.project.id
3850
name = local.subaccount_cf_org
3951
landscape_label = terraform_data.cf_landscape_label.output
4052
environment_type = "cloudfoundry"
4153
service_name = "cloudfoundry"
42-
plan_name = "standard"
54+
plan_name = "free"
4355
# ATTENTION: some regions offer multiple environments of a kind and you must explicitly select the target environment in which
4456
# the instance shall be created using the parameter landscape label.
4557
# available environments can be looked up using the btp_subaccount_environments datasource
@@ -113,6 +125,7 @@ resource "btp_subaccount_entitlement" "cicd_app" {
113125
subaccount_id = btp_subaccount.project.id
114126
service_name = "cicd-app"
115127
plan_name = var.cicd_service_plan
128+
amount = 1
116129
}
117130

118131
locals {

0 commit comments

Comments
 (0)