Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
9 changes: 8 additions & 1 deletion terraform/data_sources.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

data "oci_identity_regions" "home_region" {
Expand Down Expand Up @@ -215,3 +215,10 @@ data "oci_certificates_management_certificate_authority" "root_certificate_autho
certificate_authority_id = var.root_ca_id
}

data "oci_os_management_hub_profile" "osmh_profile" {
count = var.select_existing_profile ? 1 : 0

#Required
profile_id = var.profile_ocid
}

12 changes: 6 additions & 6 deletions terraform/images/mp_image_ee_byol.tfvars
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

tf_script_version = "25.4.1-251024040114"
tf_script_version = "26.1.1-260210065657"
use_marketplace_image = true
listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaawd5ti5ldjzdppppi675onvo3mvjcwt64jjey7rib3beau2ngkl2q"
listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaajtldbwdlrovciafil4vjkcfkp26qpnpuajyyiphnmitfuo2ix6la"
listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaaehv6whetsenperh5w5enc4afuokpkeinljegjokcvrwnwrgsdzoa"

ucm_listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaa653zc2e4fsem5hhwinmfgnv3xp4dmbq6c6gvf45okxf6xz3smhiq"
ucm_listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
ucm_instance_image_id = "ocid1.image.oc1..aaaaaaaanptrtarff3qsf46hhy37j66jl7mps227t65ur2vu2msjbxoye2ba"
ucm_listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
ucm_instance_image_id = "ocid1.image.oc1..aaaaaaaalyha6y6ynrlcmthtaczwsniqff3ccvoypowj4pg774xpo5abdk6a"

8 changes: 4 additions & 4 deletions terraform/images/mp_image_ee_ucm.tfvars
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

tf_script_version = "25.4.1-251024040114"
tf_script_version = "26.1.1-260210065657"
use_marketplace_image = true
listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaa653zc2e4fsem5hhwinmfgnv3xp4dmbq6c6gvf45okxf6xz3smhiq"
listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaanptrtarff3qsf46hhy37j66jl7mps227t65ur2vu2msjbxoye2ba"
listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaalyha6y6ynrlcmthtaczwsniqff3ccvoypowj4pg774xpo5abdk6a"

8 changes: 4 additions & 4 deletions terraform/images/mp_image_se_byol.tfvars
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

tf_script_version = "25.4.1-251024040114"
tf_script_version = "26.1.1-260210065657"
use_marketplace_image = true
listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaalcwal6mfwjbezzqyj3waoxrvigml4n3lcn3hfday3ozetjqn25a"
listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaas47qu7iigcabaswrne454qfruzcyxcixdwqy32zj6iqx7q2kfmaa"
listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaa2g23i5jkejpi7rmti2brboqb2tskwzeobo4xnibami23e37frhja"
12 changes: 6 additions & 6 deletions terraform/images/mp_image_suite_byol.tfvars
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

tf_script_version = "25.4.1-251024040114"
tf_script_version = "26.1.1-260210065657"
use_marketplace_image = true
listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaajl5w3d76x5vdc4n7oqjpsxh4jtwivclvvp6gj4em3kufju6sftga"
listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaad555thklryolvtso5y7pw67kuzzhz23qwiowuczuhwiwhgtc3xrq"
listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaamhl3vawpd7cf6tix5gptln7l2zmn6hljdb6hxu26m5y3mcd7rlla"

ucm_listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaq2vkow7zwkxg6ky4zxsnckdlfgtgmg7i4kkyev3y6zyo72mpkgza"
ucm_listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
ucm_instance_image_id = "ocid1.image.oc1..aaaaaaaag7grvrv2xnjuiulzx4hotcdx77ljdfmgojjiiyh4vjah6ozg5mba"
ucm_listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
ucm_instance_image_id = "ocid1.image.oc1..aaaaaaaagt5ygm5yvlbz4qng2gf3whz3ucjhbuu2k3db5b4r75r2w3tezy7a"
8 changes: 4 additions & 4 deletions terraform/images/mp_image_suite_ucm.tfvars
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

tf_script_version = "25.4.1-251024040114"
tf_script_version = "26.1.1-260210065657"
use_marketplace_image = true
listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaq2vkow7zwkxg6ky4zxsnckdlfgtgmg7i4kkyev3y6zyo72mpkgza"
listing_resource_version = "25.4.1-ol8.8-23.12.13-251024-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaag7grvrv2xnjuiulzx4hotcdx77ljdfmgojjiiyh4vjah6ozg5mba"
listing_resource_version = "26.1.1-ol8.8-23.12.13-260210-1"
instance_image_id = "ocid1.image.oc1..aaaaaaaagt5ygm5yvlbz4qng2gf3whz3ucjhbuu2k3db5b4r75r2w3tezy7a"
11 changes: 7 additions & 4 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

locals {
Expand Down Expand Up @@ -157,11 +157,14 @@ locals {
use_apm_service = (var.use_apm_service || var.use_autoscaling)
apm_domain_compartment_id = local.use_apm_service ? lookup(data.oci_apm_apm_domain.apm_domain[0], "compartment_id") : ""

dynamic_group_id = var.use_dg_from_default_identity_domain ? var.dynamic_group_id : var.dynamic_group_id_text

ocir_namespace = data.oci_objectstorage_namespace.object_namespace.namespace

ocir_namespace_with_slash = format("%s/", local.ocir_namespace)
ocir_user_starts_with = substr(var.ocir_user, 0, length(local.ocir_namespace_with_slash))
ocir_user = local.ocir_user_starts_with == local.ocir_namespace_with_slash ? var.ocir_user : "${format("%s%s", local.ocir_namespace_with_slash, var.ocir_user)}"
ocir_user_starts_with = substr(var.ocir_user, 0, length(local.ocir_namespace_with_slash)) == local.ocir_namespace_with_slash
ocir_user_boat_access = strcontains(var.ocir_user, "bmc_operator_access")
ocir_user = (local.ocir_user_boat_access || local.ocir_user_starts_with) ? var.ocir_user : "${format("%s%s", local.ocir_namespace_with_slash, var.ocir_user)}"

region_keys = data.oci_identity_regions.all_regions.regions.*.key
region_names = data.oci_identity_regions.all_regions.regions.*.name
Expand Down Expand Up @@ -197,7 +200,7 @@ locals {
select_existing_profile = var.select_existing_profile
create_profile = (local.enable_osmh && !local.select_existing_profile) ? true : false
profile_ocid = local.select_existing_profile ? var.profile_ocid : ""
profile_compartment_id = var.profile_compartment_id == "" ? var.compartment_ocid : var.profile_compartment_id
profile_compartment_id = var.profile_compartment_id == "" ? (var.select_existing_profile ? data.oci_os_management_hub_profile.osmh_profile[0].compartment_id : var.compartment_ocid) : var.profile_compartment_id
profile_name = var.profile_name == "" ? format("%s_profile", local.service_name_prefix) : var.profile_name


Expand Down
42 changes: 23 additions & 19 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2023, 2025, Oracle and/or its affiliates.
# Copyright (c) 2023, 2026, 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.
/*

module "network-validation" {
source = "./modules/network-validator"
count = local.use_existing_subnets && !var.skip_network_validation ? 1 : 0
Expand All @@ -24,11 +24,12 @@ module "network-validation" {
existing_mount_target_nsg_id = var.add_existing_nsg && var.add_fss ? var.existing_mount_target_nsg_id : ""
existing_bastion_nsg_id = var.add_existing_nsg && var.is_bastion_instance_required ? var.existing_bastion_nsg_id : ""
lb_source_cidr = var.add_load_balancer ? (var.is_lb_private ? "" : "0.0.0.0/0") : ""
secure_mode = var.configure_secure_mode
idcs_port = var.idcs_port
}
*/

module "system-tags" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/resource-tags"
compartment_id = var.compartment_ocid
service_name = var.service_name
Expand Down Expand Up @@ -212,7 +213,7 @@ module "network-bastion-subnet" {
}

module "policies" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/policies"
count = var.create_policies ? 1 : 0
compartment_id = var.compartment_ocid
Expand All @@ -239,7 +240,7 @@ module "policies" {
apm_domain_compartment_id = local.apm_domain_compartment_id
use_autoscaling = var.use_autoscaling
enable_osmh = var.enable_osmh
profile_compartment_id = var.profile_compartment_id
profile_compartment_id = local.profile_compartment_id

ocir_auth_token_id = var.ocir_auth_token_id
add_fss = var.add_fss
Expand All @@ -256,7 +257,7 @@ module "policies" {
}

module "bastion" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/compute/bastion"
count = (!local.assign_weblogic_public_ip && local.is_bastion_instance_required && var.existing_bastion_instance_id == "") ? 1 : 0
availability_domain = local.bastion_availability_domain
Expand Down Expand Up @@ -344,7 +345,7 @@ module "network-mount-target-private-subnet" {
}

module "vcn-peering" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
count = local.is_vcn_peering ? 1 : 0
source = "./modules/network/vcn-peering"
resource_name_prefix = local.service_name_prefix
Expand All @@ -362,7 +363,6 @@ module "vcn-peering" {
}

module "validators" {
#depends_on = [module.network-validation]
source = "./modules/validators"
compartment_id = var.compartment_ocid
service_name = var.service_name
Expand Down Expand Up @@ -444,7 +444,7 @@ module "validators" {

create_policies = var.create_policies
use_oci_logging = var.use_oci_logging
dynamic_group_id = var.dynamic_group_id
dynamic_group_id = local.dynamic_group_id

use_apm_service = local.use_apm_service
apm_domain_id = var.apm_domain_id
Expand Down Expand Up @@ -492,7 +492,7 @@ module "validators" {
}

module "fss" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/fss"
count = var.add_fss ? 1 : 0

Expand All @@ -515,7 +515,7 @@ module "fss" {
}

module "load-balancer" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/lb/loadbalancer"
count = (local.add_load_balancer && var.existing_load_balancer_id == "") ? 1 : 0

Expand All @@ -536,6 +536,7 @@ module "load-balancer" {
}

module "rms-private-endpoint" {
depends_on = [module.network-validation]
source = "./modules/rms-private-endpoint"
count = local.is_rms_private_endpoint_required && local.add_new_rms_private_endpoint ? 1 : 0

Expand All @@ -552,7 +553,7 @@ module "rms-private-endpoint" {
}

module "observability-common" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/observability/common"
count = var.use_oci_logging ? 1 : 0

Expand All @@ -562,7 +563,7 @@ module "observability-common" {
}

module "observability-autoscaling" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/observability/autoscaling"
count = var.use_autoscaling ? 1 : 0

Expand Down Expand Up @@ -595,6 +596,7 @@ module "observability-autoscaling" {
}

module "observability-osmh"{
depends_on = [module.network-validation]
source = "./modules/observability/osmh"
count = local.create_profile ? 1 : 0
tenancy_id = var.tenancy_ocid
Expand All @@ -603,6 +605,7 @@ module "observability-osmh"{
}

module "compute" {
depends_on = [module.network-validation]
source = "./modules/compute/wls_compute"
add_loadbalancer = local.add_load_balancer
is_lb_private = var.is_lb_private
Expand All @@ -619,7 +622,8 @@ module "compute" {
wls_subnet_id = var.wls_subnet_id
region = var.region
ssh_public_key = var.ssh_public_key
compute_nsg_ids = local.compute_nsg_ids
compute_nsg_ids = local.compute_nsg_ids
num_ads = local.num_ads
tenancy_id = var.tenancy_ocid
tf_script_version = var.tf_script_version
use_regional_subnet = local.use_regional_subnet
Expand Down Expand Up @@ -750,7 +754,7 @@ module "compute" {
}

module "load-balancer-backends" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/lb/backends"
count = local.add_load_balancer ? 1 : 0

Expand All @@ -768,15 +772,15 @@ module "load-balancer-backends" {
}

module "observability-logging" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/observability/logging"
count = var.use_oci_logging ? 1 : 0

compartment_id = var.compartment_ocid
oci_managed_instances_principal_group = element(concat(module.policies[*].oci_managed_instances_principal_group, [""]), 0)
service_prefix_name = local.service_name_prefix
create_policies = var.create_policies
dynamic_group_id = var.dynamic_group_id
dynamic_group_id = local.dynamic_group_id
log_group_id = module.observability-common[0].log_group_id
use_oci_logging = var.use_oci_logging
tags = {
Expand All @@ -786,7 +790,7 @@ module "observability-logging" {
}

module "provisioners" {
#depends_on = [module.network-validation]
depends_on = [module.network-validation]
source = "./modules/provisioners"

existing_bastion_instance_id = var.existing_bastion_instance_id
Expand Down
19 changes: 4 additions & 15 deletions terraform/modules/compute/wls_compute/data_sources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data "oci_identity_fault_domains" "wls_fault_domains" {
}

data "template_file" "ad_names" {
count = length(data.oci_identity_availability_domains.ADs.availability_domains)
count = var.num_ads
template = (length(regexall("^.*Flex", var.instance_shape.instanceShape)) > 0 || length(regexall("^BM.*", var.instance_shape.instanceShape)) > 0 || (tonumber(lookup(data.oci_limits_limit_values.compute_shape_service_limits[count.index].limit_values[0], "value")) > 0)) ? lookup(data.oci_identity_availability_domains.ADs.availability_domains[count.index], "name") : ""
}

Expand All @@ -16,7 +16,7 @@ data "oci_identity_availability_domains" "ADs" {
}

data "oci_limits_limit_values" "compute_shape_service_limits" {
count = length(data.oci_identity_availability_domains.ADs.availability_domains)
count = var.num_ads
compartment_id = var.tenancy_id
service_name = "compute"

Expand All @@ -35,24 +35,13 @@ data "template_file" "key_script" {
}
}

data "oci_core_shapes" "oci_shapes" {
count = length(data.oci_identity_availability_domains.ADs.availability_domains)
compartment_id = var.compartment_id
image_id = var.instance_image_id
availability_domain = lookup(data.oci_identity_availability_domains.ADs.availability_domains[count.index], "name")
filter {
name = "name"
values = [var.instance_shape.instanceShape]
}
}

data "oci_database_autonomous_database" "atp_db" {
count = local.is_atp_db ? 1 : 0
autonomous_database_id = var.jrf_parameters.atp_db_parameters.atp_db_id
}

data "template_file" "atp_nsg_id" {
count = local.is_atp_db && !local.is_db_deleted ? 1 : 0
count = local.is_atp_db ? 1 : 0
template = length(data.oci_database_autonomous_database.atp_db[0].nsg_ids) > 0 ? data.oci_database_autonomous_database.atp_db[0].nsg_ids[0] : ""
}

Expand All @@ -76,6 +65,6 @@ data "oci_database_database" "ocidb_database" {
}

data "oci_database_db_home" "ocidb_db_home" {
count = local.is_ocidb_system_id_available && !local.is_db_deleted ? 1 : 0
count = local.is_ocidb_system_id_available ? 1 : 0
db_home_id = data.oci_database_database.ocidb_database[0].db_home_id
}
6 changes: 3 additions & 3 deletions terraform/modules/compute/wls_compute/idcs_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, 2026, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.

variable "is_idcs_selected" {
Expand Down Expand Up @@ -74,13 +74,13 @@ variable "idcs_cloudgate_config_file" {
variable "idcs_cloudgate_docker_image_tar" {
type = string
description = "Path of the binary file with the container image to run IDCS cloudgate container in the WebLogic VM"
default = "/u01/zips/jcs/app_gateway_docker/25.1.03/app-gateway-docker-image.tar.gz"
default = "/u01/zips/jcs/app_gateway_docker/25.3.32/app-gateway-docker-image.tar.gz"
}

variable "idcs_cloudgate_docker_image_version" {
type = string
description = "Version of the container image to run IDCS cloudgate container in the WebLogic VM"
default = "25.1.03-2501230623"
default = "25.3.32-2508110511"
}

variable "idcs_cloudgate_docker_image_name" {
Expand Down
1 change: 0 additions & 1 deletion terraform/modules/compute/wls_compute/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ locals {
db_storage_management = try(lookup(local.db_options[0], "storage_management", "ASM"), "ASM")

is_db_deleted = local.apply_JRF ? (local.is_atp_db ? (try(data.oci_database_autonomous_database.atp_db[0].id, null) == null ? true : false) : (try(data.oci_database_database.ocidb_database[0].id, null) == null ? true : false)) : false

}
Loading