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:
112
112
if [ "${{ inputs.deployment_type }}" = "Deployment" ]; then
113
113
echo 'bastion_floating_ip = "185.45.78.149"' >> terraform.tfvars
114
114
fi
115
+
116
+ if [ "${{ inputs.deployment_type }}" = "Test" ]; then
117
+ echo 'reg_sec_grp = ["default","aufn-lab-rules"]' >> terraform.tfvars
118
+ fi
115
119
env :
116
120
LAB_IMAGE_ID : ${{ inputs.os_image == 'Rocky9' && vars.LAB_OS_IMAGE_ROCKY || inputs.os_image == 'Ubuntu' && vars.LAB_OS_IMAGE_UBUNTU }}
117
121
LAB_IMAGE_NAME : ${{ inputs.os_image == 'Ubuntu' && 'Ubuntu-22.04' || inputs.os_image }}
@@ -137,8 +141,6 @@ jobs:
137
141
138
142
# Need to add a check to see which part failed and then
139
143
# taint and retry once more before declating failure
140
-
141
- terraform destroy -auto-approve
142
144
sleep 60
143
145
done
144
146
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" {
56
56
name = " ${ var . lab_prefix } -registry"
57
57
flavor_name = var. registry_flavor
58
58
key_pair = openstack_compute_keypair_v2. ufn_lab_key . name
59
- security_groups = [ " default " ]
59
+ security_groups = var . reg_sec_grp
60
60
61
61
block_device {
62
62
uuid = var. image_id
Original file line number Diff line number Diff line change @@ -86,3 +86,8 @@ variable "dns_zone_name" {
86
86
nullable = true
87
87
default = null
88
88
}
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