Skip to content

Commit

Permalink
feat: INFRA-403 tackle bastion_security_group_id left empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbonami committed Aug 4, 2023
1 parent 1de01a7 commit 1b6dc81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "openstack_networking_secgroup_v2" "postgres_bastion" {
}

locals {
bastion_group_ids = [openstack_networking_secgroup_v2.postgres_bastion.id, var.bastion_security_group_id]
bastion_group_ids = var.bastion_security_group_id != "" ? [var.bastion_security_group_id, openstack_networking_secgroup_v2.postgres_bastion.id] : [openstack_networking_secgroup_v2.postgres_bastion.id]
}

//Allow all outbound traffic for server and bastion
Expand Down

0 comments on commit 1b6dc81

Please sign in to comment.