Skip to content

Commit da7480f

Browse files
authored
Merge branch 'main' into configuration
2 parents 2359eeb + 900f563 commit da7480f

30 files changed

+580
-293
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You need the following permissions to run this module.
5656

5757
| Name | Version |
5858
|------|---------|
59-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
59+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
6060
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.70.0, <2.0.0 |
6161
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |
6262

@@ -65,7 +65,7 @@ You need the following permissions to run this module.
6565
| Name | Source | Version |
6666
|------|--------|---------|
6767
| <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.29.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.30.0 |
6969
| <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 |
7070

7171
### Resources
@@ -90,21 +90,21 @@ You need the following permissions to run this module.
9090
| <a name="input_auto_scaling"></a> [auto\_scaling](#input\_auto\_scaling) | Optional rules to allow the database to increase resources in response to usage. Only a single autoscaling block is allowed. Make sure you understand the effects of autoscaling, especially for production environments. See https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-autoscaling in the IBM Cloud Docs. | <pre>object({<br/> disk = object({<br/> capacity_enabled = optional(bool, false)<br/> free_space_less_than_percent = optional(number, 10)<br/> io_above_percent = optional(number, 90)<br/> io_enabled = optional(bool, false)<br/> io_over_period = optional(string, "15m")<br/> rate_increase_percent = optional(number, 10)<br/> rate_limit_mb_per_member = optional(number, 3670016)<br/> rate_period_seconds = optional(number, 900)<br/> rate_units = optional(string, "mb")<br/> })<br/> memory = object({<br/> io_above_percent = optional(number, 90)<br/> io_enabled = optional(bool, false)<br/> io_over_period = optional(string, "15m")<br/> rate_increase_percent = optional(number, 10)<br/> rate_limit_mb_per_member = optional(number, 114688)<br/> rate_period_seconds = optional(number, 900)<br/> rate_units = optional(string, "mb")<br/> })<br/> })</pre> | `null` | no |
9191
| <a name="input_backup_crn"></a> [backup\_crn](#input\_backup\_crn) | The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format crn:v1:<…>:backup:. If omitted, the database is provisioned empty. | `string` | `null` | no |
9292
| <a name="input_backup_encryption_key_crn"></a> [backup\_encryption\_key\_crn](#input\_backup\_encryption\_key\_crn) | The CRN of a Key Protect or Hyper Protect Crypto Services encryption key that you want to use for encrypting the disk that holds deployment backups. Applies only if `use_ibm_owned_encryption_key` is false and `use_same_kms_key_for_backups` is false. If no value is passed, and `use_same_kms_key_for_backups` is true, the value of `kms_key_crn` is used. Alternatively set `use_default_backup_encryption_key` to true to use the IBM Cloud Databases default encryption. 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 |
93-
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | (Optional, list) List of CBR 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/> }))</pre> | `[]` | no |
93+
| <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 |
9696
| <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 |
97-
| <a name="input_endpoints"></a> [endpoints](#input\_endpoints) | Endpoints available to the database instance (public, private, public-and-private) | `string` | `"private"` | no |
98-
| <a name="input_instance_name"></a> [instance\_name](#input\_instance\_name) | The name to give the RabbitMQ instance | `string` | n/a | yes |
9997
| <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 |
10098
| <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 |
10199
| <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 |
102100
| <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 |
101+
| <a name="input_name"></a> [name](#input\_name) | The name to give the RabbitMQ instance | `string` | n/a | yes |
103102
| <a name="input_plan"></a> [plan](#input\_plan) | The name of the service plan that you choose for your RabbitMQ instance | `string` | `"standard"` | no |
104103
| <a name="input_rabbitmq_version"></a> [rabbitmq\_version](#input\_rabbitmq\_version) | The version of RabbitMQ to deploy. If no value passed, the current ICD preferred version is used. | `string` | `null` | no |
105104
| <a name="input_region"></a> [region](#input\_region) | The region where you want to deploy your instance. | `string` | `"us-south"` | no |
106105
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The resource group ID where the RabbitMQ instance will be created. | `string` | n/a | yes |
107106
| <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 |
107+
| <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 |
108108
| <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 |
109109
| <a name="input_tags"></a> [tags](#input\_tags) | Optional list of tags to be added to the RabbitMQ instance. | `list(any)` | `[]` | no |
110110
| <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 |

examples/backup-restore/main.tf

Lines changed: 2 additions & 2 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.1.6"
7+
version = "1.2.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
@@ -18,7 +18,7 @@ data "ibm_database_backups" "backup_database" {
1818
module "restored_rabbitmq_db" {
1919
source = "../.."
2020
resource_group_id = module.resource_group.resource_group_id
21-
instance_name = "${var.prefix}-rabbitmq-restored"
21+
name = "${var.prefix}-rabbitmq-restored"
2222
region = var.region
2323
rabbitmq_version = var.rabbitmq_version
2424
access_tags = var.access_tags

examples/backup-restore/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3.0"
2+
required_version = ">= 1.9.0"
33
required_providers {
44
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
55
ibm = {

examples/basic/main.tf

Lines changed: 4 additions & 3 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.1.6"
7+
version = "1.2.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
@@ -14,12 +14,13 @@ module "resource_group" {
1414
# RabbitMQ
1515
##############################################################################
1616

17-
module "icd_rabbitmq" {
17+
module "database" {
1818
source = "../.."
1919
resource_group_id = module.resource_group.resource_group_id
20-
instance_name = "${var.prefix}-rabbitmq"
20+
name = "${var.prefix}-rabbitmq"
2121
region = var.region
2222
tags = var.resource_tags
2323
access_tags = var.access_tags
2424
rabbitmq_version = var.rabbitmq_version
25+
service_endpoints = var.service_endpoints
2526
}

examples/basic/outputs.tf

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22
# Outputs
33
##############################################################################
44
output "id" {
5-
description = "rabbitmq instance id"
6-
value = module.icd_rabbitmq.id
5+
description = "RabbitMQ instance id"
6+
value = module.database.id
7+
}
8+
9+
output "rabbitmq_crn" {
10+
description = "RabbitMQ CRN"
11+
value = module.database.crn
712
}
813

914
output "version" {
10-
description = "rabbitmq instance version"
11-
value = module.icd_rabbitmq.version
15+
description = "RabbitMQ instance version"
16+
value = module.database.version
1217
}
1318

1419
output "adminuser" {
1520
description = "Database admin user name"
16-
value = module.icd_rabbitmq.adminuser
21+
value = module.database.adminuser
1722
}
1823

1924
output "hostname" {
2025
description = "Database hostname"
21-
value = module.icd_rabbitmq.hostname
26+
value = module.database.hostname
2227
}
2328

2429
output "port" {
2530
description = "Database port"
26-
value = module.icd_rabbitmq.port
31+
value = module.database.port
2732
}
2833

2934
output "certificate_base64" {
3035
description = "Database connection certificate"
31-
value = module.icd_rabbitmq.certificate_base64
36+
value = module.database.certificate_base64
3237
sensitive = true
3338
}

examples/basic/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,14 @@ variable "access_tags" {
3939
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"
4040
default = []
4141
}
42+
43+
variable "service_endpoints" {
44+
type = string
45+
description = "Specify whether you want to enable the public, private, or both service endpoints. Supported values are 'public', 'private', or 'public-and-private'."
46+
default = "public"
47+
48+
validation {
49+
condition = can(regex("public|public-and-private|private", var.service_endpoints))
50+
error_message = "Valid values for service_endpoints are 'public', 'public-and-private', and 'private'"
51+
}
52+
}

examples/basic/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3.0"
2+
required_version = ">= 1.9.0"
33
required_providers {
44
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
55
ibm = {

examples/complete/main.tf

Lines changed: 4 additions & 4 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.1.6"
7+
version = "1.2.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
@@ -21,7 +21,7 @@ locals {
2121

2222
module "key_protect_all_inclusive" {
2323
source = "terraform-ibm-modules/kms-all-inclusive/ibm"
24-
version = "4.20.0"
24+
version = "4.21.10"
2525
resource_group_id = module.resource_group.resource_group_id
2626
# Note: Database instance and Key Protect must be created in the same region when using BYOK
2727
# See https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok
@@ -75,7 +75,7 @@ resource "ibm_is_subnet" "testacc_subnet" {
7575
##############################################################################
7676

7777
module "cbr_zone" {
78-
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-cbr//modules/cbr-zone-module?ref=v1.29.0"
78+
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-cbr//modules/cbr-zone-module?ref=v1.30.0"
7979
name = "${var.prefix}-VPC-network-zone"
8080
zone_description = "CBR Network zone representing VPC"
8181
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
@@ -92,7 +92,7 @@ module "cbr_zone" {
9292
module "icd_rabbitmq" {
9393
source = "../../"
9494
resource_group_id = module.resource_group.resource_group_id
95-
instance_name = "${var.prefix}-rabbitmq"
95+
name = "${var.prefix}-rabbitmq"
9696
region = var.region
9797
admin_pass = var.admin_pass
9898
users = var.users

examples/complete/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3.0"
2+
required_version = ">= 1.9.0"
33
required_providers {
44
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
55
ibm = {

0 commit comments

Comments
 (0)