Skip to content

Commit 216f1df

Browse files
feat(deps): updating module provider range strategy to support IBM provider v2 (#321)
* chore: raise IBM provider upper bound to < 3.0.0 * fix: removed name from run_volume_mounts and update deps * SKIP UPGRADE TEST --------- Co-authored-by: zikra-iqbal <zikra.iqbalmnnit@gmail.com>
1 parent 24d6d0a commit 216f1df

31 files changed

Lines changed: 38 additions & 45 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ You need the following permissions to run this module.
135135
| Name | Version |
136136
|------|---------|
137137
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
138-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.79.0, <2.0.0 |
138+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.79.0, < 3.0.0 |
139139

140140
### Modules
141141

@@ -158,15 +158,15 @@ No resources.
158158

159159
| Name | Description | Type | Default | Required |
160160
|------|-------------|------|---------|:--------:|
161-
| <a name="input_apps"></a> [apps](#input\_apps) | A map of code engine apps to be created. | <pre>map(object({<br/> image_reference = string<br/> image_secret = optional(string)<br/> run_env_variables = optional(list(object({<br/> type = optional(string)<br/> name = optional(string)<br/> value = optional(string)<br/> prefix = optional(string)<br/> key = optional(string)<br/> reference = optional(string)<br/> })))<br/> run_volume_mounts = optional(list(object({<br/> mount_path = string<br/> reference = string<br/> name = optional(string)<br/> type = string<br/> })))<br/> image_port = optional(number)<br/> managed_domain_mappings = optional(string)<br/> run_arguments = optional(list(string))<br/> run_as_user = optional(number)<br/> run_commands = optional(list(string))<br/> run_service_account = optional(string)<br/> scale_concurrency = optional(number)<br/> scale_concurrency_target = optional(number)<br/> scale_cpu_limit = optional(string)<br/> scale_ephemeral_storage_limit = optional(string)<br/> scale_initial_instances = optional(number)<br/> scale_max_instances = optional(number)<br/> scale_memory_limit = optional(string)<br/> scale_min_instances = optional(number)<br/> scale_request_timeout = optional(number)<br/> scale_down_delay = optional(number)<br/> }))</pre> | `{}` | no |
161+
| <a name="input_apps"></a> [apps](#input\_apps) | A map of code engine apps to be created. | <pre>map(object({<br/> image_reference = string<br/> image_secret = optional(string)<br/> run_env_variables = optional(list(object({<br/> type = optional(string)<br/> name = optional(string)<br/> value = optional(string)<br/> prefix = optional(string)<br/> key = optional(string)<br/> reference = optional(string)<br/> })))<br/> run_volume_mounts = optional(list(object({<br/> mount_path = string<br/> reference = string<br/> type = string<br/> })))<br/> image_port = optional(number)<br/> managed_domain_mappings = optional(string)<br/> run_arguments = optional(list(string))<br/> run_as_user = optional(number)<br/> run_commands = optional(list(string))<br/> run_service_account = optional(string)<br/> scale_concurrency = optional(number)<br/> scale_concurrency_target = optional(number)<br/> scale_cpu_limit = optional(string)<br/> scale_ephemeral_storage_limit = optional(string)<br/> scale_initial_instances = optional(number)<br/> scale_max_instances = optional(number)<br/> scale_memory_limit = optional(string)<br/> scale_min_instances = optional(number)<br/> scale_request_timeout = optional(number)<br/> scale_down_delay = optional(number)<br/> }))</pre> | `{}` | no |
162162
| <a name="input_bindings"></a> [bindings](#input\_bindings) | A map of code engine bindings to be created. | <pre>map(object({<br/> secret_name = string<br/> components = list(object({<br/> name = string<br/> resource_type = string<br/> }))<br/> }))</pre> | `{}` | no |
163163
| <a name="input_builds"></a> [builds](#input\_builds) | A map of code engine builds to be created. Requires 'ibmcloud\_api\_key' to be set for authentication and execution. | <pre>map(object({<br/> output_image = optional(string)<br/> output_secret = optional(string) # pragma: allowlist secret<br/> source_url = string<br/> strategy_type = optional(string)<br/> source_context_dir = optional(string)<br/> source_revision = optional(string)<br/> source_secret = optional(string)<br/> source_type = optional(string)<br/> strategy_size = optional(string)<br/> strategy_spec_file = optional(string)<br/> timeout = optional(number)<br/> region = optional(string)<br/> container_registry_namespace = optional(string)<br/> prefix = optional(string)<br/> }))</pre> | `{}` | no |
164164
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | The context-based restrictions rule to create. Only one rule is allowed. | <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/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |
165165
| <a name="input_config_maps"></a> [config\_maps](#input\_config\_maps) | A map of code engine config maps to be created. | <pre>map(object({<br/> data = map(string)<br/> }))</pre> | `{}` | no |
166166
| <a name="input_domain_mappings"></a> [domain\_mappings](#input\_domain\_mappings) | A map of code engine domain mappings to be created. | <pre>map(object({<br/> tls_secret = string # pragma: allowlist secret<br/> components = list(object({<br/> name = string<br/> resource_type = string<br/> }))<br/> }))</pre> | `{}` | no |
167167
| <a name="input_existing_project_id"></a> [existing\_project\_id](#input\_existing\_project\_id) | The ID of the existing project to which code engine resources will be added. It is required if var.project\_name is null. | `string` | `null` | no |
168168
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud API key. Required only when 'builds' are specified and used. | `string` | `null` | no |
169-
| <a name="input_jobs"></a> [jobs](#input\_jobs) | A map of code engine jobs to be created. | <pre>map(object({<br/> image_reference = string<br/> image_secret = optional(string)<br/> run_env_variables = optional(list(object({<br/> type = optional(string)<br/> name = optional(string)<br/> value = optional(string)<br/> prefix = optional(string)<br/> key = optional(string)<br/> reference = optional(string)<br/> })))<br/> run_volume_mounts = optional(list(object({<br/> mount_path = string<br/> reference = string<br/> name = optional(string)<br/> type = string<br/> })))<br/> run_arguments = optional(list(string))<br/> run_as_user = optional(number)<br/> run_commands = optional(list(string))<br/> run_mode = optional(string)<br/> run_service_account = optional(string)<br/> scale_array_spec = optional(string)<br/> scale_cpu_limit = optional(string)<br/> scale_ephemeral_storage_limit = optional(string)<br/> scale_max_execution_time = optional(number)<br/> scale_memory_limit = optional(string)<br/> scale_retry_limit = optional(number)<br/> }))</pre> | `{}` | no |
169+
| <a name="input_jobs"></a> [jobs](#input\_jobs) | A map of code engine jobs to be created. | <pre>map(object({<br/> image_reference = string<br/> image_secret = optional(string)<br/> run_env_variables = optional(list(object({<br/> type = optional(string)<br/> name = optional(string)<br/> value = optional(string)<br/> prefix = optional(string)<br/> key = optional(string)<br/> reference = optional(string)<br/> })))<br/> run_volume_mounts = optional(list(object({<br/> mount_path = string<br/> reference = string<br/> type = string<br/> })))<br/> run_arguments = optional(list(string))<br/> run_as_user = optional(number)<br/> run_commands = optional(list(string))<br/> run_mode = optional(string)<br/> run_service_account = optional(string)<br/> scale_array_spec = optional(string)<br/> scale_cpu_limit = optional(string)<br/> scale_ephemeral_storage_limit = optional(string)<br/> scale_max_execution_time = optional(number)<br/> scale_memory_limit = optional(string)<br/> scale_retry_limit = optional(number)<br/> }))</pre> | `{}` | no |
170170
| <a name="input_project_name"></a> [project\_name](#input\_project\_name) | The name of the project to which code engine resources will be added. It is required if var.existing\_project\_id is null. | `string` | `null` | no |
171171
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | ID of the resource group to use when creating resources. | `string` | n/a | yes |
172172
| <a name="input_secrets"></a> [secrets](#input\_secrets) | A map of code engine secrets to be created. | <pre>map(object({<br/> format = string<br/> data = map(string)<br/> # Issue with provider, service_access is not supported at the moment. https://github.com/IBM-Cloud/terraform-provider-ibm/issues/5232<br/> # service_access = optional(list(object({<br/> # resource_key = list(object({<br/> # id = optional(string)<br/> # }))<br/> # role = list(object({<br/> # crn = optional(string)<br/> # }))<br/> # service_instance = list(object({<br/> # id = optional(string)<br/> # }))<br/> # })))<br/> }))</pre> | `{}` | no |

examples/apps/main.tf

Lines changed: 5 additions & 5 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.4.8"
7+
version = "1.6.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
@@ -43,7 +43,7 @@ module "secrets_manager_public_cert_engine" {
4343
depends_on = [ibm_resource_instance.secrets_manager]
4444
count = var.existing_sm_instance_guid == null ? 1 : 0
4545
source = "terraform-ibm-modules/secrets-manager-public-cert-engine/ibm"
46-
version = "1.7.5"
46+
version = "1.8.0"
4747
providers = {
4848
ibm = ibm.ibm-sm
4949
ibm.secret-store = ibm.ibm-sm
@@ -63,7 +63,7 @@ module "secrets_manager_public_cert_engine" {
6363
module "secrets_manager_group" {
6464
count = var.existing_cert_secret_id == null ? 1 : 0
6565
source = "terraform-ibm-modules/secrets-manager-secret-group/ibm"
66-
version = "1.4.8"
66+
version = "1.5.0"
6767
region = local.sm_region
6868
secrets_manager_guid = local.sm_guid
6969
secret_group_name = "${var.prefix}-certificates-secret-group"
@@ -127,7 +127,7 @@ resource "ibm_is_subnet" "testacc_subnet" {
127127

128128
module "cbr_vpc_zone" {
129129
source = "terraform-ibm-modules/cbr/ibm//modules/cbr-zone-module"
130-
version = "1.35.19"
130+
version = "1.36.0"
131131
name = "${var.prefix}-VPC-network-zone"
132132
zone_description = "CBR Network zone representing VPC"
133133
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
@@ -139,7 +139,7 @@ module "cbr_vpc_zone" {
139139

140140
module "cbr_zone_schematics" {
141141
source = "terraform-ibm-modules/cbr/ibm//modules/cbr-zone-module"
142-
version = "1.35.19"
142+
version = "1.36.0"
143143
name = "${var.prefix}-schematics-zone"
144144
zone_description = "CBR Network zone containing Schematics"
145145
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id

examples/apps/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
required_providers {
77
ibm = {
88
source = "IBM-Cloud/ibm"
9-
version = ">= 1.79.0, < 2.0.0"
9+
version = ">= 1.79.0, < 3.0.0"
1010
}
1111
}
1212
}

examples/build/main.tf

Lines changed: 1 addition & 1 deletion
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.4.8"
7+
version = "1.6.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

examples/build/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
required_providers {
77
ibm = {
88
source = "IBM-Cloud/ibm"
9-
version = ">= 1.79.0, < 2.0.0"
9+
version = ">= 1.79.0, < 3.0.0"
1010
}
1111
}
1212
}

examples/jobs/main.tf

Lines changed: 1 addition & 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.4.8"
7+
version = "1.6.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
@@ -45,7 +45,6 @@ module "code_engine" {
4545
scale_array_spec = "5"
4646
run_volume_mounts = [{
4747
mount_path = "/dir"
48-
name = "volume",
4948
reference = "${var.prefix}-s"
5049
type = "secret"
5150
}]

examples/jobs/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
ibm = {
66
source = "IBM-Cloud/ibm"
7-
version = "1.79.0"
7+
version = "1.89.0"
88
}
99
}
1010
}

modules/app/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You need the following permissions to run this module.
3939
| Name | Version |
4040
|------|---------|
4141
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
42-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.79.0, <2.0.0 |
42+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.79.0, < 3.0.0 |
4343

4444
### Modules
4545

@@ -66,7 +66,7 @@ No modules.
6666
| <a name="input_run_commands"></a> [run\_commands](#input\_run\_commands) | Commands for the app that are passed to start the container. | `list(string)` | `[]` | no |
6767
| <a name="input_run_env_variables"></a> [run\_env\_variables](#input\_run\_env\_variables) | References to config maps, secrets or a literal values that are exposed as environment variables within the running application. | <pre>list(object({<br/> type = optional(string)<br/> name = optional(string)<br/> value = optional(string)<br/> prefix = optional(string)<br/> key = optional(string)<br/> reference = optional(string)<br/> }))</pre> | `[]` | no |
6868
| <a name="input_run_service_account"></a> [run\_service\_account](#input\_run\_service\_account) | The name of the service account. | `string` | `"default"` | no |
69-
| <a name="input_run_volume_mounts"></a> [run\_volume\_mounts](#input\_run\_volume\_mounts) | Optional mounts of config maps or a secrets. | <pre>list(object({<br/> mount_path = string<br/> reference = string<br/> name = optional(string)<br/> type = string<br/> }))</pre> | `[]` | no |
69+
| <a name="input_run_volume_mounts"></a> [run\_volume\_mounts](#input\_run\_volume\_mounts) | Optional mounts of config maps or a secrets. | <pre>list(object({<br/> mount_path = string<br/> reference = string<br/> type = string<br/> }))</pre> | `[]` | no |
7070
| <a name="input_scale_concurrency"></a> [scale\_concurrency](#input\_scale\_concurrency) | The maximum number of requests that can be processed concurrently per instance. | `number` | `100` | no |
7171
| <a name="input_scale_concurrency_target"></a> [scale\_concurrency\_target](#input\_scale\_concurrency\_target) | The threshold of concurrent requests per instance at which one or more additional instances are created. | `number` | `null` | no |
7272
| <a name="input_scale_cpu_limit"></a> [scale\_cpu\_limit](#input\_scale\_cpu\_limit) | The number of CPU set for the instance of the app. | `string` | `"1"` | no |

modules/app/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ resource "ibm_code_engine_app" "ce_app" {
4343
content {
4444
mount_path = run_volume_mounts.value["mount_path"]
4545
reference = run_volume_mounts.value["reference"]
46-
name = run_volume_mounts.value["name"]
4746
type = run_volume_mounts.value["type"]
4847
}
4948
}

modules/app/variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ variable "run_volume_mounts" {
4141
type = list(object({
4242
mount_path = string
4343
reference = string
44-
name = optional(string)
4544
type = string
4645
}))
4746
default = []

0 commit comments

Comments
 (0)