generated from pulumi/pulumi-tf-provider-boilerplate
/
config.go
44 lines (40 loc) · 1.19 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
// 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/pulumi/pulumi-sumologic/sdk/go/sumologic/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
func GetAccessId(ctx *pulumi.Context) string {
return config.Get(ctx, "sumologic:accessId")
}
func GetAccessKey(ctx *pulumi.Context) string {
return config.Get(ctx, "sumologic:accessKey")
}
func GetAdminMode(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "sumologic:adminMode")
}
func GetBaseUrl(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "sumologic:baseUrl")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "SUMOLOGIC_BASE_URL"); d != nil {
value = d.(string)
}
return value
}
func GetEnvironment(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "sumologic:environment")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "SUMOLOGIC_ENVIRONMENT"); d != nil {
value = d.(string)
}
return value
}