This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
config.go
64 lines (57 loc) · 1.55 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package config
import (
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
// The OVH API Application Key.
func GetApplicationKey(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "ovh:applicationKey")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "OVH_APPLICATION_KEY"); d != nil {
value = d.(string)
}
return value
}
// The OVH API Application Secret.
func GetApplicationSecret(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "ovh:applicationSecret")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "OVH_APPLICATION_SECRET"); d != nil {
value = d.(string)
}
return value
}
// The OVH API Consumer key.
func GetConsumerKey(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "ovh:consumerKey")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "OVH_CONSUMER_KEY"); d != nil {
value = d.(string)
}
return value
}
// The OVH API endpoint to target (ex: "ovh-eu").
func GetEndpoint(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "ovh:endpoint")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "OVH_ENDPOINT"); d != nil {
value = d.(string)
}
return value
}