Skip to content

Commit

Permalink
OCTOPUS-555: harden the skip for routes
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <[email protected]>
  • Loading branch information
prb112 committed Nov 14, 2023
1 parent a59182d commit 7923b06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/1_vpc_prepare/routes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
################################################################

resource "ibm_is_vpc_routing_table_route" "route_to_powervs" {
count = var.skip_route_creation ? 0 : 1
vpc = data.ibm_is_vpc.vpc.id
routing_table = data.ibm_is_vpc.vpc.default_routing_table
zone = var.vpc_create || var.create_custom_subnet ? ibm_is_subnet.subnet_worker_zone_1[0].zone : data.ibm_is_vpc.vpc.subnets[0].zone
Expand Down
3 changes: 2 additions & 1 deletion modules/1_vpc_prepare/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ variable "bastion_public_ip" {}
variable "private_key_file" {}
variable "connection_timeout" {}
variable "rhel_username" {}
variable "skip_create_security_group" {}
variable "skip_create_security_group" {}
variable "skip_route_creation" {}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,9 @@ variable "skip_create_security_group" {
default = false
}

variable "skip_route_creation" {
type = bool
description = "skips the creation of the route table entry in a vpc environment"
default = false
}

0 comments on commit 7923b06

Please sign in to comment.