generated from pulumi/pulumi-tf-provider-boilerplate
/
config.go
116 lines (95 loc) · 4.96 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// 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/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
// The name of the Snowflake account. Can also come from the `SNOWFLAKE_ACCOUNT` environment variable.
func GetAccount(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:account")
}
// Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_USE_BROWSER_AUTH` environment variable.
func GetBrowserAuth(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "snowflake:browserAuth")
}
// Supports passing in a custom host value to the snowflake go driver for use with privatelink.
func GetHost(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:host")
}
// Token for use with OAuth. Generating the token is left to other tools. Cannot be used with `browser_auth`,
// `private_key_path`, `oauth_refresh_token` or `password`. Can be sourced from `SNOWFLAKE_OAUTH_ACCESS_TOKEN` environment
// variable.
func GetOauthAccessToken(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthAccessToken")
}
// Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_CLIENT_ID` environment variable.
func GetOauthClientId(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthClientId")
}
// Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_CLIENT_SECRET` environment variable.
func GetOauthClientSecret(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthClientSecret")
}
// Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_ENDPOINT` environment variable.
func GetOauthEndpoint(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthEndpoint")
}
// Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_REDIRECT_URL` environment variable.
func GetOauthRedirectUrl(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthRedirectUrl")
}
// Token for use with OAuth. Setup and generation of the token is left to other tools. Should be used in conjunction with
// `oauth_client_id`, `oauth_client_secret`, `oauth_endpoint`, `oauth_redirect_url`. Cannot be used with `browser_auth`,
// `private_key_path`, `oauth_access_token` or `password`. Can be sourced from `SNOWFLAKE_OAUTH_REFRESH_TOKEN` environment
// variable.
func GetOauthRefreshToken(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:oauthRefreshToken")
}
// Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from
// `SNOWFLAKE_PASSWORD` environment variable.
func GetPassword(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:password")
}
// Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT`
// environment variable.
func GetPort(ctx *pulumi.Context) int {
return config.GetInt(ctx, "snowflake:port")
}
// Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from
// `SNOWFLAKE_PRIVATE_KEY` environment variable.
func GetPrivateKey(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:privateKey")
}
// Supports the encryption ciphers aes-128-cbc, aes-128-gcm, aes-192-cbc, aes-192-gcm, aes-256-cbc, aes-256-gcm, and
// des-ede3-cbc
func GetPrivateKeyPassphrase(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:privateKeyPassphrase")
}
// Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or
// `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable.
func GetPrivateKeyPath(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:privateKeyPath")
}
// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable.
func GetProtocol(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:protocol")
}
// [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the
// `SNOWFLAKE_REGION` environment variable.
func GetRegion(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:region")
}
// Snowflake role to use for operations. If left unset, default role for user will be used. Can come from the
// `SNOWFLAKE_ROLE` environment variable.
func GetRole(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:role")
}
// Username for username+password authentication. Can come from the `SNOWFLAKE_USER` environment variable.
func GetUsername(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:username")
}
// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable.
func GetWarehouse(ctx *pulumi.Context) string {
return config.Get(ctx, "snowflake:warehouse")
}