@@ -113,15 +113,15 @@ Full code that does this is available in [find_img.sh](find_img.sh).
113113
114114## opentofu / terraform
115115
116- With opentofu (or Hashicorp's terraform is you still use it), identifying
116+ With opentofu (or Hashicorp's terraform if you still use it), identifying
117117the image in an HCL recipe looks like this:
118118
119119``` hcl
120120# Find the image
121121data "openstack_images_image_v2" "my_image" {
122122 most_recent = true
123123
124- properties = {
124+ properties = {
125125 os_distro = "ubuntu"
126126 os_version = "24.04"
127127 os_purpose = "generic"
@@ -172,6 +172,7 @@ output "selected_image2" {
172172}
173173```
174174
175+ The HCL is in [ find_img2.tf] ( find_img2.tf ) .
175176Note that I have appended a ` 2 ` to the variable names, so they don't clash in case you have the
176177original example in the same directory.
177178
@@ -199,7 +200,7 @@ resources:
199200 # ... other properties
200201```
201202
202- and call ` openstack stack create --parameter image=$ID $TEMPLATE $STACKNAME ` .
203+ and call ` openstack stack create --parameter image=$IMAGE_ID $TEMPLATE $STACKNAME ` .
203204
204205## ansible
205206
@@ -245,4 +246,6 @@ can be done in ansible, but gets a bit complex. Find the ansible tasks in
245246[find_img.yaml](find_img.yaml).
246247So, while ansible YAML proves to be more expressive than HCL here, the by far
247248simplest code is the python implementation.
248- Full disclosure: The ansible YAML has been produced with the help of Claude AI.
249+
250+ Transparency hint: The ansible YAML has been produced with the help of Claude AI.
251+ I tested (and fixed) it.
0 commit comments