https://github.com/terraform-ibm-modules/terraform-ibm-db2-cloud
Provision a fully managed, high performance transactional database for mission critical workloads.
https://github.com/terraform-ibm-modules/terraform-ibm-db2-cloud
core-team db2 deployable-architecture ibm-cloud supported terraform terraform-module
Last synced: 4 months ago
JSON representation
Provision a fully managed, high performance transactional database for mission critical workloads.
- Host: GitHub
- URL: https://github.com/terraform-ibm-modules/terraform-ibm-db2-cloud
- Owner: terraform-ibm-modules
- License: apache-2.0
- Created: 2024-10-07T15:20:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-10T14:25:35.000Z (4 months ago)
- Last Synced: 2026-02-10T18:55:16.441Z (4 months ago)
- Topics: core-team, db2, deployable-architecture, ibm-cloud, supported, terraform, terraform-module
- Language: HCL
- Size: 245 KB
- Stars: 0
- Watchers: 12
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Cloud Automation for DB2 SaaS
[-brightgreen?style=plastic)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[](https://github.com/terraform-ibm-modules/terraform-ibm-db2-cloud/releases/latest)
[](https://github.com/pre-commit/pre-commit)
[](https://renovatebot.com/)
[](https://github.com/semantic-release/semantic-release)
This module creates a DB2 instance on IBM Cloud
## Overview
* [terraform-ibm-db2-cloud](#terraform-ibm-db2-cloud)
* [Examples](./examples)
:information_source: Ctrl/Cmd+Click or right-click on the Schematics deploy button to open in a new tab
* Advanced example
* Basic example
* [Deployable Architectures](./solutions)
* Cloud automation for DB2 on Cloud (Fully configurable)
* [Contributing](#contributing)
## Reference architectures

## terraform-ibm-db2-cloud
### Usage
```hcl
module "db2" {
source = "terraform-ibm-modules/db2-cloud/ibm"
version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
db2_instance_name = "my-db2-instance"
resource_group_id = "asdf1234"
service_endpoints = "public-and-private"
enable_high_availability = true
enable_oracle_compatibility = false
node_type = "bx2.4x16"
tags = ["tag1", "tag2"]
}
```
### Required access policies
You need the following permissions to run this module:
- Service
- **dashdb-for-transactions** service
- `Editor` platform access
- `Manager` service access
### Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.9.0 |
| [ibm](#requirement\_ibm) | >= 1.79.0, < 2.0.0 |
### Modules
No modules.
### Resources
| Name | Type |
|------|------|
| [ibm_db2.db2](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/db2) | resource |
### Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [db2\_instance\_name](#input\_db2\_instance\_name) | The name of the Db2 instance to create. | `string` | n/a | yes |
| [enable\_high\_availability](#input\_enable\_high\_availability) | Whether to enable high availability for the Db2 instance. | `bool` | `false` | no |
| [enable\_oracle\_compatibility](#input\_enable\_oracle\_compatibility) | Whether to enable compatibility with Oracle for the Db2 instance. | `bool` | `false` | no |
| [node\_type](#input\_node\_type) | The node type of the Db2 instance. Possible values are `bx2.1x4`, `bx2.4x16`, `bx2.8x32`, `bx2.16x64`, `bx2.32.128`, `bx2.48x192`, `mx2.4x32`, `mx2.16x128`, or `mx2.128x1024`. | `string` | `"bx2.4x16"` | no |
| [region](#input\_region) | The region where the Db2 instance is created. | `string` | `"us-south"` | no |
| [resource\_group\_id](#input\_resource\_group\_id) | The ID of the resource group that contains the Db2 instance. | `string` | n/a | yes |
| [service\_endpoints](#input\_service\_endpoints) | Service endpoints for the Db2 instance. Possible values are `public`, `private`, or `public-and-private`. | `string` | `"public"` | no |
| [subscription\_id](#input\_subscription\_id) | Value of the subscription ID to use with the subscription plan for Db2. | `string` | `null` | no |
| [tags](#input\_tags) | The list of resource tags to associate with your Db2 instance. | `list(string)` | `[]` | no |
### Outputs
| Name | Description |
|------|-------------|
| [crn](#output\_crn) | CRN of the Db2 instance. |
| [dashboard\_url](#output\_dashboard\_url) | Dashboard URL of the Db2 instance. |
| [name](#output\_name) | Name of the Db2 instance. |
## 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.