Skip to content

Commit 3af8610

Browse files
committed
chore: adding cloudFoundry and entitlements
1 parent 1863312 commit 3af8610

File tree

11 files changed

+523
-243
lines changed

11 files changed

+523
-243
lines changed

modules/sapbtp/subaccounts/buildingblock/APP_TEAM_README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,36 @@ This building block is designed for application teams that need to develop and d
66

77
**Usage Examples**
88

9-
* A developer wants to create a new subaccount for a proof-of-concept project with SAP Build Code and Process Automation enabled. They use this building block to quickly provision a subaccount with the required subscriptions.
10-
* An application team wants to create a dedicated subaccount for their production application with Cloud Foundry enabled for deployment and SAP IAS configured for single sign-on.
11-
* A development team needs a sandbox environment with multiple SAP applications subscribed and proper entitlements allocated for testing purposes.
9+
* Create a proof-of-concept project with SAP Build Code and Process Automation
10+
* Create a production subaccount with Cloud Foundry, PostgreSQL, Redis, and SAP IAS SSO
11+
* Set up a sandbox with multiple SAP applications and Cloud Foundry services for testing
12+
* Quickly configure an Integration Suite environment with connectivity services
13+
* Provision a development environment with Build Work Zone, Build Code, and supporting services
1214

1315
**Features**
1416

15-
**Application Subscriptions**: Subscribe to SAP BTP applications like SAP Build Code, SAP Process Automation, or Cloud Transport within the subaccount.
17+
**Application Subscriptions**: Subscribe to SAP BTP applications like SAP Build Code, SAP Process Automation, SAP Build Work Zone, Integration Suite, or Cloud Transport within the subaccount.
1618

1719
**Entitlements Management**: Automatically configure service entitlements required for application subscriptions and service usage.
1820

1921
**Cloud Foundry Environment**: Optionally provision a Cloud Foundry space for application deployment and development.
2022

23+
**Cloud Foundry Services**: Provision commonly used Cloud Foundry service instances such as PostgreSQL, Redis, Destination service, XSUAA, Application Logging, HTML5 Repository, Job Scheduler, Credential Store, and more.
24+
2125
**Trust Configuration**: Configure external identity providers like SAP IAS for single sign-on authentication.
2226

27+
**Most Popular SAP BTP Services Available**:
28+
- SAP Build Work Zone (central launchpad)
29+
- SAP Build Code (low-code development)
30+
- SAP Build Apps (no-code app builder)
31+
- SAP Build Process Automation
32+
- SAP Integration Suite
33+
- SAP HANA Cloud
34+
- SAP Business Application Studio
35+
- PostgreSQL and Redis databases
36+
- Destination and Connectivity services
37+
- XSUAA (Authentication & Authorization)
38+
2339
**Shared Responsibility**
2440

2541
| Responsibility | Platform Team ✅/❌ | Application Team ✅/❌ |
@@ -28,9 +44,11 @@ This building block is designed for application teams that need to develop and d
2844
| Entitlements Configuration |||
2945
| Application Subscriptions |||
3046
| Cloud Foundry Environment Setup |||
47+
| Cloud Foundry Service Provisioning|||
3148
| Trust Configuration (IDP) |||
3249
| Using the subaccount |||
3350
| Application Development |||
3451
| Cost Management |||
3552
| Security & Compliance |||
53+
| Service Bindings & Keys |||
3654
| Updates |||

modules/sapbtp/subaccounts/buildingblock/README.md

Lines changed: 132 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,142 @@ This building block provides the following optional capabilities:
1919
- **Entitlements**: Service quota and plan assignments required for subscriptions
2020
- **Subscriptions**: Application subscriptions (SAP Build Code, Process Automation, etc.)
2121
- **Cloud Foundry**: Optional Cloud Foundry environment instance for application deployment
22+
- **Cloud Foundry Services**: Provision service instances (PostgreSQL, Redis, Destination, XSUAA, etc.)
2223
- **Trust Configuration**: External Identity Provider integration (SAP IAS, custom IdP)
2324

24-
## Usage Example
25+
## Usage Examples
26+
27+
### Basic Subaccount with Applications
2528

2629
```hcl
27-
module "sap_btp_subaccount" {
28-
source = "./modules/sapbtp/subaccounts/buildingblock"
30+
entitlements = [
31+
{
32+
service_name = "build-code"
33+
plan_name = "standard"
34+
}
35+
]
2936
30-
globalaccount = "my-global-account"
31-
project_identifier = "my-project"
32-
subfolder = "development"
33-
region = "eu30"
37+
subscriptions = [
38+
{
39+
app_name = "build-code"
40+
plan_name = "standard"
41+
parameters = {}
42+
}
43+
]
44+
```
3445

35-
entitlements = [
46+
### Development Environment with Cloud Foundry Services
47+
48+
```hcl
49+
entitlements = [
50+
{
51+
service_name = "hana-cloud"
52+
plan_name = "hana"
53+
amount = 1
54+
},
55+
{
56+
service_name = "PostgreSQL"
57+
plan_name = "small"
58+
amount = 1
59+
},
60+
{
61+
service_name = "destination"
62+
plan_name = "lite"
63+
},
64+
{
65+
service_name = "xsuaa"
66+
plan_name = "application"
67+
}
68+
]
69+
70+
cloudfoundry_instance = {
71+
name = "dev-cf"
72+
plan_name = "standard"
73+
}
74+
75+
cloudfoundry_services = {
76+
postgresql_instances = [
3677
{
37-
service_name = "build-code"
38-
plan_name = "free"
39-
},
78+
name = "my-postgres-db"
79+
plan_name = "small"
80+
parameters = {}
81+
}
82+
]
83+
xsuaa_instances = [
4084
{
41-
service_name = "storage"
42-
plan_name = "standard"
43-
amount = 5
85+
name = "my-xsuaa"
86+
plan_name = "application"
87+
parameters = {
88+
xsappname = "my-app"
89+
}
4490
}
4591
]
92+
}
93+
```
94+
95+
## Common SAP BTP Services
96+
97+
### Popular Application Subscriptions
98+
99+
| Application Name | Service Name | Common Plans | Description |
100+
|-----------------|--------------|--------------|-------------|
101+
| SAP Build Work Zone | `SAPLaunchpad` | `standard` | Central entry point for applications |
102+
| SAP Build Code | `build-code` | `standard`, `free` | Low-code development platform |
103+
| SAP Build Apps | `sap-build-apps` | `standard`, `free` | No-code app builder |
104+
| SAP Build Process Automation | `process-automation` | `standard` | Process automation and RPA |
105+
| SAP Integration Suite | `integrationsuite` | `enterprise_agreement` | Integration and API management |
106+
| SAP Business Application Studio | `sapappstudio` | `standard-edition` | Web-based IDE |
107+
| SAP HANA Cloud | `hana-cloud` | `hana`, `hana-cloud-connection` | In-memory database |
108+
| SAP Cloud Transport Management | `cloud-transport-management` | `standard` | Transport management |
109+
| SAP Continuous Integration & Delivery | `cicd-app` | `default` | CI/CD pipeline service |
110+
| SAP Mobile Services | `mobile-services` | `standard` | Mobile app development |
111+
| SAP Document Management Service | `sdm` | `standard` | Document storage and management |
112+
113+
### Cloud Foundry Services (Entitlements)
114+
115+
**Services requiring `amount` parameter (quota-based):**
116+
- `PostgreSQL` - PostgreSQL database (plans: small, medium, large)
117+
- `Redis` - Redis cache (plans: small, medium, large)
118+
- `hana-cloud` - HANA Cloud database (plans: hana)
119+
- `auditlog-viewer` - Audit log service (plans: default)
120+
121+
**Services without `amount` parameter (enable-only):**
122+
- `destination` - Destination configuration (plans: lite)
123+
- `connectivity` - Cloud Connector integration (plans: lite)
124+
- `xsuaa` - Authentication & Authorization (plans: application, broker)
125+
- `application-logs` - Application logging (plans: lite)
126+
- `html5-apps-repo` - HTML5 application hosting (plans: app-host, app-runtime)
127+
- `job-scheduler` - Job scheduling service (plans: lite, standard)
128+
- `credstore` - Credential storage (plans: free, standard)
129+
- `objectstore` - Object storage S3-compatible (plans: s3-standard)
130+
131+
## Cloud Foundry Service Instances
132+
133+
When `cloudfoundry_instance` is configured, you can provision service instances:
46134

47-
subscriptions = [
135+
```hcl
136+
cloudfoundry_services = {
137+
postgresql_instances = [
48138
{
49-
app_name = "build-code"
50-
plan_name = "free"
139+
name = "my-postgres"
140+
plan_name = "small"
51141
parameters = {}
52142
}
53143
]
54-
55-
cloudfoundry_instance = {
56-
name = "dev-cf"
57-
plan_name = "standard"
58-
}
59-
60-
trust_configuration = {
61-
identity_provider = "mytenant.accounts.ondemand.com"
62-
}
144+
xsuaa_instances = [
145+
{
146+
name = "my-xsuaa"
147+
plan_name = "application"
148+
parameters = {
149+
xsappname = "my-app"
150+
}
151+
}
152+
]
63153
}
64154
```
65155

156+
Supported: postgresql_instances, redis_instances, destination_instances, connectivity_instances, xsuaa_instances, application_logs_instances, html5_repo_instances, job_scheduler_instances, credstore_instances, objectstore_instances
157+
66158
## Providers
67159

68160
```hcl
@@ -92,29 +184,34 @@ No modules.
92184
| Name | Type |
93185
|------|------|
94186
| [btp_subaccount.subaccount](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount) | resource |
95-
| [btp_subaccount_entitlement.entitlement](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_entitlement) | resource |
187+
| [btp_subaccount_entitlement.entitlement_with_quota](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_entitlement) | resource |
188+
| [btp_subaccount_entitlement.entitlement_without_quota](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_entitlement) | resource |
96189
| [btp_subaccount_environment_instance.cloudfoundry](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_environment_instance) | resource |
97190
| [btp_subaccount_role_collection_assignment.subaccount_admin](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_role_collection_assignment) | resource |
98191
| [btp_subaccount_role_collection_assignment.subaccount_service_admininstrator](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_role_collection_assignment) | resource |
99192
| [btp_subaccount_role_collection_assignment.subaccount_viewer](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_role_collection_assignment) | resource |
193+
| [btp_subaccount_service_instance.cf_service](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_service_instance) | resource |
100194
| [btp_subaccount_subscription.subscription](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_subscription) | resource |
101195
| [btp_subaccount_trust_configuration.custom_idp](https://registry.terraform.io/providers/SAP/btp/latest/docs/resources/subaccount_trust_configuration) | resource |
102196
| [btp_directories.all](https://registry.terraform.io/providers/SAP/btp/latest/docs/data-sources/directories) | data source |
197+
| [btp_subaccount_service_plan.cf_service_plan](https://registry.terraform.io/providers/SAP/btp/latest/docs/data-sources/subaccount_service_plan) | data source |
103198

104199
## Inputs
105200

106201
| Name | Description | Type | Default | Required |
107202
|------|-------------|------|---------|:--------:|
108-
| <a name="input_cloudfoundry_instance"></a> [cloudfoundry\_instance](#input\_cloudfoundry\_instance) | Configuration for Cloud Foundry environment instance. Set to null to skip creation. | <pre>object({<br> name = optional(string, "cf-instance")<br> environment = optional(string, "cloudfoundry")<br> plan_name = string<br> parameters = optional(map(string), {})<br> })</pre> | `null` | no |
109-
| <a name="input_entitlements"></a> [entitlements](#input\_entitlements) | List of entitlements to assign to the subaccount. For quota-based services, specify 'amount'. For multitenant applications (category APPLICATION), omit 'amount' or set to null. Entitlements must be configured before subscriptions can be created. | <pre>list(object({<br> service_name = string<br> plan_name = string<br> amount = optional(number)<br> }))</pre> | `[]` | no |
203+
| <a name="input_cf_services"></a> [cf\_services](#input\_cf\_services) | Comma-separated list of Cloud Foundry service instances in format: service.plan (e.g., 'postgresql.small,destination.lite,redis.medium') | `string` | `""` | no |
204+
| <a name="input_cloudfoundry_plan"></a> [cloudfoundry\_plan](#input\_cloudfoundry\_plan) | Cloud Foundry environment plan (standard or trial) | `string` | `"standard"` | no |
205+
| <a name="input_cloudfoundry_space_name"></a> [cloudfoundry\_space\_name](#input\_cloudfoundry\_space\_name) | Name for the Cloud Foundry space | `string` | `"dev"` | no |
206+
| <a name="input_enable_cloudfoundry"></a> [enable\_cloudfoundry](#input\_enable\_cloudfoundry) | Enable Cloud Foundry environment in the subaccount | `bool` | `false` | no |
207+
| <a name="input_entitlements"></a> [entitlements](#input\_entitlements) | Comma-separated list of service entitlements in format: service.plan (e.g., 'postgresql-db.trial,destination.lite,xsuaa.application') | `string` | `""` | no |
110208
| <a name="input_globalaccount"></a> [globalaccount](#input\_globalaccount) | The subdomain of the global account in which you want to manage resources. | `string` | n/a | yes |
209+
| <a name="input_identity_provider"></a> [identity\_provider](#input\_identity\_provider) | Custom identity provider origin (e.g., mytenant.accounts.ondemand.com). Leave empty to skip trust configuration. | `string` | `""` | no |
111210
| <a name="input_project_identifier"></a> [project\_identifier](#input\_project\_identifier) | The meshStack project identifier. | `string` | n/a | yes |
112-
| <a name="input_region"></a> [region](#input\_region) | The region of the subaccount. | `string` | `"eu30"` | no |
113-
| <a name="input_subfolder"></a> [subfolder](#input\_subfolder) | The subfolder to use for the SAP BTP resources. This is used to create a folder structure in the SAP BTP cockpit. | `string` | n/a | yes |
114-
| <a name="input_subscriptions"></a> [subscriptions](#input\_subscriptions) | List of application subscriptions to create in the subaccount (e.g., SAP Build Code, Process Automation). | <pre>list(object({<br> app_name = string<br> plan_name = string<br> parameters = optional(map(string), {})<br> }))</pre> | `[]` | no |
115-
| <a name="input_trust_configuration"></a> [trust\_configuration](#input\_trust\_configuration) | Trust configuration for external Identity Provider (e.g., SAP IAS). Set to null to skip configuration. Only identity\_provider is required; origin and other attributes are computed. | <pre>object({<br> identity_provider = string<br> })</pre> | `null` | no |
211+
| <a name="input_region"></a> [region](#input\_region) | The region of the subaccount. | `string` | `"eu10"` | no |
212+
| <a name="input_subfolder"></a> [subfolder](#input\_subfolder) | The subfolder to use for the SAP BTP resources. This is used to create a folder structure in the SAP BTP cockpit. | `string` | `""` | no |
213+
| <a name="input_subscriptions"></a> [subscriptions](#input\_subscriptions) | Comma-separated list of application subscriptions in format: app.plan (e.g., 'build-workzone.standard,integrationsuite.enterprise\_agreement') | `string` | `""` | no |
116214
| <a name="input_users"></a> [users](#input\_users) | Users and their roles provided by meshStack | <pre>list(object(<br> {<br> meshIdentifier = string<br> username = string<br> firstName = string<br> lastName = string<br> email = string<br> euid = string<br> roles = list(string)<br> }<br> ))</pre> | `[]` | no |
117-
| <a name="input_workspace_identifier"></a> [workspace\_identifier](#input\_workspace\_identifier) | The meshStack workspace identifier. | `string` | n/a | yes |
118215

119216
## Outputs
120217

@@ -126,6 +223,7 @@ No modules.
126223
| <a name="output_btp_subaccount_region"></a> [btp\_subaccount\_region](#output\_btp\_subaccount\_region) | n/a |
127224
| <a name="output_cloudfoundry_instance_id"></a> [cloudfoundry\_instance\_id](#output\_cloudfoundry\_instance\_id) | ID of the Cloud Foundry environment instance (if created) |
128225
| <a name="output_cloudfoundry_instance_state"></a> [cloudfoundry\_instance\_state](#output\_cloudfoundry\_instance\_state) | State of the Cloud Foundry environment instance (if created) |
226+
| <a name="output_cloudfoundry_services"></a> [cloudfoundry\_services](#output\_cloudfoundry\_services) | Map of Cloud Foundry service instances created in this subaccount |
129227
| <a name="output_entitlements"></a> [entitlements](#output\_entitlements) | Map of entitlements created for this subaccount |
130228
| <a name="output_subscriptions"></a> [subscriptions](#output\_subscriptions) | Map of application subscriptions created in this subaccount |
131229
| <a name="output_trust_configuration_origin"></a> [trust\_configuration\_origin](#output\_trust\_configuration\_origin) | Origin key of the configured trust configuration (if configured) |

0 commit comments

Comments
 (0)