Skip to content

Commit

Permalink
OCTOPUS-558: added conditional skip of haproxy creation
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <[email protected]>
  • Loading branch information
prb112 committed Dec 6, 2023
1 parent 5447241 commit 87f926d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
25 changes: 13 additions & 12 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,18 @@ module "post" {
depends_on = [module.worker]
source = "./modules/7_post"

ssh_agent = var.ssh_agent
rhel_username = var.rhel_username
connection_timeout = var.connection_timeout
bastion_public_ip = var.powervs_bastion_ip
private_key_file = var.private_key_file
vpc_region = var.vpc_region
vpc_zone = var.vpc_zone
name_prefix = local.name_prefix
worker_1 = var.worker_1
worker_2 = var.worker_2
worker_3 = var.worker_3
cicd_image_pruner_cleanup = var.cicd_image_pruner_cleanup
ssh_agent = var.ssh_agent
rhel_username = var.rhel_username
connection_timeout = var.connection_timeout
bastion_public_ip = var.powervs_bastion_ip
private_key_file = var.private_key_file
vpc_region = var.vpc_region
vpc_zone = var.vpc_zone
name_prefix = local.name_prefix
worker_1 = var.worker_1
worker_2 = var.worker_2
worker_3 = var.worker_3
cicd_image_pruner_cleanup = var.cicd_image_pruner_cleanup
ibm_cloud_cis = var.ibm_cloud_cis
}

3 changes: 2 additions & 1 deletion modules/7_post/post.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ EOF
}
}

# Dev Note: we skip this as it implies the CIS, Security Groups and Load Balancers are used
module "haproxy_lb_support" {
count = var.ibm_cloud_cis ? 0 : 1
depends_on = [null_resource.patch_nfs_arch_ppc64le]
source = "./haproxy_lb"

Expand All @@ -203,4 +205,3 @@ module "haproxy_lb_support" {
worker_2 = var.worker_2
worker_3 = var.worker_3
}

1 change: 1 addition & 0 deletions modules/7_post/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ variable "worker_1" {}
variable "worker_2" {}
variable "worker_3" {}
variable "cicd_image_pruner_cleanup" {}
variable "ibm_cloud_cis" {}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ variable "skip_route_creation" {

variable "ibm_cloud_cis" {
type = bool
description = "indicates LoadBalancer and Security Groups are created by UPI automation"
description = "indicates CIS DNS Entries, LoadBalancer and Security Groups are created by UPI automation"
default = false
}

0 comments on commit 87f926d

Please sign in to comment.