Skip to content

Commit 8eab0c8

Browse files
committed
2 parents 2acd55c + 3f84786 commit 8eab0c8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

terraform/modules/compute/wls_compute/wls_compute.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
module "compute-keygen" {
@@ -9,7 +9,7 @@ module "wls-instances" {
99

1010
source = "../instance"
1111

12-
instance_params = { for x in range(var.num_vm_instances) : "${local.host_label}-${x}" => {
12+
instance_params = { for x in range(var.num_vm_instances) : "${local.host_label}-${format("%02d", x)}" => {
1313

1414
availability_domain = var.use_regional_subnet ? local.ad_names[(x + local.admin_ad_index) % length(local.ad_names)] : var.availability_domain
1515

terraform/modules/compute/wls_compute/wls_volume.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copyright (c) 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
module "middleware-volume" {
55
source = "../volume"
6-
bv_params = { for x in range(var.num_vm_instances) : "${var.resource_name_prefix}-mw-block-${x}" => {
6+
bv_params = { for x in range(var.num_vm_instances) : "${var.resource_name_prefix}-mw-block-${format("%02d", x)}" => {
77
ad = var.use_regional_subnet ? local.ad_names[(x + local.admin_ad_index) % length(local.ad_names)] : var.availability_domain
88
compartment_id = var.compartment_id
99
display_name = "${var.resource_name_prefix}-mw-block-${x}"
@@ -18,7 +18,7 @@ module "middleware-volume" {
1818

1919
module "data-volume" {
2020
source = "../volume"
21-
bv_params = { for x in range(var.num_vm_instances) : "${var.resource_name_prefix}-data-block-${x}" => {
21+
bv_params = { for x in range(var.num_vm_instances) : "${var.resource_name_prefix}-data-block-${format("%02d", x)}" => {
2222
ad = var.use_regional_subnet ? local.ad_names[(x + local.admin_ad_index) % length(local.ad_names)] : var.availability_domain
2323
compartment_id = var.compartment_id
2424
display_name = "${var.resource_name_prefix}-data-block-${x}"
@@ -35,7 +35,7 @@ module "middleware_volume_attach" {
3535

3636
bv_params = { empty = { ad = "", compartment_id = "", display_name = "", bv_size = 0, defined_tags = { def = "" }, freeform_tags = { free = "" } } }
3737

38-
bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${x}" => {
38+
bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${format("%02d", x)}" => {
3939
display_name = "${var.resource_name_prefix}-block-volume-attach-${x}"
4040
attachment_type = "iscsi"
4141
instance_id = module.wls-instances.instance_ids[x / var.num_volumes]
@@ -49,7 +49,7 @@ module "data_volume_attach" {
4949

5050
bv_params = { empty = { ad = "", compartment_id = "", display_name = "", bv_size = 0, defined_tags = { def = "" }, freeform_tags = { free = "" } } }
5151

52-
bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${x}" => {
52+
bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${format("%02d", x)}" => {
5353
display_name = "${var.resource_name_prefix}-block-volume-attach-${x}"
5454
attachment_type = "iscsi"
5555
instance_id = module.wls-instances.instance_ids[x / var.num_volumes]

0 commit comments

Comments
 (0)