Skip to content

Commit 2b0035d

Browse files
Merge branch 'dev' into autodiscovery-for-aws
2 parents c7532f4 + 8b3465d commit 2b0035d

14 files changed

Lines changed: 893 additions & 64 deletions

File tree

PROVIDERS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ Google Cloud Platform supports **two discovery approaches** and **two authentica
152152
- `service_account_email` (string, required if short-lived): Target service account to impersonate
153153
- `source_credentials` (string, optional): Path to source credentials file (uses ADC if not provided)
154154
- `token_lifetime` (string, optional): Token lifetime in seconds (e.g., "3600s") or Go duration format (e.g., "1h"). Range: 1s to 3600s (1 hour). Default: "3600s"
155+
- `project_ids` (list, optional): Comma-separated/list of project IDs to enumerate. When provided, Cloudlist skips discovery in every other accessible project, both for individual APIs and the organization-level Asset API.
155156

156157
---
157158

@@ -191,8 +192,13 @@ Google Cloud Platform supports **two discovery approaches** and **two authentica
191192
use_short_lived_credentials: true
192193
service_account_email: "asset-viewer-sa@project.iam.gserviceaccount.com"
193194
token_lifetime: "7200s" # 2 hours
195+
project_ids:
196+
- security-core
197+
- shared-infra
194198
```
195199

200+
Add `project_ids` to either configuration style to limit enumeration strictly to the listed projects (Cloud Asset API requests are filtered too), which is helpful for large organizations or delegated-access service accounts.
201+
196202
**Required Organization-Level Roles:**
197203
1. `roles/cloudasset.viewer` - Core Asset API access
198204
2. `roles/resourcemanager.viewer` - List projects in organization
@@ -570,3 +576,32 @@ The `dnssimple_api_token` can be generated from the DNSSimple account settings u
570576
References -
571577
1. https://developer.dnsimple.com/v2/
572578
2. https://support.dnsimple.com/articles/api-access-token/
579+
580+
### OVH
581+
582+
Cloudlist supports fetching DNS records from OVH.
583+
584+
- **Provider key**: `ovh`
585+
- **Services**: `dns`
586+
- **id**: An arbitrary label you choose to tag resources. It helps distinguish multiple OVH accounts/configs.
587+
- **Required auth**:
588+
- `application_key`
589+
- `application_secret`
590+
- `consumer_key`
591+
- **Endpoint**: OVH API endpoint. Defaults to `ovh-eu` if omitted. Common values: `ovh-eu`, `ovh-ca`, `ovh-us`.
592+
593+
Configuration example (from `ovh.yaml`):
594+
595+
```yaml
596+
- provider: ovh
597+
id: ovh-prod
598+
endpoint: ovh-ca
599+
application_key: $OVH_APP_KEY
600+
application_secret: $OVH_APP_SECRET
601+
consumer_key: $OVH_CONSUMER_KEY
602+
```
603+
604+
References -
605+
1. https://eu.api.ovh.com/console/?section=%2Fdomain&branch=v1
606+
2. https://api.ovh.com/createToken/
607+
3. https://help.ovhcloud.com/csm/en-gb-api-getting-started-ovhcloud-api

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ require (
148148
golang.org/x/time v0.12.0 // indirect
149149
golang.org/x/tools v0.39.0 // indirect
150150
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
151-
google.golang.org/grpc v1.73.0 // indirect
151+
google.golang.org/grpc v1.73.0
152152
google.golang.org/protobuf v1.36.6
153153
gopkg.in/inf.v0 v0.9.1 // indirect
154-
gopkg.in/ini.v1 v1.66.6 // indirect
154+
gopkg.in/ini.v1 v1.67.0 // indirect
155155
gopkg.in/yaml.v3 v3.0.1 // indirect
156156
k8s.io/klog/v2 v2.120.1 // indirect
157157
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
@@ -182,6 +182,7 @@ require (
182182
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager v1.3.0
183183
github.com/alitto/pond/v2 v2.3.2
184184
github.com/dnsimple/dnsimple-go v1.7.0
185+
github.com/ovh/go-ovh v1.9.0
185186
github.com/projectdiscovery/networkpolicy v0.1.34
186187
github.com/projectdiscovery/retryablehttp-go v1.3.6
187188
)
@@ -224,7 +225,7 @@ require (
224225
github.com/minio/minlz v1.0.1 // indirect
225226
github.com/nwaples/rardecode/v2 v2.2.2 // indirect
226227
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
227-
github.com/projectdiscovery/fastdialer v0.5.3 // indirect
228+
github.com/projectdiscovery/fastdialer v0.5.4 // indirect
228229
github.com/projectdiscovery/hmap v0.0.100 // indirect
229230
github.com/projectdiscovery/retryabledns v1.0.113 // indirect
230231
github.com/refraction-networking/utls v1.7.1 // indirect

go.sum

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
396396
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
397397
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
398398
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
399+
github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
400+
github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
399401
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
400402
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
401403
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@@ -465,6 +467,8 @@ github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh
465467
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
466468
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
467469
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
470+
github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g=
471+
github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM=
468472
github.com/mholt/archives v0.1.5 h1:Fh2hl1j7VEhc6DZs2DLMgiBNChUux154a1G+2esNvzQ=
469473
github.com/mholt/archives v0.1.5/go.mod h1:3TPMmBLPsgszL+1As5zECTuKwKvIfj6YcwWPpeTAXF4=
470474
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
@@ -523,6 +527,8 @@ github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKi
523527
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
524528
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A=
525529
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU=
530+
github.com/ovh/go-ovh v1.9.0 h1:6K8VoL3BYjVV3In9tPJUdT7qMx9h0GExN9EXx1r2kKE=
531+
github.com/ovh/go-ovh v1.9.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
526532
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
527533
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
528534
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -545,8 +551,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF
545551
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
546552
github.com/projectdiscovery/blackrock v0.0.1 h1:lHQqhaaEFjgf5WkuItbpeCZv2DUIE45k0VbGJyft6LQ=
547553
github.com/projectdiscovery/blackrock v0.0.1/go.mod h1:ANUtjDfaVrqB453bzToU+YB4cUbvBRpLvEwoWIwlTss=
548-
github.com/projectdiscovery/fastdialer v0.5.3 h1:Io57Q37ouFzrPK53ZdzK6jsELgqjIMCWcoDs+lRDGMA=
549-
github.com/projectdiscovery/fastdialer v0.5.3/go.mod h1:euoxS1E93LDnl0OnNN0UALedAFF+EehBxyU3z+79l0g=
554+
github.com/projectdiscovery/fastdialer v0.5.4 h1:+0oesDDqZcIPE5bNDmm/Xm9Xm3yjnhl4xwP+h5D1TE4=
555+
github.com/projectdiscovery/fastdialer v0.5.4/go.mod h1:KCzt6WnSAj9umiUBRCaC0EJSEyeshxDoowfwjxodmQw=
550556
github.com/projectdiscovery/goflags v0.1.74 h1:n85uTRj5qMosm0PFBfsvOL24I7TdWRcWq/1GynhXS7c=
551557
github.com/projectdiscovery/goflags v0.1.74/go.mod h1:UMc9/7dFz2oln+10tv6cy+7WZKTHf9UGhaNkF95emh4=
552558
github.com/projectdiscovery/gologger v1.1.68 h1:KfdIO/3X7BtHssWZuqhxPZ+A946epCCx2cz+3NnRAnU=
@@ -1042,8 +1048,8 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
10421048
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
10431049
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
10441050
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
1045-
gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI=
1046-
gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
1051+
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
1052+
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
10471053
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
10481054
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
10491055
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=

internal/runner/runner.go

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import (
66
"os"
77
"strconv"
88
"strings"
9+
"sync"
910

1011
jsoniter "github.com/json-iterator/go"
1112
"github.com/projectdiscovery/cloudlist/pkg/inventory"
1213
"github.com/projectdiscovery/cloudlist/pkg/schema"
14+
"github.com/projectdiscovery/cloudlist/pkg/schema/validate"
1315
"github.com/projectdiscovery/gologger"
1416
)
1517

@@ -115,6 +117,8 @@ func (r *Runner) Enumerate() {
115117
continue
116118
}
117119

120+
sanitizePrivateIPs(instance, r.options.ExcludePrivate)
121+
118122
builder.Reset()
119123

120124
if r.options.JSON {
@@ -124,7 +128,7 @@ func (r *Runner) Enumerate() {
124128
} else {
125129
builder.Write(data)
126130
builder.WriteString("\n")
127-
output.Write(builder.Bytes()) //nolint
131+
writeOutputBytes(output, builder.Bytes())
128132

129133
if instance.DNSName != "" {
130134
hostsCount++
@@ -152,7 +156,7 @@ func (r *Runner) Enumerate() {
152156
hostsCount++
153157
builder.WriteString(instance.DNSName)
154158
builder.WriteRune('\n')
155-
output.WriteString(builder.String()) //nolint
159+
writeOutputString(output, builder.String())
156160
builder.Reset()
157161
gologger.Silent().Msgf("%s", instance.DNSName)
158162
}
@@ -163,31 +167,31 @@ func (r *Runner) Enumerate() {
163167
ipCount++
164168
builder.WriteString(instance.PublicIPv4)
165169
builder.WriteRune('\n')
166-
output.WriteString(builder.String()) //nolint
170+
writeOutputString(output, builder.String())
167171
builder.Reset()
168172
gologger.Silent().Msgf("%s", instance.PublicIPv4)
169173
}
170174
if instance.PublicIPv6 != "" {
171175
ipCount++
172176
builder.WriteString(instance.PublicIPv6)
173177
builder.WriteRune('\n')
174-
output.WriteString(builder.String()) //nolint
178+
writeOutputString(output, builder.String())
175179
builder.Reset()
176180
gologger.Silent().Msgf("%s", instance.PublicIPv6)
177181
}
178182
if instance.PrivateIpv4 != "" && !r.options.ExcludePrivate {
179183
ipCount++
180184
builder.WriteString(instance.PrivateIpv4)
181185
builder.WriteRune('\n')
182-
output.WriteString(builder.String()) //nolint
186+
writeOutputString(output, builder.String())
183187
builder.Reset()
184188
gologger.Silent().Msgf("%s", instance.PrivateIpv4)
185189
}
186190
if instance.PrivateIpv6 != "" && !r.options.ExcludePrivate {
187191
ipCount++
188192
builder.WriteString(instance.PrivateIpv6)
189193
builder.WriteRune('\n')
190-
output.WriteString(builder.String()) //nolint
194+
writeOutputString(output, builder.String())
191195
builder.Reset()
192196
gologger.Silent().Msgf("%s", instance.PrivateIpv6)
193197
}
@@ -198,39 +202,39 @@ func (r *Runner) Enumerate() {
198202
hostsCount++
199203
builder.WriteString(instance.DNSName)
200204
builder.WriteRune('\n')
201-
output.WriteString(builder.String()) //nolint
205+
writeOutputString(output, builder.String())
202206
builder.Reset()
203207
gologger.Silent().Msgf("%s", instance.DNSName)
204208
}
205209
if instance.PublicIPv4 != "" {
206210
ipCount++
207211
builder.WriteString(instance.PublicIPv4)
208212
builder.WriteRune('\n')
209-
output.WriteString(builder.String()) //nolint
213+
writeOutputString(output, builder.String())
210214
builder.Reset()
211215
gologger.Silent().Msgf("%s", instance.PublicIPv4)
212216
}
213217
if instance.PublicIPv6 != "" {
214218
ipCount++
215219
builder.WriteString(instance.PublicIPv6)
216220
builder.WriteRune('\n')
217-
output.WriteString(builder.String()) //nolint
221+
writeOutputString(output, builder.String())
218222
builder.Reset()
219223
gologger.Silent().Msgf("%s", instance.PublicIPv6)
220224
}
221225
if instance.PrivateIpv4 != "" && !r.options.ExcludePrivate {
222226
ipCount++
223227
builder.WriteString(instance.PrivateIpv4)
224228
builder.WriteRune('\n')
225-
output.WriteString(builder.String()) //nolint
229+
writeOutputString(output, builder.String())
226230
builder.Reset()
227231
gologger.Silent().Msgf("%s", instance.PrivateIpv4)
228232
}
229233
if instance.PrivateIpv6 != "" && !r.options.ExcludePrivate {
230234
ipCount++
231235
builder.WriteString(instance.PrivateIpv6)
232236
builder.WriteRune('\n')
233-
output.WriteString(builder.String()) //nolint
237+
writeOutputString(output, builder.String())
234238
builder.Reset()
235239
gologger.Silent().Msgf("%s", instance.PrivateIpv6)
236240
}
@@ -263,3 +267,55 @@ func Contains(s []string, e string) bool {
263267
}
264268
return false
265269
}
270+
271+
func sanitizePrivateIPs(resource *schema.Resource, exclude bool) {
272+
if !exclude || resource == nil {
273+
return
274+
}
275+
resource.PrivateIpv4 = ""
276+
resource.PrivateIpv6 = ""
277+
278+
if isPrivateIP(resource.PublicIPv4) {
279+
resource.PublicIPv4 = ""
280+
}
281+
if isPrivateIP(resource.PublicIPv6) {
282+
resource.PublicIPv6 = ""
283+
}
284+
}
285+
286+
var (
287+
ipValidatorOnce sync.Once
288+
ipValidator *validate.Validator
289+
)
290+
291+
func isPrivateIP(ip string) bool {
292+
if ip == "" {
293+
return false
294+
}
295+
ipValidatorOnce.Do(func() {
296+
var err error
297+
ipValidator, err = validate.NewValidator()
298+
if err != nil {
299+
gologger.Warning().Msgf("could not initialize ip validator: %s", err)
300+
}
301+
})
302+
if ipValidator == nil {
303+
return false
304+
}
305+
resourceType := ipValidator.Identify(ip)
306+
return resourceType == validate.PrivateIPv4 || resourceType == validate.PrivateIPv6
307+
}
308+
309+
func writeOutputString(output *os.File, data string) {
310+
if output == nil || data == "" {
311+
return
312+
}
313+
_, _ = output.WriteString(data)
314+
}
315+
316+
func writeOutputBytes(output *os.File, data []byte) {
317+
if output == nil || len(data) == 0 {
318+
return
319+
}
320+
_, _ = output.Write(data)
321+
}

internal/runner/runner_test.go

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package runner
2+
3+
import (
4+
"testing"
5+
6+
"github.com/projectdiscovery/cloudlist/pkg/schema"
7+
)
8+
9+
func TestSanitizePrivateIPs(t *testing.T) {
10+
resource := &schema.Resource{
11+
PublicIPv4: "1.2.3.4",
12+
PrivateIpv4: "10.0.0.5",
13+
PrivateIpv6: "fd00::1",
14+
PublicIPv6: "2606:4700:4700::1111",
15+
DNSName: "example.internal",
16+
}
17+
18+
sanitizePrivateIPs(resource, true)
19+
20+
if resource.PrivateIpv4 != "" || resource.PrivateIpv6 != "" {
21+
t.Fatalf("expected private addresses to be cleared, got %q and %q", resource.PrivateIpv4, resource.PrivateIpv6)
22+
}
23+
24+
if resource.PublicIPv4 == "" || resource.PublicIPv6 == "" || resource.DNSName == "" {
25+
t.Fatalf("public fields should remain untouched: %+v", resource)
26+
}
27+
28+
resource.PrivateIpv4 = "10.0.0.5"
29+
resource.PrivateIpv6 = "fd00::1"
30+
sanitizePrivateIPs(resource, false)
31+
32+
if resource.PrivateIpv4 == "" || resource.PrivateIpv6 == "" {
33+
t.Fatalf("expected private addresses to remain when exclusion disabled")
34+
}
35+
36+
sanitizePrivateIPs(nil, true)
37+
}
38+
39+
func TestSanitizePrivateIPsOnMisclassifiedFields(t *testing.T) {
40+
resource := &schema.Resource{
41+
PublicIPv4: "10.10.0.5",
42+
PublicIPv6: "fd00::5",
43+
}
44+
45+
sanitizePrivateIPs(resource, true)
46+
47+
if resource.PublicIPv4 != "" || resource.PublicIPv6 != "" {
48+
t.Fatalf("expected private addresses in public fields to be cleared, got ipv4=%q ipv6=%q", resource.PublicIPv4, resource.PublicIPv6)
49+
}
50+
51+
resource.PublicIPv4 = "8.8.8.8"
52+
resource.PublicIPv6 = "2606:4700:4700::1111"
53+
sanitizePrivateIPs(resource, true)
54+
55+
if resource.PublicIPv4 == "" || resource.PublicIPv6 == "" {
56+
t.Fatalf("expected public addresses to remain when exclusion enabled")
57+
}
58+
}

pkg/inventory/inventory.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/projectdiscovery/cloudlist/pkg/providers/namecheap"
2222
"github.com/projectdiscovery/cloudlist/pkg/providers/nomad"
2323
"github.com/projectdiscovery/cloudlist/pkg/providers/openstack"
24+
"github.com/projectdiscovery/cloudlist/pkg/providers/ovh"
2425
"github.com/projectdiscovery/cloudlist/pkg/providers/scaleway"
2526
"github.com/projectdiscovery/cloudlist/pkg/providers/terraform"
2627
"github.com/projectdiscovery/cloudlist/pkg/providers/vercel"
@@ -71,6 +72,7 @@ var Providers = map[string][]string{
7172
"nomad": nomad.Services,
7273
"hetzner": hetzner.Services,
7374
"openstack": openstack.Services,
75+
"ovh": ovh.Services,
7476
"kubernetes": k8s.Services,
7577
"vercel": vercel.Services,
7678
"custom": custom.Services,
@@ -127,6 +129,8 @@ func nameToProvider(value string, block schema.OptionBlock) (schema.Provider, er
127129
return hetzner.New(block)
128130
case "openstack":
129131
return openstack.New(block)
132+
case "ovh":
133+
return ovh.New(block)
130134
case "kubernetes":
131135
return k8s.New(block)
132136
case "vercel":

0 commit comments

Comments
 (0)