This module provisions an IBM Backup and Recovery Service (BRS) instance, a data source connection, and generates a registration token for agent installation. It supports both creating new resources and referencing existing ones.
Use this module to automate BRS setup in IBM Cloud with Terraform.
terraform {
required_version = ">= 1.9.0"
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "X.Y.Z" # Lock into a provider version that satisfies the module constraints
}
}
}
locals {
region = "us-south"
}
provider "ibm" {
ibmcloud_api_key = "XXXXXXXXXX" # replace with apikey value # pragma: allowlist secret
region = local.region
}
module "module_template" {
source = "terraform-ibm-modules/backup-recovery/ibm"
version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
region = local.region
resource_group_id = "xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX" # Replace with the actual ID of resource group to use
ibmcloud_api_key = "XXXXXXXXXX" # replace with apikey value # pragma: allowlist secret
}You need the following permissions to run this module:
- Resource group
Vieweraccess on the target resource group
- Backup and Recovery Service
Editorplatform accessManagerservice access
| Name | Version |
|---|---|
| terraform | >= 1.9.0 |
| ibm | >= 1.85.0, < 2.0.0 |
No modules.
| Name | Type |
|---|---|
| ibm_backup_recovery_data_source_connection.connection | resource |
| ibm_resource_instance.backup_recovery_instance | resource |
| terraform_data.delete_policies | resource |
| ibm_backup_recovery_data_source_connections.connections | data source |
| ibm_resource_instance.backup_recovery_instance | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| connection_name | Name of the data source connection. | string |
"brs-connection" |
no |
| create_new_connection | Set to true to create a new data source connection, false to use existing. | bool |
true |
no |
| create_new_instance | Set to true to create a new BRS instance, false to use existing one. | bool |
true |
no |
| endpoint_type | The endpoint type to use when connecting to the Backup and Recovery service for creating a data source connection. Allowed values are 'public' or 'private'. | string |
"public" |
no |
| ibmcloud_api_key | The IBM Cloud platform API key needed to deploy IAM enabled resources. | string |
n/a | yes |
| instance_name | Name of the Backup & Recovery Service instance. | string |
"brs-instance" |
no |
| plan | The plan type for the Backup and Recovery service. Currently, only the premium plan is available. | string |
"premium" |
no |
| region | IBM Cloud region where the instance is located or will be created. | string |
"us-east" |
no |
| resource_group_id | Resource group ID where the BRS instance exists or will be created. | string |
n/a | yes |
| tags | Metadata labels describing this backup and recovery service instance, i.e. test | list(string) |
[] |
no |
| Name | Description |
|---|---|
| brs_instance_guid | GUID of the BRS instance. |
| connection_id | Unique ID of the data source connection. Used to identify the connection in BRS for agent registration and management. |
| registration_token | Registration token used to enroll data source connectors with the BRS connection. Expires in 24 hours. Must be kept secure. |
| tenant_id | BRS tenant ID in the format <tenant-guid>/. Required for API calls and agent configuration. |
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.