https://github.com/terraform-ibm-modules/terraform-ibm-enterprise-app-java
Provisions and configures a Liberty as a Service instance into an IBM Cloud account.
https://github.com/terraform-ibm-modules/terraform-ibm-enterprise-app-java
core-team deployable-architecture enterprise-app-java ibm-cloud terraform terraform-module
Last synced: 4 months ago
JSON representation
Provisions and configures a Liberty as a Service instance into an IBM Cloud account.
- Host: GitHub
- URL: https://github.com/terraform-ibm-modules/terraform-ibm-enterprise-app-java
- Owner: terraform-ibm-modules
- License: apache-2.0
- Created: 2024-07-23T14:35:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-17T14:36:16.000Z (4 months ago)
- Last Synced: 2026-02-17T18:59:16.148Z (4 months ago)
- Topics: core-team, deployable-architecture, enterprise-app-java, ibm-cloud, terraform, terraform-module
- Language: HCL
- Size: 413 KB
- Stars: 0
- Watchers: 13
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Enterprise Application Service for Java
[-brightgreen?style=plastic)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[](https://github.com/terraform-ibm-modules/terraform-ibm-enterprise-app-java/releases/latest)
[](https://github.com/pre-commit/pre-commit)
[](https://renovatebot.com/)
[](https://github.com/semantic-release/semantic-release)
Use this module to provision and configure an [Enterprise Application Service](https://cloud.ibm.com/catalog/services/enterprise-application-service) (also shorthened to EASeJava or simply to `ease`) instance on IBM Cloud.
For more information about the Enterprise Application Service product you can refer to the [product documentation](https://www.ibm.com/docs/en/ease?topic=overview)
## Overview
* [terraform-ibm-enterprise-app-java](#terraform-ibm-enterprise-app-java)
* [Examples](./examples)
*
*
*
* [Contributing](#contributing)
## Enterprise Application Service use cases support
This module supports both the use cases provided by the Enterprise Application Service:
- **Deploy and Run your application** use case: you can provide your existing prebuilt enterprise archive (EAR) or web archive (WAR) file in a Maven artifact repository, the service will allow to deploy and to run it.
- **Build, deploy and run your application** use case: you can provide your application source code through its GitHub repository URL, the service will allow to build, deploy and then run it.
For more details about the two different use-cases and the input parameters to use please refer to the sections below.
### Mandatory input parameters for both the use cases
Both the use-cases supported by this module need you to specify the following parameters as mandatory inputs.
1. The IBM Cloud API Key (https://cloud.ibm.com/iam/apikeys) for the account where to deploy the Enterprise Application Service instance
1. Resource Group ID (https://cloud.ibm.com/account/resource-groups) containing the Enterprise Application Service instance
## Deploy and Run use case input parameters
The following optional input parameters are required in order to pre-configure the Enterprise Application Service instance for the Deploy and Run use case:
1. URL of the Maven artifact repository storing the existing prebuilt enterprise archive (EAR) or web archive (WAR) file to run in the Enterprise Application Service instance
1. If your Maven artifact repository needs basic authentication, you can specify the username and password using the related input variables. If the repository doesn't need authentication, you can leave them to their default values.
2. URL of the GitHub repository storing the application deployment configuration to run in the Enterprise Application Service instance
3. GitHub token with read access to the configuration repository.
**Note:** all these parameters (excluding the Maven repository username and password) are mandatory in the case any of them is different than their default null value (the GitHub token is mandatory also if the configuration repository is public). When all of them are left to the default null value it will be possible to configure the instance with their values once the instance is successfully created, as describe [here](#create-an-enterprise-application-service-instance-without-setting-any-repository)
The GitHub configuration repository must satisfy a further prerequisite as described [here](#ibm-appflow-github-application-prerequisite)
For more details about this use-case please refer to the Enterprise Application Service product documentation section available [here](https://www.ibm.com/docs/en/ease?topic=deploy-run-your-application-option)
### Build, Deploy and Run use case input parameters
The following optional input parameters are required in order to pre-configure the Enterprise Application Service instance for the Build, deploy and run use case:
1. URL of the GitHub repository storing your application source code to Build, deploy and run in the Enterprise Application Service instance
1. URL of the GitHub repository storing your application configuration to Build, deploy and run in the Enterprise Application Service instance
1. GitHub token with read access the source code and configuration repositories.
**Note:** all these parameters are mandatory in the case any of them is different than their default null value (the GitHub token is mandatory also if both the repositories are public). When all of them are left to the default null value it will be possible to configure the instance with their values once the instance is successfully created, as describe [here](#create-an-enterprise-application-service-instance-without-setting-any-repository)
Both the repositories must satisfy a further prerequisite as described [here](#ibm-appflow-github-application-prerequisite)
For more details about this use-case please refer to the Enterprise Application Service product documentation section available [here](https://www.ibm.com/docs/en/ease?topic=build-deploy-run-your-application-option)
#### IBM AppFlow GitHub application prerequisite
In order to configure the Enterprise Application Service instance to build the Java liberty application using the source code and the configuration repositories, the GitHub application **IBM AppFlow** must installed in the GitHub organization(s) hosting the repositories and enable to access both of them.
To install and configure the **IBM AppFlow** GitHub application refer to https://github.com/apps/ibm-enterprise-application-service
**Note:** in the case you need to configure an Enterprise Application Service instance in an environment different from IBM Cloud public platform, you need to install and configure a specific version of the **IBM AppFlow** GitHub application.
### Create an Enterprise Application Service instance without setting any repository
This module also supports to create an instance of the Enterprise Application Service without setting any source (GitHub or Maven) and configuration repository: in this case it will be possible to configure them through the Enterprise Application Service dashboard accessible through the dashboard URL returned in the `ease_instance` output details of this module.
### Java liberty sample application
For an example of source code and configuration repositories to Build, deploy and run in an Enterprise Application Service instance you can fork the repositories below:
- source code repository: https://github.com/IBMAppFlowTest/sample-getting-started
- configuration repository: https://github.com/IBMAppFlowTest/sample-getting-started-config
## terraform-ibm-enterprise-app-java
### Usage
```hcl
provider "ibm" {
ibmcloud_api_key = "XXXXXXXXXX"
}
module "ease_module" {
# Replace "master" with a GIT release version to lock into a specific release
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-enterprise-app-java.git?ref=master"
ease_name = "your-ease-app-name"
resource_group_id = module.resource_group.resource_group_id
tags = var.resource_tags
plan = var.plan
region = var.region
config_repo = var.config_repo
source_repo = var.source_repo
repos_git_token = var.repos_git_token
}
```
### Required IAM access policies
You need the following permissions to run this module:
- IAM services
- **enterprise-application-service** service
- `Editor` platform access
### Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.9.0 |
| [ibm](#requirement\_ibm) | >= 1.67.0, < 2.0.0 |
### Modules
No modules.
### Resources
| Name | Type |
|------|------|
| [ibm_resource_instance.ease_instance](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/resources/resource_instance) | resource |
### Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [config\_repo](#input\_config\_repo) | The URL for the repository storing the configuration to use for the application to run through Enterprise Application Service on IBM Cloud. | `string` | `null` | no |
| [ease\_name](#input\_ease\_name) | The name for the newly provisioned Enterprise Application Service instance. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"instance"` | no |
| [maven\_repository\_password](#input\_maven\_repository\_password) | Maven repository authentication password if needed. Default to null. | `string` | `null` | no |
| [maven\_repository\_username](#input\_maven\_repository\_username) | Maven repository authentication username if needed. Default to null. | `string` | `null` | no |
| [plan](#input\_plan) | The desired pricing plan for Enterprise Application Service instance. | `string` | `"standard"` | no |
| [region](#input\_region) | The desired region for deploying Enterprise Application Service instance. | `string` | `"us-east"` | no |
| [repos\_git\_token](#input\_repos\_git\_token) | The GitHub token to read from the application and configuration repositories. It cannot be null if var.source\_repo and var.config\_repo are not null. | `string` | `null` | no |
| [resource\_group\_id](#input\_resource\_group\_id) | The ID of the resource group to use for the creation of the Enterprise Application Service instance. | `string` | n/a | yes |
| [source\_repo](#input\_source\_repo) | The URL for the repository storing the source code of the application or the URL of the Maven artifact repository storing the existing prebuilt archive (WAR or EAR) to deploy and run through Enterprise Application Service on IBM Cloud. | `string` | `null` | no |
| [source\_repo\_type](#input\_source\_repo\_type) | Type of the source code repository. For maven source repository type, use value `maven`. Git for GitHub repository. Default value set to git. | `string` | `"git"` | no |
| [subscription\_id](#input\_subscription\_id) | ID of the subscription to use to create the Enterprise Application Service instance. | `string` | n/a | yes |
| [tags](#input\_tags) | Metadata labels describing the service instance, i.e. test | `list(string)` | `[]` | no |
### Outputs
| Name | Description |
|------|-------------|
| [ease\_instance](#output\_ease\_instance) | Enterprise Application Service instance details |
## Contributing
You can report issues and request features for this module in GitHub issues in the module repo. See [Report an issue or request a feature](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).
To set up your local development environment, see [Local development setup](https://terraform-ibm-modules.github.io/documentation/#/local-dev-setup) in the project documentation.