## 4.1.8.1.6.1  Resources
The application modules defined in the 'modules' section of the deployment descriptor may depend on resources .
The resources may be used as:
- platform services managed by the deployer or only used by the applications
- configuration entries used by the applications and services
In the resources section, the following elements are mandatory:
- name - Must be unique within the MTA it identifies
Optional resource attributes include:
- type - the resource type is one of a reserved list of resource types supported by the MTA-aware deployment tools, for example: com.sap.xs.uaa , com.sap.xs.hdi-container , com.sap.xs.jobscheduler ; the type indicates to the deployer how to discover, allocate, or provision the resource, for example, a managed service such as a database, or a user-provided service. When type is not defined, resource is used for configurations only for other modules and resources.
- description - non-translatable, free-text string; the string is not meant to be presented on application user interfaces (UI)
- properties - a structured set of name-value pairs
- parameters - reserved variables that affect the behavior of the MTA-aware tools, such as the deployer
- active - its value can be true or false and the default value is true . If set to false , the resource is not processed and it is ignored in the requires list of the application that requires it.
- processed-after - the attribute is used to create an order, in which resources should be processed. If a resource has this attribute, it will be processed after the other resources in a higher position are processed. The attribute value is a structured set of a list comprised of other resource names of the same MTA.
##  Tip
By default recourses process in parallel, but if you want to enable an order of resources, see Sequential Resource Processing [page 722].
- optional - its value can be true or false and the default value is false . If set to true , the resource processing is fail-safe.
## Active and Inactive Resources
If you deploy an application with a resource type attribute active set to false , the resource is not provisioned and no binding is created. If you have already deployed the application with the resource type attribute active set to true , the binding to the resource is removed.
## Deployment with managed-service, existing-service and user-provided service
No binding is created and in case of managed-service , no service is created.
## Deployment with org.cloudfoundry.existing-service-key
No binding to an application environment will be done in the following cases:
- If the org.cloudfoundry.existing-service-key resource itself is set to active: false
- If the org.cloudfoundry.existing-service-key resource is set to active: true , but refers to a resource, which is set to active: false
## Deployment with configuration resources (cross MTA dependencies)
If the configuration resource is set to active: false , then:
- If the requires section of the module type expects a list, then the environment variable assigned to this list is empty and subscriptions between the modules is not created
- If the requires section does not expect a list, then no environment variable is created
See section 'Optional resources' below for more information.
##  Restriction
System-specific parameters for the deployment descriptor must be included in a so-called MTA deployment extension descriptor.
## Optional Resources
To describe resources that are not mission-critical for the operation of your Multitarget Application, proceed as described below.
##  Note
This option is available with schema version 3.1 .
You can declare some resources as optional, which mitigates the cases when they are not listed, not available, or have failed to be created or updated. This means that when the deployer cannot allocate the required resource due to any of these reasons, it generates a warning and continues processing. Alternatively, if a resource is not declared as optional, the deployer generates an error and stops processing.
The following excerpt is a code example for the MANIFEST.MF file.
<!-- image -->
```
... - name: log type: com.sap.xs.auditlog optional: true ...
```
In the above example:
- If the log managed resource is not provided by the platform or landscape, a warning is logged and traced and the MTA deployment continues while ignoring the error.
- The available values for the optional parameter are true and false , with the latter being the default.
## Generic MTA Resource Types
- org.cloudfoundry.managed-service In cases you have to choose a managed service and/or service plan that is not listed in Predefined MTA Resource Types [page 616], you define it using the org.cloudfoundry.managed-service resource type with the following parameters:
- (Required) service - Name of the service to create.
- (Optional) service-name - Service instance name. Default value is the resource name.
##  Note
Service names that do not comply with the Cloud Foundry limitation of 50 symbols are automatically corrected. In such cases, the name is shortened and its end is replaced with a hash code.
- (Required) service-plan - Name of the service plan.
For example:
## 
```
Sample Code resources: - name: my-postgre-service type: org.cloudfoundry.managed-service parameters: service: postgresql service-plan: v9.6-dev
```
##  Note
To choose a different service plan for a predefined MTA resource type, for example to change the service plan for PostgreSQL service, you define it using:
##  Sample Code
```
resources: - name: my-postgre-service type: org.postgresql parameters: service-plan: v9.6-dev
```
Updating managed service instances is fail-safe by default in certain scenarios, specifically when the service broker is involved. This behavior exists for legacy compatibility with service brokers that did not support plan updates in the Cloud Controller v2 API. If this fail-safe behavior is not desired, you can control it by using the fail-on-service-update parameter. For more information, see Resource-Specific Parameters [page 619], Updating Service Plans [page 676], Updating Service Instance Parameters [page 679], Updating Service Tags [page 682].
##  Note
The optional parameter takes precedence over the fail-on-service-update parameter. If optional: true is specified, it overrides the behavior of the fail-on-service-update setting.
- org.cloudfoundry.existing-service То indicate that the (named) service exists, without managing its lifecycle, you define the service name by
- using the org.cloudfoundry.existing-service resource type with the following parameters: · (Optional) service-name - Service instance name. Default value is the resource name.
- org.cloudfoundry.existing-service-key Existing service keys can be modeled as a resource of type org.cloudfoundry.existing-servicekey , which checks and uses their credentials. For more information, see Service Keys [page 684].
- org.cloudfoundry.user-provided-service Create or update a user-provided service configured with the following resource parameters:
- (Optional) service-name - Name of the service to create. Default value is the resource name.
##  Note
Service names that do not comply with the Cloud Foundry limitation of 50 symbols are automatically corrected. In such cases, the name is shortened and its end is replaced with a hash code.
- (Required) config - Map value, containing the service creation configuration, for example url and user credentials (user and password)
- configuration For more information, see Cross-MTA Dependencies [page 723].
<!-- image -->
## Predefined MTA Resource Types
Modify the default MTA resource types by providing specific properties or parameters in the MTA deployment descriptor.
## Predefined MTA Resource Types and Mapped Services
| com.sap.xs.jobscheduler    | jobscheduler   | lite        | Job Scheduler   |
|----------------------------|----------------|-------------|-----------------|
| com.sap.xs.uaa             | xsuaa          | applicaton  | Application UAA |
| com.sap.xs.uaa-application | xsuaa          | application | Application UAA |
| com.sap.xs.uaa-devuser     | xsuaa          | application | Application UAA |
| com.sap.xs.uaa-space       | xsuaa          | application | Application UAA |
<!-- image -->
| Resource Type                                                                              | Service          | Service Plan   | Created Service                                                                                          |
|--------------------------------------------------------------------------------------------|------------------|----------------|----------------------------------------------------------------------------------------------------------|
| com.sap.xs.application- logs  Restriction                                                 | application-logs | lite           | Streams logs of bound applications to a cen- tral application logging stack                              |
| This resource type is now depre- cated. Use application-logs instead. com.sap.portal.site- | portal-services  | site-content   | Portal services                                                                                          |
| deployer com.sap.portal.site-host  Restriction                                            | portal-services  | site-host      | Portal services                                                                                          |
| com.sap.xs.auditlog                                                                        | auditlog         | standard       | Audit log service                                                                                        |
| auditlog                                                                                   | auditlog         | standard       | Audit log service                                                                                        |
| autoscaler                                                                                 | autoscaler       | standard       | Automatically increase or decrease the num- ber of application in- stances based on a policy you define. |
| application-logs                                                                           | application-logs | lite           | Streams logs of bound applications to a cen- tral application logging stack                              |
| connectivity                                                                               | connectivity     | lite           | Establishes a secure and reliable connec- tivity between cloud applications and on- premise systems      |
| destination                                                                                | destination      | lite           | Provides a secure and a reliable access to destination configura- tions                                  |
| feature-flags                                                                              | feature-flags    | lite           | Feature Flags service for controlling feature rollout                                                    |
<!-- image -->
<!-- image -->
| Resource Type                                                                                | Service                 | Service Plan   | Created Service                                          |
|----------------------------------------------------------------------------------------------|-------------------------|----------------|----------------------------------------------------------|
| ml-foundation-services                                                                       | ml-foundation- services | lite           |                                                          |
| objectstore                                                                                  | objectstore             | s3-standard    | Highly available and distributed consistent object store |
| org.mongodb  Restriction This resource type is now depre- cated. Use mongodb instead.       | mongodb                 | v3.0-container | MongoDB document- oriented database sys- tem.            |
| mongodb                                                                                      | mongodb                 | v3.0-container | MongoDB document- oriented database sys- tem             |
| org.postgresql  Restriction This resource type is now depre- cated. Use postgresql instead. | postgresql              | v9.4-container | PostgreSQL object-re- lational database sys- tem         |
| postgresql                                                                                   | postgresql              | v9.4-container | PostgreSQL object-re- lational database sys- tem         |
| com.rabbitmq  Restriction This resource type is now depre- cated. Use rabbitmq instead.     | rabbitmq                | v3.6-container | RabbitMQ messaging                                       |
| rabbitmq                                                                                     | rabbitmq                | v3.6-container | RabbitMQ messaging                                       |
| io.redis Restriction                                                                         | redis                   | v3.0-container | Redis in-memory data structure store                     |
| redis                                                                                        | redis                   | v3.0-container | Redis in-memory data structure store                     |
## Resource-Specific Parameters
Resource parameters have platform-specific semantics. To reference a parameter value, use the placeholder notation ${&lt;parameter&gt;} , for example, ${default-host} .
##  Tip
It is also possible to declare metadata for parameters and properties defined in the MTA deployment descriptor; the mapping is based on the parameter or property keys. For example, you can specify if a parameter is required ( optional: false ) or can be modified ( overwritable: true ).
The following parameters are supported:
##  Note
If you can't find a specific parameter from the native Cloud Foundry manifest here, refer to Prerequisites and Restrictions [page 601] to see which Cloud Foundry features are currently not supported.
MTA Development and Deployment Parameters
| Parameter        | Scope    | Read- Only (System)   | Description                                                                                                                                                                                 | Default Value   | Example                                                        |
|------------------|----------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|----------------------------------------------------------------|
| apply- namespace | Resource | Write                 | Applies namespace to the service name. If the name- space value is not provided in the CLI options, it is not ap- plied. For more information, see Fine-Grained Configura- tion [page 715]. |                 | resources: - name: java ... parameters: apply- namespace: true |
| config           | Resource | Write                 | Defines service creation pa- rameters. More information in Service Instance Parameters [page 677].                                                                                          | n/a             | See Service Instance Parame- ters [page 677].                  |
| Parameter                | Scope    | Read- Only (System)   | Description                                                                                                                                                                                                                                                                                                                                                    | Default Value                                         | Example                                                                                  |
|--------------------------|----------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------------|
| default- container- name | Resource | Yes                   | Default value for the container-name parame- ter that is used during HDI creation. It is based on the organization, space and re- source name, which are com- bined in a way that conforms to the container-name restric- tions for length and legal char- acters. All dash (-) symbols are replaced with an under- score (_).  Note It is highly recommended | Generated as described in the de- scription.          | <org_name>_<space_na me>_<resource_name>                                                 |
|                          |          |                       | to avoid using this param- eter with HANAservices because in some cases the generated name can- not comply with the HANAnaming limitations' requirements. Forward compatability is not guar- anteed.                                                                                                                                                           |                                                       |                                                                                          |
| default- service- name   | Resource | Yes                   | The name of the service in the Cloud Foundry environment to be created for this resource, based on the resource name with or without a name-space prefix.                                                                                                                                                                                                      | The resource name with or without a name-space prefix | nodejs-hdi-container com.sap.xs2.samples. xsjshelloworld.nodej s-hdi-container           |
| default- xsappname       | Resource | Yes                   | Default value for the xsappname parameter that is used during UAA creation. It is based on the service name, which is modified in a way that conforms to the xsappname restrictions for length and le- gal characters.                                                                                                                                         | Generated as described in the de- scription.          | xs_-deploy-service- database (if the serv- ice name is ' xs@-deploy- service-database ') |
| Parameter                | Scope    | Read- Only (System)   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Default Value                            | Example                                                         |
|--------------------------|----------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|-----------------------------------------------------------------|
| fail-on- service- update | Resource | Write                 | When this parameter is set to true, the deployment will fail on every service update failure. By default, service up- dates are fail-safe for asyn- chronous calls (Cloud Foundry API calls that result in a call to the service broker). When the parameter is set to false, deployments will not fail on service update failures, as the updates will be made fail- safe even for calls that do not result in a call to the respec- tive service broker. For more information, see: • Updating Service Plans [page 676] • Updating Service In- stance Parameters [page 679] | n/a (fails only on asyn- chronous calls) | fail-on-service- update: parameters: true plan: true tags: true |
| service                  | Resource | Write                 | The type of the created serv- ice                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Empty, or as specified in resource- type | service: hana                                                   |
| service- key-name        | Resource | Write                 | Used when consuming an ex- isting service key. Specifies the name of the service key. See Consumption of Service Keys [page 685] for more in- formation.                                                                                                                                                                                                                                                                                                                                                                                                                      | The name of the resource.                | service-key-name: my-service-key                                |
| Parameter       | Scope    | Read- Only (System)   | Description                                                                                                                                                                                                                                             | Default Value                              | Example                                                                                                                                                |
|-----------------|----------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| service- name   | Resource | Write                 | The name of the service in the Cloud Foundry environment to be created for this resource, based on the resource name with or without a name-space prefix.                                                                                               | $ {default -service -name}                 | nodejs-hdi-container com.sap.xs2.samples. xsjshelloworld.nodej s-hdi-container                                                                         |
|                 |          |                       |  Note Service names that do not comply with the Cloud Foundry limitation of 50 symbols are au- tomatically corrected. In such cases, the name is shortened and its end is replaced with a hash code.                                                   |                                            |                                                                                                                                                        |
| service- plan   | Resource | Write                 | The plan of the created serv- ice                                                                                                                                                                                                                       | Empty, or as specified in resource- type   | service-plan: hdi- shared                                                                                                                              |
| service- tags   | Resource | Write                 | Some services employ a list of custom tags, which provide an easier way for applications to parse <VCAP_SERVICES> for credentials. You can pro- vide custom tags when cre- ating a service instance. For more information, see Service Tags [page 682]. | n/a                                        | resources: - name: nodejs- uaa type: com.sap.xs.uaa parameters: service- tags: ["custom- tag-A", "custom- tag-B"]                                      |
| service- broker | Resource | Write                 | Use this parameter to specify the service broker you want to employ when you create your service. This can be useful for testing purposes, among oth- ers.                                                                                              | Nameof service broker you want to be used. | resources: - name: test- service type: org.cloudfoundry.m anaged-service parameters: service: foo service- plan: bar-a service- broker: test- broker-1 |
| Parameter              | Scope    | Read- Only (System)   | Description                                                                                                                                                                                                    | Default Value                                                                                                          | Example                                                                                                                                                                                                                                                                                                                                        |
|------------------------|----------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| skip- service- updates | Resource | Write                 | This parameter allows you to specify the service config- uration changes to ignore , when deciding if you want to update a service instance - in particular changes of serv- ice parameters , plan , or tags . | The default value for all is false . The service instance would be up- dated on change in any of the configura- tions. | resources: - name: service- name type: org.cloudfoundry.m anaged-service parameters: skip- service-updates: plan: true parameters: true tags: true In the example above, skip- service-updates modi- fies the update strategy as fol- lows: • allows users to spec- ify which configurations should not be updated Note that these 3 key-value |
| syslog- drain-url      | Resource | Write                 | The URL to which logs for bound applications are streamed.  Note This feature only works for user-provided serv- ices.                                                                                        | n/a                                                                                                                    | resources: - name: service- name type: org.cloudfoundry.u ser-provided- service parameters: syslog-drain- url: syslog:// example.log-                                                                                                                                                                                                          |
##  Tip
For a better understanding of the interactions among the service, service broker, and service instances, see Provisioning and integrating service instances .
## Related Information
Services Overview
<!-- image -->
Provisioning and integrating service instances