Skip to content

Commit ba95cbc

Browse files
committed
Merge branch 'feat/add-iaas-image-selection' into staging
2 parents 8aa21fa + a867890 commit ba95cbc

File tree

1 file changed

+7
-4
lines changed
  • user-docs/usage-hints/find-image

1 file changed

+7
-4
lines changed

user-docs/usage-hints/find-image/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
117117
the image in an HCL recipe looks like this:
118118

119119
```hcl
120120
# Find the image
121121
data "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).
175176
Note that I have appended a `2` to the variable names, so they don't clash in case you have the
176177
original 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).
246247
So, while ansible YAML proves to be more expressive than HCL here, the by far
247248
simplest 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

Comments
 (0)