Skip to content

Commit 92fcb70

Browse files
committed
feat: add talos_image_factory_url data source
Add `talos_image_factory_url` data source. Signed-off-by: Noel Georgi <[email protected]>
1 parent ffc8102 commit 92fcb70

15 files changed

+1284
-266
lines changed

.github/workflows/acceptance-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
libvirt-daemon-system \
4040
qemu-kvm \
4141
qemu-utils \
42+
qemu-block-extra \
4243
ovmf
4344
4445
sudo virtlockd -d
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "talos_image_factory_urls Data Source - talos"
4+
subcategory: ""
5+
description: |-
6+
Generates URLs for different assets supported by the Talos image factory.
7+
---
8+
9+
# talos_image_factory_urls (Data Source)
10+
11+
Generates URLs for different assets supported by the Talos image factory.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "talos_image_factory_urls" "this" {
17+
talos_version = "v1.7.5"
18+
schematic_id = "376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba"
19+
platform = "metal"
20+
}
21+
22+
output "installer_image" {
23+
value = data.talos_image_factory_urls.this.installer_image
24+
}
25+
```
26+
27+
<!-- schema generated by tfplugindocs -->
28+
## Schema
29+
30+
### Required
31+
32+
- `schematic_id` (String) The schematic ID for which the URLs are generated.
33+
- `talos_version` (String) The Talos version for which the URLs are generated.
34+
35+
### Optional
36+
37+
- `architecture` (String) The platform architecture for which the URLs are generated. Defaults to amd64.
38+
- `platform` (String) The platform for which the URLs are generated.
39+
40+
#### Metal
41+
42+
- metal
43+
44+
#### Cloud Platforms
45+
- aws
46+
- gcp
47+
- equinixMetal
48+
- azure
49+
- digital-ocean
50+
- openstack
51+
- vmware
52+
- akamai
53+
- hcloud
54+
- nocloud
55+
- oracle
56+
- upcloud
57+
- vultr
58+
- `sbc` (String) The SBC's (Single Board Copmuters) for which the url are generated.
59+
60+
#### Single Board Computers
61+
- rpi_generic
62+
- bananapi_m64
63+
- nanopi_r4s
64+
- jetson_nano
65+
- libretech_all_h3_cc_h5
66+
- orangepi_r1_plus_lts
67+
- pine64
68+
- rock64
69+
- rock4cplus
70+
- rock4se
71+
- rockpi_4
72+
- rockpi_4c
73+
74+
### Read-Only
75+
76+
- `id` (String) The ID of this resource.
77+
- `urls` (Attributes) The URLs for different assets supported by the Talos image factory. If the URL is not available for a specific asset, it will be an empty string. (see [below for nested schema](#nestedatt--urls))
78+
79+
<a id="nestedatt--urls"></a>
80+
### Nested Schema for `urls`
81+
82+
Read-Only:
83+
84+
- `disk_image` (String) The URL for the disk image.
85+
- `disk_image_secureboot` (String) The URL for the disk image with secure boot.
86+
- `initramfs` (String) The URL for the initramfs image.
87+
- `installer` (String) The URL for the installer image.
88+
- `installer_secureboot` (String) The URL for the installer image with secure boot.
89+
- `iso` (String) The URL for the ISO image.
90+
- `iso_secureboot` (String) The URL for the ISO image with secure boot.
91+
- `kernel` (String) The URL for the kernel image.
92+
- `kernel_command_line` (String) The URL for the kernel command line.
93+
- `pxe` (String) The URL for the PXE image.
94+
- `uki` (String) The URL for the UKI image.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
data "talos_image_factory_urls" "this" {
2+
talos_version = "v1.7.5"
3+
schematic_id = "376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba"
4+
platform = "metal"
5+
}
6+
7+
output "installer_image" {
8+
value = data.talos_image_factory_urls.this.installer_image
9+
}

go.mod

Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ require (
1515
github.com/siderolabs/crypto v0.4.4
1616
github.com/siderolabs/gen v0.5.0
1717
github.com/siderolabs/go-blockdevice v0.4.7
18-
github.com/siderolabs/image-factory v0.4.2
18+
github.com/siderolabs/image-factory v0.4.3-0.20240718113440-8b4e0d9e9819
1919
github.com/siderolabs/net v0.4.0
2020
github.com/siderolabs/talos v1.8.0-alpha.1.0.20240716094326-980f9ebc0725
2121
github.com/siderolabs/talos/pkg/machinery v1.8.0-alpha.1
2222
github.com/stretchr/testify v1.9.0
2323
golang.org/x/mod v0.19.0
2424
google.golang.org/grpc v1.65.0
2525
gopkg.in/yaml.v3 v3.0.1
26-
k8s.io/client-go v0.31.0-alpha.3
26+
k8s.io/client-go v0.31.0-beta.0
2727
)
2828

2929
require (
@@ -52,26 +52,49 @@ require (
5252
github.com/agext/levenshtein v1.2.2 // indirect
5353
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
5454
github.com/armon/go-radix v1.0.0 // indirect
55+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
5556
github.com/bgentry/speakeasy v0.1.0 // indirect
57+
github.com/blang/semver v3.5.1+incompatible // indirect
5658
github.com/blang/semver/v4 v4.0.0 // indirect
5759
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
5860
github.com/containerd/go-cni v1.1.10 // indirect
61+
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
5962
github.com/containernetworking/cni v1.2.2 // indirect
63+
github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 // indirect
6064
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
65+
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
66+
github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect
6167
github.com/distribution/reference v0.6.0 // indirect
68+
github.com/docker/cli v24.0.7+incompatible // indirect
69+
github.com/docker/distribution v2.8.3+incompatible // indirect
70+
github.com/docker/docker v27.0.3+incompatible // indirect
71+
github.com/docker/docker-credential-helpers v0.8.0 // indirect
6272
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
6373
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
6474
github.com/fatih/color v1.17.0 // indirect
75+
github.com/fsnotify/fsnotify v1.7.0 // indirect
6576
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
6677
github.com/ghodss/yaml v1.0.0 // indirect
78+
github.com/go-chi/chi v4.1.2+incompatible // indirect
6779
github.com/go-logr/logr v1.4.2 // indirect
80+
github.com/go-logr/stdr v1.2.2 // indirect
81+
github.com/go-openapi/analysis v0.23.0 // indirect
82+
github.com/go-openapi/errors v0.22.0 // indirect
6883
github.com/go-openapi/jsonpointer v0.21.0 // indirect
6984
github.com/go-openapi/jsonreference v0.21.0 // indirect
85+
github.com/go-openapi/loads v0.22.0 // indirect
86+
github.com/go-openapi/runtime v0.28.0 // indirect
87+
github.com/go-openapi/spec v0.21.0 // indirect
88+
github.com/go-openapi/strfmt v0.23.0 // indirect
7089
github.com/go-openapi/swag v0.23.0 // indirect
90+
github.com/go-openapi/validate v0.24.0 // indirect
7191
github.com/gogo/protobuf v1.3.2 // indirect
7292
github.com/golang/protobuf v1.5.4 // indirect
93+
github.com/golang/snappy v0.0.4 // indirect
94+
github.com/google/certificate-transparency-go v1.1.8 // indirect
7395
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
7496
github.com/google/go-cmp v0.6.0 // indirect
97+
github.com/google/go-containerregistry v0.19.2 // indirect
7598
github.com/google/gofuzz v1.2.0 // indirect
7699
github.com/google/uuid v1.6.0 // indirect
77100
github.com/hashicorp/cli v1.1.6 // indirect
@@ -85,6 +108,7 @@ require (
85108
github.com/hashicorp/go-uuid v1.0.3 // indirect
86109
github.com/hashicorp/go-version v1.7.0 // indirect
87110
github.com/hashicorp/hc-install v0.7.0 // indirect
111+
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
88112
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
89113
github.com/hashicorp/logutils v1.0.0 // indirect
90114
github.com/hashicorp/terraform-exec v0.21.0 // indirect
@@ -94,11 +118,16 @@ require (
94118
github.com/hashicorp/yamux v0.1.1 // indirect
95119
github.com/huandu/xstrings v1.3.3 // indirect
96120
github.com/imdario/mergo v0.3.16 // indirect
121+
github.com/in-toto/in-toto-golang v0.9.0 // indirect
97122
github.com/inconshreveable/mousetrap v1.1.0 // indirect
123+
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect
98124
github.com/josharian/intern v1.0.0 // indirect
99125
github.com/josharian/native v1.1.0 // indirect
100126
github.com/jsimonetti/rtnetlink/v2 v2.0.2 // indirect
101127
github.com/json-iterator/go v1.1.12 // indirect
128+
github.com/klauspost/compress v1.17.9 // indirect
129+
github.com/letsencrypt/boulder v0.0.0-20231026200631-000cd05d5491 // indirect
130+
github.com/magiconair/properties v1.8.7 // indirect
102131
github.com/mailru/easyjson v0.7.7 // indirect
103132
github.com/mattn/go-colorable v0.1.13 // indirect
104133
github.com/mattn/go-isatty v0.0.20 // indirect
@@ -108,31 +137,56 @@ require (
108137
github.com/mdlayher/netlink v1.7.2 // indirect
109138
github.com/mdlayher/socket v0.5.1 // indirect
110139
github.com/mitchellh/copystructure v1.2.0 // indirect
140+
github.com/mitchellh/go-homedir v1.1.0 // indirect
111141
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
112142
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
113143
github.com/mitchellh/mapstructure v1.5.0 // indirect
114144
github.com/mitchellh/reflectwalk v1.0.2 // indirect
115145
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
116146
github.com/modern-go/reflect2 v1.0.2 // indirect
117147
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
148+
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
118149
github.com/oklog/run v1.1.0 // indirect
150+
github.com/oklog/ulid v1.3.1 // indirect
119151
github.com/opencontainers/go-digest v1.0.0 // indirect
152+
github.com/opencontainers/image-spec v1.1.0 // indirect
120153
github.com/opencontainers/runtime-spec v1.2.0 // indirect
154+
github.com/opentracing/opentracing-go v1.2.0 // indirect
155+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
121156
github.com/pkg/errors v0.9.1 // indirect
122157
github.com/planetscale/vtprotobuf v0.6.0 // indirect
123158
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
124159
github.com/posener/complete v1.2.3 // indirect
125160
github.com/rivo/uniseg v0.4.7 // indirect
126161
github.com/ryanuber/go-glob v1.0.0 // indirect
162+
github.com/sagikazarmark/locafero v0.4.0 // indirect
163+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
164+
github.com/sassoftware/relic v7.2.1+incompatible // indirect
165+
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
166+
github.com/shibumi/go-pathspec v1.3.0 // indirect
127167
github.com/shopspring/decimal v1.3.1 // indirect
128168
github.com/siderolabs/go-circular v0.2.0 // indirect
129169
github.com/siderolabs/go-kubernetes v0.2.10 // indirect
130170
github.com/siderolabs/go-pointer v1.0.0 // indirect
131171
github.com/siderolabs/go-procfs v0.1.2 // indirect
132172
github.com/siderolabs/go-retry v0.3.3 // indirect
173+
github.com/sigstore/cosign/v2 v2.2.4 // indirect
174+
github.com/sigstore/rekor v1.3.6 // indirect
175+
github.com/sigstore/sigstore v1.8.3 // indirect
176+
github.com/sigstore/timestamp-authority v1.2.2 // indirect
177+
github.com/sirupsen/logrus v1.9.3 // indirect
178+
github.com/sourcegraph/conc v0.3.0 // indirect
179+
github.com/spf13/afero v1.11.0 // indirect
133180
github.com/spf13/cast v1.6.0 // indirect
134181
github.com/spf13/cobra v1.8.1 // indirect
135182
github.com/spf13/pflag v1.0.5 // indirect
183+
github.com/spf13/viper v1.18.2 // indirect
184+
github.com/subosito/gotenv v1.6.0 // indirect
185+
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
186+
github.com/theupdateframework/go-tuf v0.7.0 // indirect
187+
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
188+
github.com/transparency-dev/merkle v0.0.2 // indirect
189+
github.com/vbatts/tar-split v0.11.5 // indirect
136190
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
137191
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
138192
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
@@ -141,6 +195,10 @@ require (
141195
github.com/yuin/goldmark-meta v1.1.0 // indirect
142196
github.com/zclconf/go-cty v1.14.4 // indirect
143197
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
198+
go.mongodb.org/mongo-driver v1.14.0 // indirect
199+
go.opentelemetry.io/otel v1.26.0 // indirect
200+
go.opentelemetry.io/otel/metric v1.26.0 // indirect
201+
go.opentelemetry.io/otel/trace v1.26.0 // indirect
144202
golang.org/x/crypto v0.25.0 // indirect
145203
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
146204
golang.org/x/net v0.26.0 // indirect
@@ -155,13 +213,15 @@ require (
155213
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect
156214
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
157215
google.golang.org/protobuf v1.34.2 // indirect
216+
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
158217
gopkg.in/inf.v0 v0.9.1 // indirect
218+
gopkg.in/ini.v1 v1.67.0 // indirect
159219
gopkg.in/yaml.v2 v2.4.0 // indirect
160-
k8s.io/api v0.31.0-alpha.3 // indirect
161-
k8s.io/apimachinery v0.31.0-alpha.3 // indirect
220+
k8s.io/api v0.31.0-beta.0 // indirect
221+
k8s.io/apimachinery v0.31.0-beta.0 // indirect
162222
k8s.io/klog/v2 v2.130.1 // indirect
163223
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 // indirect
164-
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
224+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
165225
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
166226
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
167227
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)