Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Copyright (c) 2023,2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

### Removing network validation script from provisioning flow temporarily.
Expand Down Expand Up @@ -609,6 +609,7 @@ module "compute" {
wls_domain_name = format("%s_domain", local.service_name_prefix)
wls_server_startup_args = var.wls_server_startup_args
wls_existing_vcn_id = var.wls_existing_vcn_id
create_policies = var.create_policies

#The following two are for adding a dependency on the peering module
wls_vcn_peering_dns_resolver_id = element(flatten(concat(module.vcn-peering[*].wls_vcn_dns_resolver_id, [""])), 0)
Expand Down
7 changes: 6 additions & 1 deletion terraform/modules/compute/wls_compute/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Copyright (c) 2023,2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

variable "tenancy_id" {
Expand All @@ -16,6 +16,11 @@ variable "compartment_id" {
description = "The OCID of the compartment where the compute will be created"
}

variable "create_policies" {
type = bool
description = "Set to true to create OCI IAM policies and dynamic groups required by the WebLogic for OCI stack. If this is set to false, the policies and dynamic groups need to be created manually"
}

variable "availability_domain" {
type = string
description = "The label of the availability domain where the compute will be created"
Expand Down
5 changes: 3 additions & 2 deletions terraform/modules/compute/wls_compute/wls_compute.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

module "compute-keygen" {
Expand All @@ -9,7 +9,7 @@ module "wls-instances" {

source = "../instance"

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

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

Expand Down Expand Up @@ -67,6 +67,7 @@ module "wls-instances" {
wls_subnet_cidr = local.wls_subnet_cidr
wls_edition = var.wls_edition
is_bastion_instance_required = var.is_bastion_instance_required
create_policies = var.create_policies

user_data = data.template_cloudinit_config.config.rendered
mode = var.mode
Expand Down
10 changes: 5 additions & 5 deletions terraform/modules/compute/wls_compute/wls_volume.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

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

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

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

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

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

bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${x}" => {
bv_attach_params = { for x in range(var.num_vm_instances * var.num_volumes) : "${var.resource_name_prefix}-block-volume-attach-${format("%02d", x)}" => {
display_name = "${var.resource_name_prefix}-block-volume-attach-${x}"
attachment_type = "iscsi"
instance_id = module.wls-instances.instance_ids[x / var.num_volumes]
Expand Down
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, Oracle and/or its affiliates.
# Copyright (c) 2023,2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

variable "tenancy_ocid" {
Expand Down