Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terraform-ibm-modules/terraform-ibm-cloudant

Deploys and configures an IBM Cloudant instance
https://github.com/terraform-ibm-modules/terraform-ibm-cloudant

cloudant core-team deployable-architecture graduated supported terraform-module

Last synced: about 1 month ago
JSON representation

Deploys and configures an IBM Cloudant instance

Awesome Lists containing this project

README

        

# Cloudant Module

[![Graduated (Supported)](https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-cloudant?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-cloudant/releases/latest)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)

This module supports provisioning a instance of the IBM Cloudant service. With a Lite plan, the instance is provisioned on a multi-tenant environment. With a standard plan, the instance can be provisioned either on a multi-tenant or on a dedicated environment. For more information, see [Plans and provisioning](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloud-public).

## Overview
* [terraform-ibm-cloudant](#terraform-ibm-cloudant)
* [Submodules](./modules)
* [fscloud](./modules/fscloud)
* [Examples](./examples)
* [Basic cloudant instance and database creation](./examples/basic)
* [Cloudant instance, access controls, and rotation of credentials through Secret Manager](./examples/complete)
* [Financial Services Cloud profile example](./examples/fscloud)
* [Contributing](#contributing)

## cloudant-module

### Usage

#### Usage to create a cloudant instance on a multi-tenant environment:

```hcl
module "cloudant" {
source = "terraform-ibm-modules/cloudant/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
instance_name = "my-cloudant-instance"
}
```

#### Usage to create a cloudant instance on a dedicated environment:

```hcl
module "cloudant" {
source = "terraform-ibm-modules/cloudant/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX"
instance_name = "dedicated-cloudant-instance"
environment_crn = "crn:<...>" # CRN of dedicated environment
}
```

### Required IAM access policies

You need the following permissions to run this module.

- IAM Services
- Cloudant service
- `Manager` service access

### Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
| [ibm](#requirement\_ibm) | >= 1.56.1, < 2.0.0 |

### Modules

No modules.

### Resources

| Name | Type |
|------|------|
| [ibm_cloudant.cloudant_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cloudant) | resource |
| [ibm_cloudant_database.cloudant_database](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cloudant_database) | resource |
| [ibm_resource_tag.access_tags](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_tag) | resource |

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [access\_tags](#input\_access\_tags) | List of access tags to be associated with the Cloudant instance | `list(string)` | `[]` | no |
| [allow\_credentials](#input\_allow\_credentials) | Boolean value to allow authentication credentials. | `bool` | `true` | no |
| [capacity](#input\_capacity) | Number of blocks of throughput units. See https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloud-public#provisioned-throughput-capacity. Capacity modification is not supported for lite plan. | `number` | `1` | no |
| [database\_config](#input\_database\_config) | (Optional, List) The databases with their corresponding partitioning and shards to be created in the cloudant instance |

list(object({
db = string
partitioned = optional(bool)
shards = optional(number)
}))
| `[]` | no |
| [enable\_cors](#input\_enable\_cors) | Boolean value to enable CORS. The supported values are true and false. | `bool` | `false` | no |
| [environment\_crn](#input\_environment\_crn) | Optional CRN of the IBM Cloudant Dedicated Hardware plan instance to provision a cloudant instance | `string` | `null` | no |
| [include\_data\_events](#input\_include\_data\_events) | Include data event types in events sent to IBM Cloud Activity Tracker. If set to false, only management events will be sent to Activity Tracker. | `bool` | `false` | no |
| [instance\_name](#input\_instance\_name) | The name of the Cloudant instance | `string` | n/a | yes |
| [legacy\_credentials](#input\_legacy\_credentials) | Use both legacy credentials, in addition to IAM credentials for authentication. If set to false, use use only IAM credentials. | `bool` | `false` | no |
| [origins](#input\_origins) | An array of strings that contain allowed origin domains. | `list(string)` | `[]` | no |
| [plan](#input\_plan) | The plan for the Cloudant instance. Standard or lite. | `string` | `"standard"` | no |
| [region](#input\_region) | The IBM Cloud region where the Cloudant instance will be provisioned. | `string` | `"us-south"` | no |
| [resource\_group\_id](#input\_resource\_group\_id) | The Id of an existing IBM Cloud resource group where the instance will be grouped. | `string` | n/a | yes |
| [service\_endpoints](#input\_service\_endpoints) | Sets the endpoint of the instance, valid values are 'public', 'private', or 'public-and-private' | `string` | `"public-and-private"` | no |
| [tags](#input\_tags) | List of tags to be associated to cloudant instance | `list(string)` | `[]` | no |

### Outputs

| Name | Description |
|------|-------------|
| [capacity](#output\_capacity) | A number of blocks of throughput units |
| [crn](#output\_crn) | CRN of the resource instance |
| [db\_map](#output\_db\_map) | A map of the Cloudant database names created and their respective IDs |
| [instance\_guid](#output\_instance\_guid) | Global identifier of the cloudant instance created |
| [instance\_id](#output\_instance\_id) | The id of the cloudant instance created |
| [instance\_name](#output\_instance\_name) | Name of the cloudant instance |
| [instance\_url](#output\_instance\_url) | The dashboard URL to access resource |
| [plan](#output\_plan) | The plan used to create cloudant instance |
| [private\_endpoint](#output\_private\_endpoint) | The external private endpoint |
| [public\_endpoint](#output\_public\_endpoint) | The external public endpoint |
| [resource\_group\_name](#output\_resource\_group\_name) | The resource group name in which resource is provisioned |
| [resource\_keys\_url](#output\_resource\_keys\_url) | The relative path to the resource keys for the instance |
| [state](#output\_state) | The current state of the 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.