File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ jobs:
112112 if [ "${{ inputs.deployment_type }}" = "Deployment" ]; then
113113 echo 'bastion_floating_ip = "185.45.78.149"' >> terraform.tfvars
114114 fi
115+
116+ if [ "${{ inputs.deployment_type }}" = "Test" ]; then
117+ echo 'reg_sec_grp = ["default","aufn-lab-rules"]' >> terraform.tfvars
118+ fi
115119 env :
116120 LAB_IMAGE_ID : ${{ inputs.os_image == 'Rocky9' && vars.LAB_OS_IMAGE_ROCKY || inputs.os_image == 'Ubuntu' && vars.LAB_OS_IMAGE_UBUNTU }}
117121 LAB_IMAGE_NAME : ${{ inputs.os_image == 'Ubuntu' && 'Ubuntu-22.04' || inputs.os_image }}
@@ -137,8 +141,6 @@ jobs:
137141
138142 # Need to add a check to see which part failed and then
139143 # taint and retry once more before declating failure
140-
141- terraform destroy -auto-approve
142144 sleep 60
143145 done
144146 echo "Failed to create infrastructure after $attempt attempts"
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ resource "openstack_compute_instance_v2" "registry" {
5656 name = " ${ var . lab_prefix } -registry"
5757 flavor_name = var. registry_flavor
5858 key_pair = openstack_compute_keypair_v2. ufn_lab_key . name
59- security_groups = [ " default " ]
59+ security_groups = var . reg_sec_grp
6060
6161 block_device {
6262 uuid = var. image_id
Original file line number Diff line number Diff line change @@ -86,3 +86,8 @@ variable "dns_zone_name" {
8686 nullable = true
8787 default = null
8888}
89+
90+ variable "reg_sec_grp" {
91+ description = " Security group for the registry instance"
92+ default = [" default" ]
93+ }
You can’t perform that action at this time.
0 commit comments