Skip to content

Provisions and configures a Liberty as a Service instance into an IBM Cloud account.

License

Notifications You must be signed in to change notification settings

terraform-ibm-modules/terraform-ibm-enterprise-app-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enterprise Application Service for Java (also know as EASeJava)

Incubating (Not yet consumable) latest release pre-commit Renovate enabled semantic-release

Use this module to provision and configure an Enterprise Application Service instance on IBM Cloud.

Overview

Prerequisites

This module has the following prerequisites as mandatory input parameters:

  1. The IBM Cloud API Key (https://cloud.ibm.com/iam/apikeys) for the account where to deploy the Enterprise Application Service instance
  2. Resource Group ID (https://cloud.ibm.com/account/resource-groups) containing the Enterprise Application Service instance

Optionally, the following optional input parameters are required in order to pre-configure the Enterprise Application Service instance:

  1. URL of the repository storing the Java liberty application source code to build in the Enterprise Application Service instance
  2. URL of the repository storing the Java liberty application configuration to build in the Enterprise Application Service instance
  3. GitHub token with read access to the source code and to the configuration repositories.

Note: all these parameters are mandatory in the case any of them is different than their default null value, with the GitHub token mandatory also if the source code and the configuration repositories are both public.

In the case the source code and the configuration repositories are not set at Enterprise Application Service instance deployment time, it will be possible to configure them through the Enterprise Application Service dashboard url that will be included in the ease_instance output details of this module.

In both the cases (pre-configure the Enterprise Application Service instance at deployment time or configure it through its dashboard when the instance deployment is complete), the repositories must satisfy a further prerequisite as described here

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.

Java liberty sample application

For an example of source code and configuration repositories to build in an Enterprise Application Service instance you can fork the repositories below:

terraform-ibm-enterprise-app-java

Usage

provider "ibm" {
  ibmcloud_api_key = "XXXXXXXXXX" <!-- pragma: allowlist secret -->
}

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 <!-- pragma: allowlist secret -->
}

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 >= 1.3.0
ibm >= 1.67.0, < 2.0.0

Modules

No modules.

Resources

Name Type
ibm_resource_instance.ease_instance resource

Inputs

Name Description Type Default Required
config_repo The URL for the repository storing the configuration to use for the application to deploy through IBM Cloud Enterprise Application Service. string null no
ease_name The name for the newly provisioned Enterprise Application Service instance. string n/a yes
plan The desired pricing plan for Enterprise Application Service instance. string "standard" no
region The desired region for deploying Enterprise Application Service instance. string "us-east" no
repos_git_token The GitHub token to read from the application and configuration repos. It cannot be null if var.source_repo and var.config_repo are not null. string null no
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 The URL for the repository storing the source code of the application to deploy through IBM Cloud Enterprise Application Service. string null no
subscription_id ID of the subscription to use to create the Enterprise Application Service instance. string n/a yes
tags Metadata labels describing the service instance, i.e. test list(string) [] no

Outputs

Name Description
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.

To set up your local development environment, see Local development setup in the project documentation.