Skip to content

Commit

Permalink
chore: update usecase trial cf deployment (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
prajin-op authored Nov 6, 2024
1 parent 8d0f969 commit 64a0bef
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions released/cicd/setup_subaccount_cf/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ terraform {
required_providers {
btp = {
source = "sap/btp"
version = "~> 1.5.0"
version = "~> 1.8.0"
}
cloudfoundry = {
source = "SAP/cloudfoundry"
version = "1.0.0-rc1"
source = "cloudfoundry/cloudfoundry"
version = "~> 1.0.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion released/usecases/dev_test_prod_setup/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
cloudfoundry = {
source = "cloudfoundry/cloudfoundry"
version = "1.0.0"
version = "~> 1.0.0"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions released/usecases/devops/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ terraform {
required_providers {
btp = {
source = "sap/btp"
version = "~> 1.3.0"
version = "~> 1.8.0"
}
cloudfoundry = {
source = "SAP/cloudfoundry"
version = "1.0.0-rc1"
source = "cloudfoundry/cloudfoundry"
version = "~> 1.0.0"
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion released/usecases/trial_cf_deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ This sample shows how to deploy a Cloud Foundry application to SAP BTP trial.

The setup comprises the following resources:

- Creation of a Cloud Foundry space, domain and route
- Creation of a Cloud Foundry domain and route
- Creation of XSUAA service instance
- Deployment of "Hello World" application

## Pre-requisite for the setup

- You must have an SAP BTP trial account with a subaccount created named trial.
- The BTP subaccount should be enabled for Cloud Foundry, specifically with the Application Runtime is added.
- Ensure that you have created a space named Dev within the Cloud Foundry environment of your subaccount.
- Verify that the XSUAA service is available in your Cloud Foundry environment.

## Deploying the resources

To deploy the resources you must:
Expand Down
6 changes: 3 additions & 3 deletions released/usecases/trial_cf_deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ resource "cloudfoundry_route" "helloterraform" {
host = "helloterraform-${random_id.suffix.hex}"
}

data "cloudfoundry_service" "xsuaa" {
name = "xsuaa"
data "cloudfoundry_service_plans" "xsuaa" {
service_offering_name = "xsuaa"
}

resource "cloudfoundry_service_instance" "helloterraform_xsuaa" {
name = "helloterraform-xsuaa"
space = data.cloudfoundry_space.dev.id
service_plan = data.cloudfoundry_service.xsuaa.service_plans["application"]
service_plan = data.cloudfoundry_service_plans.xsuaa.service_plans[0].id
type = "managed"
parameters = jsonencode({
xsappname = "helloterraform-${random_id.suffix.hex}"
Expand Down
6 changes: 3 additions & 3 deletions released/usecases/trial_cf_deployment/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ terraform {
required_providers {
btp = {
source = "SAP/btp"
version = "~> 1.5.0"
version = "~> 1.8.0"
}
cloudfoundry = {
source = "SAP/cloudfoundry"
version = "1.0.0-rc1"
source = "cloudfoundry/cloudfoundry"
version = "1.0.0"
}
}
}
Expand Down

0 comments on commit 64a0bef

Please sign in to comment.