config

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccount

func GetAccount(ctx *pulumi.Context) string

Specifies your Snowflake account identifier assigned, by Snowflake. For information about account identifiers, see the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html). Can also be sourced from the `SNOWFLAKE_ACCOUNT` environment variable. Required unless using `profile`.

func GetAuthenticator added in v0.37.0

func GetAuthenticator(ctx *pulumi.Context) string

Specifies the [authentication type](https://pkg.go.dev/github.com/snowflakedb/gosnowflake#AuthType) to use when connecting to Snowflake. Valid values include: Snowflake, OAuth, ExternalBrowser, Okta, JWT, TokenAccessor, UsernamePasswordMFA. Can also be sourced from the `SNOWFLAKE_AUTHENTICATOR` environment variable. It has to be set explicitly to JWT for private key authentication.

func GetBrowserAuth deprecated

func GetBrowserAuth(ctx *pulumi.Context) bool

Required when `oauthRefreshToken` is used. Can also be sourced from `SNOWFLAKE_USE_BROWSER_AUTH` environment variable.

Deprecated: Use `authenticator` instead

func GetClientIp added in v0.38.0

func GetClientIp(ctx *pulumi.Context) string

IP address for network checks. Can also be sourced from the `SNOWFLAKE_CLIENT_IP` environment variable.

func GetClientRequestMfaToken added in v0.38.0

func GetClientRequestMfaToken(ctx *pulumi.Context) bool

When true the MFA token is cached in the credential manager. True by default in Windows/OSX. False for Linux. Can also be sourced from the `SNOWFLAKE_CLIENT_REQUEST_MFA_TOKEN` environment variable.

func GetClientStoreTemporaryCredential added in v0.38.0

func GetClientStoreTemporaryCredential(ctx *pulumi.Context) bool

When true the ID token is cached in the credential manager. True by default in Windows/OSX. False for Linux. Can also be sourced from the `SNOWFLAKE_CLIENT_STORE_TEMPORARY_CREDENTIAL` environment variable.

func GetClientTimeout added in v0.38.0

func GetClientTimeout(ctx *pulumi.Context) int

The timeout in seconds for the client to complete the authentication. Default is 900 seconds. Can also be sourced from the `SNOWFLAKE_CLIENT_TIMEOUT` environment variable.

func GetDisableQueryContextCache added in v0.38.0

func GetDisableQueryContextCache(ctx *pulumi.Context) bool

Should HTAP query context cache be disabled. Can also be sourced from the `SNOWFLAKE_DISABLE_QUERY_CONTEXT_CACHE` environment variable.

func GetDisableTelemetry added in v0.38.0

func GetDisableTelemetry(ctx *pulumi.Context) bool

Indicates whether to disable telemetry. Can also be sourced from the `SNOWFLAKE_DISABLE_TELEMETRY` environment variable.

func GetExternalBrowserTimeout added in v0.38.0

func GetExternalBrowserTimeout(ctx *pulumi.Context) int

The timeout in seconds for the external browser to complete the authentication. Default is 120 seconds. Can also be sourced from the `SNOWFLAKE_EXTERNAL_BROWSER_TIMEOUT` environment variable.

func GetHost added in v0.7.0

func GetHost(ctx *pulumi.Context) string

Supports passing in a custom host value to the snowflake go driver for use with privatelink. Can also be sourced from the `SNOWFLAKE_HOST` environment variable.

func GetInsecureMode added in v0.23.0

func GetInsecureMode(ctx *pulumi.Context) bool

If true, bypass the Online Certificate Status Protocol (OCSP) certificate revocation check. IMPORTANT: Change the default value for testing or emergency situations only. Can also be sourced from the `SNOWFLAKE_INSECURE_MODE` environment variable.

func GetJwtClientTimeout added in v0.38.0

func GetJwtClientTimeout(ctx *pulumi.Context) int

The timeout in seconds for the JWT client to complete the authentication. Default is 10 seconds. Can also be sourced from the `SNOWFLAKE_JWT_CLIENT_TIMEOUT` environment variable.

func GetJwtExpireTimeout added in v0.38.0

func GetJwtExpireTimeout(ctx *pulumi.Context) int

JWT expire after timeout in seconds. Can also be sourced from the `SNOWFLAKE_JWT_EXPIRE_TIMEOUT` environment variable.

func GetKeepSessionAlive added in v0.38.0

func GetKeepSessionAlive(ctx *pulumi.Context) bool

Enables the session to persist even after the connection is closed. Can also be sourced from the `SNOWFLAKE_KEEP_SESSION_ALIVE` environment variable.

func GetLoginTimeout added in v0.38.0

func GetLoginTimeout(ctx *pulumi.Context) int

Login retry timeout EXCLUDING network roundtrip and read out http response. Can also be sourced from the `SNOWFLAKE_LOGIN_TIMEOUT` environment variable.

func GetOauthAccessToken deprecated

func GetOauthAccessToken(ctx *pulumi.Context) string

Token for use with OAuth. Generating the token is left to other tools. Cannot be used with `browserAuth`, `privateKeyPath`, `oauthRefreshToken` or `password`. Can also be sourced from `SNOWFLAKE_OAUTH_ACCESS_TOKEN` environment variable.

Deprecated: Use `token` instead

func GetOauthClientId deprecated

func GetOauthClientId(ctx *pulumi.Context) string

Required when `oauthRefreshToken` is used. Can also be sourced from `SNOWFLAKE_OAUTH_CLIENT_ID` environment variable.

Deprecated: Use `token_accessor.0.client_id` instead

func GetOauthClientSecret deprecated

func GetOauthClientSecret(ctx *pulumi.Context) string

Required when `oauthRefreshToken` is used. Can also be sourced from `SNOWFLAKE_OAUTH_CLIENT_SECRET` environment variable.

Deprecated: Use `token_accessor.0.client_secret` instead

func GetOauthEndpoint deprecated

func GetOauthEndpoint(ctx *pulumi.Context) string

Required when `oauthRefreshToken` is used. Can also be sourced from `SNOWFLAKE_OAUTH_ENDPOINT` environment variable.

Deprecated: Use `token_accessor.0.token_endpoint` instead

func GetOauthRedirectUrl deprecated

func GetOauthRedirectUrl(ctx *pulumi.Context) string

Required when `oauthRefreshToken` is used. Can also be sourced from `SNOWFLAKE_OAUTH_REDIRECT_URL` environment variable.

Deprecated: Use `token_accessor.0.redirect_uri` instead

func GetOauthRefreshToken deprecated

func GetOauthRefreshToken(ctx *pulumi.Context) string

Token for use with OAuth. Setup and generation of the token is left to other tools. Should be used in conjunction with `oauthClientId`, `oauthClientSecret`, `oauthEndpoint`, `oauthRedirectUrl`. Cannot be used with `browserAuth`, `privateKeyPath`, `oauthAccessToken` or `password`. Can also be sourced from `SNOWFLAKE_OAUTH_REFRESH_TOKEN` environment variable.

Deprecated: Use `token_accessor.0.refresh_token` instead

func GetOcspFailOpen added in v0.40.0

func GetOcspFailOpen(ctx *pulumi.Context) bool

True represents OCSP fail open mode. False represents OCSP fail closed mode. Fail open true by default. Can also be sourced from the `SNOWFLAKE_OCSP_FAIL_OPEN` environment variable.

func GetOktaUrl added in v0.38.0

func GetOktaUrl(ctx *pulumi.Context) string

The URL of the Okta server. e.g. https://example.okta.com. Can also be sourced from the `SNOWFLAKE_OKTA_URL` environment variable.

func GetParams added in v0.38.0

func GetParams(ctx *pulumi.Context) string

Sets other connection (i.e. session) parameters. [Parameters](https://docs.snowflake.com/en/sql-reference/parameters)

func GetPasscode added in v0.36.0

func GetPasscode(ctx *pulumi.Context) string

Specifies the passcode provided by Duo when using multi-factor authentication (MFA) for login. Can also be sourced from the `SNOWFLAKE_PASSCODE` environment variable.

func GetPasscodeInPassword added in v0.36.0

func GetPasscodeInPassword(ctx *pulumi.Context) bool

False by default. Set to true if the MFA passcode is embedded in the login password. Appends the MFA passcode to the end of the password. Can also be sourced from the `SNOWFLAKE_PASSCODE_IN_PASSWORD` environment variable.

func GetPassword

func GetPassword(ctx *pulumi.Context) string

Password for username+password auth. Cannot be used with `browserAuth` or `privateKeyPath`. Can also be sourced from the `SNOWFLAKE_PASSWORD` environment variable.

func GetPort added in v0.14.0

func GetPort(ctx *pulumi.Context) int

Support custom port values to snowflake go driver for use with privatelink. Can also be sourced from the `SNOWFLAKE_PORT` environment variable.

func GetPrivateKey

func GetPrivateKey(ctx *pulumi.Context) string

Private Key for username+private-key auth. Cannot be used with `browserAuth` or `password`. Can also be sourced from `SNOWFLAKE_PRIVATE_KEY` environment variable.

func GetPrivateKeyPassphrase added in v0.1.3

func GetPrivateKeyPassphrase(ctx *pulumi.Context) string

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. Can also be sourced from `SNOWFLAKE_PRIVATE_KEY_PASSPHRASE` environment variable.

func GetPrivateKeyPath deprecated

func GetPrivateKeyPath(ctx *pulumi.Context) string

Path to a private key for using keypair authentication. Cannot be used with `browserAuth`, `oauthAccessToken` or `password`. Can also be sourced from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable.

Deprecated: use the [file Function](https://developer.hashicorp.com/terraform/language/functions/file) instead

func GetProfile added in v0.25.0

func GetProfile(ctx *pulumi.Context) string

Sets the profile to read from ~/.snowflake/config file. Can also be sourced from the `SNOWFLAKE_PROFILE` environment variable.

func GetProtocol added in v0.14.0

func GetProtocol(ctx *pulumi.Context) string

Either http or https, defaults to https. Can also be sourced from the `SNOWFLAKE_PROTOCOL` environment variable.

func GetRegion deprecated

func GetRegion(ctx *pulumi.Context) string

Snowflake region, such as "eu-central-1", with this parameter. However, since this parameter is deprecated, it is best to specify the region as part of the account parameter. For details, see the description of the account parameter. [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Required if using the [legacy format for the `account` identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#format-2-legacy-account-locator-in-a-region) in the form of `<cloud_region_id>.<cloud>`. Can also be sourced from the `SNOWFLAKE_REGION` environment variable.

Deprecated: Specify the region as part of the account parameter

func GetRequestTimeout added in v0.38.0

func GetRequestTimeout(ctx *pulumi.Context) int

request retry timeout EXCLUDING network roundtrip and read out http response. Can also be sourced from the `SNOWFLAKE_REQUEST_TIMEOUT` environment variable.

func GetRole

func GetRole(ctx *pulumi.Context) string

Specifies the role to use by default for accessing Snowflake objects in the client session. Can also be sourced from the `SNOWFLAKE_ROLE` environment variable. .

func GetSessionParams deprecated added in v0.29.0

func GetSessionParams(ctx *pulumi.Context) string

Sets session parameters. [Parameters](https://docs.snowflake.com/en/sql-reference/parameters)

Deprecated: Use `params` instead

func GetToken added in v0.38.0

func GetToken(ctx *pulumi.Context) string

Token to use for OAuth and other forms of token based auth. Can also be sourced from the `SNOWFLAKE_TOKEN` environment variable.

func GetTokenAccessor added in v0.38.0

func GetTokenAccessor(ctx *pulumi.Context) string

func GetUser added in v0.38.0

func GetUser(ctx *pulumi.Context) string

Username. Can also be sourced from the `SNOWFLAKE_USER` environment variable. Required unless using `profile`.

func GetUsername deprecated

func GetUsername(ctx *pulumi.Context) string

Username for username+password authentication. Can also be sourced from the `SNOWFLAKE_USERNAME` environment variable. Required unless using `profile`.

Deprecated: Use `user` instead of `username`

func GetValidateDefaultParameters added in v0.38.0

func GetValidateDefaultParameters(ctx *pulumi.Context) bool

True by default. If false, disables the validation checks for Database, Schema, Warehouse and Role at the time a connection is established. Can also be sourced from the `SNOWFLAKE_VALIDATE_DEFAULT_PARAMETERS` environment variable.

func GetWarehouse added in v0.11.0

func GetWarehouse(ctx *pulumi.Context) string

Specifies the virtual warehouse to use by default for queries, loading, etc. in the client session. Can also be sourced from the `SNOWFLAKE_WAREHOUSE` environment variable.

Types

type TokenAccessor added in v0.38.0

type TokenAccessor struct {
	// The client ID for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_ID` environment variable.
	ClientId string `pulumi:"clientId"`
	// The client secret for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_SECRET` environment variable.
	ClientSecret string `pulumi:"clientSecret"`
	// The redirect URI for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REDIRECT_URI` environment variable.
	RedirectUri string `pulumi:"redirectUri"`
	// The refresh token for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REFRESH_TOKEN` environment variable.
	RefreshToken string `pulumi:"refreshToken"`
	// The token endpoint for the OAuth provider e.g. https://{yourDomain}/oauth/token when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_TOKEN_ENDPOINT` environment variable.
	TokenEndpoint string `pulumi:"tokenEndpoint"`
}

type TokenAccessorArgs added in v0.38.0

type TokenAccessorArgs struct {
	// The client ID for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_ID` environment variable.
	ClientId pulumi.StringInput `pulumi:"clientId"`
	// The client secret for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_SECRET` environment variable.
	ClientSecret pulumi.StringInput `pulumi:"clientSecret"`
	// The redirect URI for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REDIRECT_URI` environment variable.
	RedirectUri pulumi.StringInput `pulumi:"redirectUri"`
	// The refresh token for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REFRESH_TOKEN` environment variable.
	RefreshToken pulumi.StringInput `pulumi:"refreshToken"`
	// The token endpoint for the OAuth provider e.g. https://{yourDomain}/oauth/token when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_TOKEN_ENDPOINT` environment variable.
	TokenEndpoint pulumi.StringInput `pulumi:"tokenEndpoint"`
}

func (TokenAccessorArgs) ElementType added in v0.38.0

func (TokenAccessorArgs) ElementType() reflect.Type

func (TokenAccessorArgs) ToTokenAccessorOutput added in v0.38.0

func (i TokenAccessorArgs) ToTokenAccessorOutput() TokenAccessorOutput

func (TokenAccessorArgs) ToTokenAccessorOutputWithContext added in v0.38.0

func (i TokenAccessorArgs) ToTokenAccessorOutputWithContext(ctx context.Context) TokenAccessorOutput

type TokenAccessorInput added in v0.38.0

type TokenAccessorInput interface {
	pulumi.Input

	ToTokenAccessorOutput() TokenAccessorOutput
	ToTokenAccessorOutputWithContext(context.Context) TokenAccessorOutput
}

TokenAccessorInput is an input type that accepts TokenAccessorArgs and TokenAccessorOutput values. You can construct a concrete instance of `TokenAccessorInput` via:

TokenAccessorArgs{...}

type TokenAccessorOutput added in v0.38.0

type TokenAccessorOutput struct{ *pulumi.OutputState }

func (TokenAccessorOutput) ClientId added in v0.38.0

The client ID for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_ID` environment variable.

func (TokenAccessorOutput) ClientSecret added in v0.38.0

func (o TokenAccessorOutput) ClientSecret() pulumi.StringOutput

The client secret for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_CLIENT_SECRET` environment variable.

func (TokenAccessorOutput) ElementType added in v0.38.0

func (TokenAccessorOutput) ElementType() reflect.Type

func (TokenAccessorOutput) RedirectUri added in v0.38.0

func (o TokenAccessorOutput) RedirectUri() pulumi.StringOutput

The redirect URI for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REDIRECT_URI` environment variable.

func (TokenAccessorOutput) RefreshToken added in v0.38.0

func (o TokenAccessorOutput) RefreshToken() pulumi.StringOutput

The refresh token for the OAuth provider when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_REFRESH_TOKEN` environment variable.

func (TokenAccessorOutput) ToTokenAccessorOutput added in v0.38.0

func (o TokenAccessorOutput) ToTokenAccessorOutput() TokenAccessorOutput

func (TokenAccessorOutput) ToTokenAccessorOutputWithContext added in v0.38.0

func (o TokenAccessorOutput) ToTokenAccessorOutputWithContext(ctx context.Context) TokenAccessorOutput

func (TokenAccessorOutput) TokenEndpoint added in v0.38.0

func (o TokenAccessorOutput) TokenEndpoint() pulumi.StringOutput

The token endpoint for the OAuth provider e.g. https://{yourDomain}/oauth/token when using a refresh token to renew access token. Can also be sourced from the `SNOWFLAKE_TOKEN_ACCESSOR_TOKEN_ENDPOINT` environment variable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL