Skip to content

Commit 67be6a0

Browse files
committed
Merge branch 'main' into configuration
2 parents 0620f65 + 9a3aaf0 commit 67be6a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1682
-588
lines changed

.catalog-onboard-pipeline.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ offerings:
66
catalog_id: 7df1e4ca-d54c-4fd0-82ce-3d13247308cd
77
offering_id: 01f5b01a-3650-4acf-aaf3-4790f7cbd422
88
variations:
9-
- name: standard
9+
- name: fully-configurable
1010
mark_ready: true
1111
install_type: fullstack
1212
scc:
1313
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
1414
region: us-south
15+
scope_resource_group_var_name: existing_resource_group_name
16+
- name: security-enforced
17+
mark_ready: true
18+
install_type: fullstack
19+
scc:
20+
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
21+
region: us-south
22+
scope_resource_group_var_name: existing_resource_group_name

.secrets.baseline

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-12-14T14:08:48Z",
6+
"generated_at": "2025-07-24T12:57:34Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -76,7 +76,26 @@
7676
"name": "TwilioKeyDetector"
7777
}
7878
],
79-
"results": {},
79+
"results": {
80+
"solutions/fully-configurable/DA-types.md": [
81+
{
82+
"hashed_secret": "44cdfc3615970ada14420caaaa5c5745fca06002",
83+
"is_secret": false,
84+
"is_verified": false,
85+
"line_number": 124,
86+
"type": "Secret Keyword",
87+
"verified_result": null
88+
},
89+
{
90+
"hashed_secret": "bd0d0d73a240c29656fb8ae0dfa5f863077788dc",
91+
"is_secret": false,
92+
"is_verified": false,
93+
"line_number": 129,
94+
"type": "Secret Keyword",
95+
"verified_result": null
96+
}
97+
]
98+
},
8099
"version": "0.13.1+ibm.62.dss",
81100
"word_list": {
82101
"file": null,

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Graduated (Supported)](https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
44
[![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)
55
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
6-
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-module-template?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-module-template/releases/latest)
6+
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-icd-rabbitmq?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-module-template/releases/latest)
77
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
88

99
This module implements an instance of the IBM Cloud Messages for RabbitMQ service.
@@ -57,16 +57,16 @@ You need the following permissions to run this module.
5757
| Name | Version |
5858
|------|---------|
5959
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
60-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.70.0, <2.0.0 |
61-
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |
60+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.79.2, <2.0.0 |
61+
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1, < 1.0.0 |
6262

6363
### Modules
6464

6565
| Name | Source | Version |
6666
|------|--------|---------|
67-
| <a name="module_backup_key_crn_parser"></a> [backup\_key\_crn\_parser](#module\_backup\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.1.0 |
68-
| <a name="module_cbr_rule"></a> [cbr\_rule](#module\_cbr\_rule) | git::https://github.com/terraform-ibm-modules/terraform-ibm-cbr//modules/cbr-rule-module | v1.31.0 |
69-
| <a name="module_kms_key_crn_parser"></a> [kms\_key\_crn\_parser](#module\_kms\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.1.0 |
67+
| <a name="module_backup_key_crn_parser"></a> [backup\_key\_crn\_parser](#module\_backup\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 |
68+
| <a name="module_cbr_rule"></a> [cbr\_rule](#module\_cbr\_rule) | terraform-ibm-modules/cbr/ibm//modules/cbr-rule-module | 1.33.2 |
69+
| <a name="module_kms_key_crn_parser"></a> [kms\_key\_crn\_parser](#module\_kms\_key\_crn\_parser) | terraform-ibm-modules/common-utilities/ibm//modules/crn-parser | 1.2.0 |
7070

7171
### Resources
7272

@@ -93,10 +93,11 @@ You need the following permissions to run this module.
9393
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | (Optional, list) List of context-based restrictions rules to create. | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> tags = optional(list(object({<br/> name = string<br/> value = string<br/> })))<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |
9494
| <a name="input_configuration"></a> [configuration](#input\_configuration) | Database configuration parameters, see https://cloud.ibm.com/docs/databases-for-rabbitmq?topic=databases-for-rabbitmq-changing-configuration&interface=api for more details. | <pre>object({<br/> delete_undefined_queues = optional(bool)<br/> })</pre> | `null` | no |
9595
| <a name="input_cpu_count"></a> [cpu\_count](#input\_cpu\_count) | Allocated dedicated CPU per member. For shared CPU, set to 0. [Learn more](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-resources-scaling) | `number` | `0` | no |
96+
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Enable deletion protection within terraform. This is not a property of the resource and does not prevent deletion outside of terraform. The database can not be deleted by terraform when this value is set to 'true'. In order to delete with terraform the value must be set to 'false' and a terraform apply performed before the destroy is performed. The default is 'true'. | `bool` | `true` | no |
9697
| <a name="input_disk_mb"></a> [disk\_mb](#input\_disk\_mb) | Allocated disk per member. [Learn more](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-resources-scaling) | `number` | `1024` | no |
9798
| <a name="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn) | The CRN of a Key Protect or Hyper Protect Crypto Services encryption key to encrypt your data. Applies only if `use_ibm_owned_encryption_key` is false. By default this key is used for both deployment data and backups, but this behaviour can be altered using the `use_same_kms_key_for_backups` and `backup_encryption_key_crn` inputs. Bare in mind that backups encryption is only available in certain regions. See [Bring your own key for backups](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok) and [Using the HPCS Key for Backup encryption](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups). | `string` | `null` | no |
9899
| <a name="input_member_host_flavor"></a> [member\_host\_flavor](#input\_member\_host\_flavor) | Allocated host flavor per member. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/database#host_flavor). | `string` | `null` | no |
99-
| <a name="input_members"></a> [members](#input\_members) | Allocated number of members. [Learn more](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-resources-scaling) | `number` | `3` | no |
100+
| <a name="input_members"></a> [members](#input\_members) | The number of members that are allocated. [Learn more](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-resources-scaling) | `number` | `3` | no |
100101
| <a name="input_memory_mb"></a> [memory\_mb](#input\_memory\_mb) | Allocated memory per-member. [Learn more](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-resources-scaling) | `number` | `8192` | no |
101102
| <a name="input_name"></a> [name](#input\_name) | The name to give the RabbitMQ instance | `string` | n/a | yes |
102103
| <a name="input_plan"></a> [plan](#input\_plan) | The name of the service plan that you choose for your RabbitMQ instance | `string` | `"standard"` | no |
@@ -106,11 +107,13 @@ You need the following permissions to run this module.
106107
| <a name="input_service_credential_names"></a> [service\_credential\_names](#input\_service\_credential\_names) | Map of name, role for service credentials that you want to create for the database | `map(string)` | `{}` | no |
107108
| <a name="input_service_endpoints"></a> [service\_endpoints](#input\_service\_endpoints) | Specify whether you want to enable the public, private, or both service endpoints. Supported values are 'public', 'private', or 'public-and-private'. | `string` | `"private"` | no |
108109
| <a name="input_skip_iam_authorization_policy"></a> [skip\_iam\_authorization\_policy](#input\_skip\_iam\_authorization\_policy) | Set to true to skip the creation of IAM authorization policies that permits all Databases for RabbitMQ instances in the given resource group 'Reader' access to the Key Protect or Hyper Protect Crypto Services key that was provided in the `kms_key_crn` and `backup_encryption_key_crn` inputs. This policy is required in order to enable KMS encryption, so only skip creation if there is one already present in your account. No policy is created if `use_ibm_owned_encryption_key` is true. | `bool` | `false` | no |
109-
| <a name="input_tags"></a> [tags](#input\_tags) | Optional list of tags to be added to the RabbitMQ instance. | `list(any)` | `[]` | no |
110+
| <a name="input_tags"></a> [tags](#input\_tags) | Optional list of tags to be added to the RabbitMQ instance. | `list(string)` | `[]` | no |
111+
| <a name="input_timeouts_update"></a> [timeouts\_update](#input\_timeouts\_update) | A database update may require a longer timeout for the update to complete. The default is 120 minutes. Set this variable to change the `update` value in the `timeouts` block. [Learn more](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts). | `string` | `"120m"` | no |
110112
| <a name="input_use_default_backup_encryption_key"></a> [use\_default\_backup\_encryption\_key](#input\_use\_default\_backup\_encryption\_key) | When `use_ibm_owned_encryption_key` is set to false, backups will be encrypted with either the key specified in `kms_key_crn`, or in `backup_encryption_key_crn` if a value is passed. If you do not want to use your own key for backups encryption, you can set this to `true` to use the IBM Cloud Databases default encryption for backups. Alternatively set `use_ibm_owned_encryption_key` to true to use the default encryption for both backups and deployment data. | `bool` | `false` | no |
111113
| <a name="input_use_ibm_owned_encryption_key"></a> [use\_ibm\_owned\_encryption\_key](#input\_use\_ibm\_owned\_encryption\_key) | IBM Cloud Databases will secure your deployment's data at rest automatically with an encryption key that IBM hold. Alternatively, you may select your own Key Management System instance and encryption key (Key Protect or Hyper Protect Crypto Services) by setting this to false. If setting to false, a value must be passed for the `kms_key_crn` input. | `bool` | `true` | no |
112-
| <a name="input_use_same_kms_key_for_backups"></a> [use\_same\_kms\_key\_for\_backups](#input\_use\_same\_kms\_key\_for\_backups) | Set this to false if you wan't to use a different key that you own to encrypt backups. When set to false, a value is required for the `backup_encryption_key_crn` input. Alternatiely set `use_default_backup_encryption_key` to true to use the IBM Cloud Databases default encryption. Applies only if `use_ibm_owned_encryption_key` is false. Bare in mind that backups encryption is only available in certain regions. See [Bring your own key for backups](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok) and [Using the HPCS Key for Backup encryption](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups). | `bool` | `true` | no |
114+
| <a name="input_use_same_kms_key_for_backups"></a> [use\_same\_kms\_key\_for\_backups](#input\_use\_same\_kms\_key\_for\_backups) | Set this to false if you wan't to use a different key that you own to encrypt backups. When set to false, a value is required for the `backup_encryption_key_crn` input. Alternatively set `use_default_backup_encryption_key` to true to use the IBM Cloud Databases default encryption. Applies only if `use_ibm_owned_encryption_key` is false. Bare in mind that backups encryption is only available in certain regions. See [Bring your own key for backups](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok) and [Using the HPCS Key for Backup encryption](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-hpcs#use-hpcs-backups). | `bool` | `true` | no |
113115
| <a name="input_users"></a> [users](#input\_users) | A list of users that you want to create on the database. Multiple blocks are allowed. The user password must be in the range of 10-32 characters. Be warned that in most case using IAM service credentials (via the var.service\_credential\_names) is sufficient to control access to the RabbitMQ instance. This blocks creates native RabbitMQ database users, more info on that can be found here https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-user-management | <pre>list(object({<br/> name = string<br/> password = string # pragma: allowlist secret<br/> type = optional(string)<br/> role = optional(string)<br/> }))</pre> | `[]` | no |
116+
| <a name="input_version_upgrade_skip_backup"></a> [version\_upgrade\_skip\_backup](#input\_version\_upgrade\_skip\_backup) | Whether to skip taking a backup before upgrading the database version. Attention: Skipping a backup is not recommended. Skipping a backup before a version upgrade is dangerous and may result in data loss if the upgrade fails at any stage — there will be no immediate backup to restore from. | `bool` | `false` | no |
114117

115118
### Outputs
116119

cra-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml
22
version: "v1"
33
CRA_TARGETS:
4-
- CRA_TARGET: "solutions/standard"
5-
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json"
6-
PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile).
7-
CRA_ENVIRONMENT_VARIABLES:
4+
- CRA_TARGET: "solutions/fully-configurable" # Target directory for CRA scan. If not provided, the CRA Scan will not be run.
5+
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json" # CRA Ignore file to use. If not provided, it checks the repo root directory for `cra-tf-validate-ignore-rules.json`
6+
PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile).
7+
CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
88
TF_VAR_existing_kms_instance_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9::"
9-
TF_VAR_existing_kms_key_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9:key:1368d2eb-3ed0-4a8b-b09c-2155895f01ea"
10-
TF_VAR_use_existing_resource_group: true
11-
TF_VAR_resource_group_name: "geretain-test-redis"
9+
TF_VAR_existing_resource_group_name: "geretain-test-rabbitmq"
10+
TF_VAR_kms_encryption_enabled: true
1211
TF_VAR_provider_visibility: "public"
12+
TF_VAR_prefix: "test"

cra-tf-validate-ignore-rules.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"scc_rules": [
3-
{
4-
"scc_rule_id": "rule-216e2449-27d7-4afc-929a-b66e196a9cf9",
5-
"description": "Check whether Flow Logs for VPC are enabled",
6-
"ignore_reason": "This rule is not relevant to the module itself, just the VPC resource is used in the example that is scanned",
7-
"is_valid": false
8-
}
9-
]
10-
}
2+
"scc_rules": [
3+
{
4+
"scc_rule_id": "rule-216e2449-27d7-4afc-929a-b66e196a9cf9",
5+
"description": "Check whether Flow Logs for VPC are enabled",
6+
"ignore_reason": "This rule is not relevant to the module itself, just the VPC resource is used in the example that is scanned",
7+
"is_valid": false
8+
}
9+
]
10+
}

examples/backup-restore/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
This example provides an end-to-end executable flow of how a RabbitMQ DB can be created from a backup instance. This example uses the IBM Cloud terraform provider to:
44

55
- Create a new resource group if one is not passed in.
6-
- Create a restored ICD RabbitMQ database instance pointing to the lastest backup of the existing RabbitMQ database instance crn passed.
6+
- Create a restored ICD RabbitMQ database instance pointing to the latest backup of the existing RabbitMQ database instance crn passed.

examples/backup-restore/main.tf

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
module "resource_group" {
66
source = "terraform-ibm-modules/resource-group/ibm"
7-
version = "1.2.0"
7+
version = "1.3.0"
88
# if an existing resource group is not set (null) create a new one using prefix
99
resource_group_name = var.resource_group == null ? "${var.prefix}-resource-group" : null
1010
existing_resource_group_name = var.resource_group
@@ -16,13 +16,17 @@ data "ibm_database_backups" "backup_database" {
1616

1717
# New RabbitMQ db instance pointing to the backup instance
1818
module "restored_rabbitmq_db" {
19-
source = "../.."
20-
resource_group_id = module.resource_group.resource_group_id
21-
name = "${var.prefix}-rabbitmq-restored"
22-
region = var.region
23-
rabbitmq_version = var.rabbitmq_version
24-
access_tags = var.access_tags
25-
tags = var.resource_tags
26-
member_host_flavor = "multitenant"
27-
backup_crn = data.ibm_database_backups.backup_database.backups[0].backup_id
19+
source = "../.."
20+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
21+
# source = "terraform-ibm-modules/icd-rabbitmq/ibm"
22+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
23+
resource_group_id = module.resource_group.resource_group_id
24+
name = "${var.prefix}-rabbitmq-restored"
25+
region = var.region
26+
rabbitmq_version = var.rabbitmq_version
27+
access_tags = var.access_tags
28+
tags = var.resource_tags
29+
member_host_flavor = "multitenant"
30+
deletion_protection = false
31+
backup_crn = data.ibm_database_backups.backup_database.backups[0].backup_id
2832
}

examples/backup-restore/variables.tf

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ variable "resource_group" {
2222
default = null
2323
}
2424

25+
variable "access_tags" {
26+
type = list(string)
27+
description = "A list of access tags to apply to the rabbitmq instance created by the module, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial for more details"
28+
default = []
29+
}
2530
variable "rabbitmq_version" {
2631
type = string
2732
description = "Version of rabbitmq to deploy"
@@ -34,12 +39,6 @@ variable "resource_tags" {
3439
default = []
3540
}
3641

37-
variable "access_tags" {
38-
type = list(string)
39-
description = "A list of access tags to apply to the rabbitmq instance created by the module, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial for more details"
40-
default = []
41-
}
42-
4342
variable "rabbitmq_db_crn" {
4443
type = string
4544
description = "The existing CRN of a rabbitMQ instance to fetch the latest backup crn."

0 commit comments

Comments
 (0)