File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
data/data/powervs/cluster/dns Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,16 @@ resource "ibm_is_security_group_rule" "dns_vm_sg_squid_all" {
147147 }
148148}
149149
150+ data "ibm_is_images" "images" {
151+ count = local. proxy_count
152+ status = " available"
153+ }
154+
150155data "ibm_is_image" "dns_vm_image" {
151156 count = local. proxy_count
152- name = var. dns_vm_image_name
157+ name = [ for image in data . ibm_is_images . images [ 0 ] . images : image if startswith (image . os , var. dns_vm_image_os )][ 0 ] . name
153158}
154159
155-
156160locals {
157161 dns_zone = var. publish_strategy == " Internal" ? data. ibm_dns_zones . dns_zones [0 ]. dns_zones [index (data. ibm_dns_zones . dns_zones [0 ]. dns_zones . * . name , var. base_domain )] : null
158162 proxy_count = var. publish_strategy == " Internal" ? 1 : 0
Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ variable "vpc_permitted" {
5858 description = " Specifies whether an existing VPC is already a Permitted Network for DNS Instance, for Private clusters."
5959}
6060
61- variable "dns_vm_image_name " {
61+ variable "dns_vm_image_os " {
6262 type = string
63- description = " The image name for the DNS VM."
64- default = " ibm- centos-7-9-minimal-amd64-6 "
63+ description = " The image OS for the DNS VM."
64+ default = " centos-stream-9 "
6565}
6666
6767variable "ssh_key" {
You can’t perform that action at this time.
0 commit comments