I have a list of custom images in my account.
In my terraform template, I'd like to retrieve an image with a specific tag. I don't want to hardcode or pass the image ID to the terraform template, I want to reference a tag like version:1.0 instead. I could not find how to do it with data ibm_is_image.
Using a combination of
ibm_is_imagesto retrieve all images andibm_resource_tagto retrieve the tags associated to one image, you can filter to find the image you are looking for.Here is an example. It assumes that you have several images in your custom image library and that these images have been tagged
version:1.0andversion:2.0