Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert network validation script. (#197) #199

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
27 changes: 15 additions & 12 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2023, 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 @@ -23,9 +25,10 @@ module "network-validation" {
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") : ""
}
*/

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 @@ -204,7 +207,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 Down Expand Up @@ -239,7 +242,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 && var.is_bastion_instance_required && var.existing_bastion_instance_id == "") ? 1 : 0
availability_domain = local.bastion_availability_domain
Expand Down Expand Up @@ -327,7 +330,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 @@ -345,7 +348,7 @@ module "vcn-peering" {
}

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

service_name = var.service_name
Expand Down Expand Up @@ -464,7 +467,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 @@ -487,7 +490,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 @@ -508,7 +511,7 @@ module "load-balancer" {
}

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 @@ -518,7 +521,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 @@ -679,7 +682,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 @@ -694,7 +697,7 @@ 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

Expand All @@ -712,7 +715,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
2 changes: 2 additions & 0 deletions terraform/network_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ variable "wait_time_wls_vnc_dns_resolver" {
default = 60
}

/*
variable "skip_network_validation" {
type = bool
description = "Used in case there is something really wrong with the validation and we need to skip it"
default = false
}
*/
16 changes: 0 additions & 16 deletions terraform/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ groupings:
- ${wls_vcn_name}
- ${wls_vcn_cidr}
- ${create_new_subnets}
- ${skip_network_validation}
- ${subnet_compartment_id}
- ${subnet_type}
- ${subnet_span}
Expand Down Expand Up @@ -699,21 +698,6 @@ variables:
compartmentId: ${network_compartment_id}
vcnId: ${wls_existing_vcn_id}

skip_network_validation:
type: boolean
default: false
required: true
title: "Skip Network Validation"
description: "Skip running network validation script for existing subnets. Existing Virtual Cloud Network can be validated using the network validation script. See <a target=\"_blank\" href=\"https://docs.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/weblogic-cloud/user&id=oci_network_validate\">Validate Existing Network Setup</a>"
visible:
and:
- not:
- ${orm_create_mode}
- not:
- ${create_new_vcn}
- not:
- ${create_new_subnets}

subnet_compartment_id:
visible:
and:
Expand Down
16 changes: 0 additions & 16 deletions terraform/schema_14110.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ groupings:
- ${wls_vcn_name}
- ${wls_vcn_cidr}
- ${create_new_subnets}
- ${skip_network_validation}
- ${subnet_compartment_id}
- ${subnet_type}
- ${subnet_span}
Expand Down Expand Up @@ -708,21 +707,6 @@ variables:
compartmentId: ${network_compartment_id}
vcnId: ${wls_existing_vcn_id}

skip_network_validation:
type: boolean
default: false
required: true
title: "Skip Network Validation"
description: "Skip running network validation script for existing subnets. Existing Virtual Cloud Network can be validated using the network validation script. See <a target=\"_blank\" href=\"https://docs.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/weblogic-cloud/user&id=oci_network_validate\">Validate Existing Network Setup</a>"
visible:
and:
- not:
- ${orm_create_mode}
- not:
- ${create_new_vcn}
- not:
- ${create_new_subnets}

subnet_compartment_id:
visible:
and:
Expand Down