Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Snowflake

v0.2.1 published on Monday, Sep 27, 2021 by Pulumi

User

Import

 $ pulumi import snowflake:index/user:User example userName

Example Usage

using Pulumi;
using Snowflake = Pulumi.Snowflake;

class MyStack : Stack
{
    public MyStack()
    {
        var user = new Snowflake.User("user", new Snowflake.UserArgs
        {
            Comment = "A user of snowflake.",
            DefaultRole = "role1",
            DefaultWarehouse = "warehouse",
            Disabled = false,
            DisplayName = "Snowflake User",
            Email = "user@snowflake.example",
            FirstName = "Snowflake",
            LastName = "User",
            LoginName = "snowflake_user",
            MustChangePassword = false,
            Password = "secret",
            RsaPublicKey = "...",
            RsaPublicKey2 = "...",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := snowflake.NewUser(ctx, "user", &snowflake.UserArgs{
			Comment:            pulumi.String("A user of snowflake."),
			DefaultRole:        pulumi.String("role1"),
			DefaultWarehouse:   pulumi.String("warehouse"),
			Disabled:           pulumi.Bool(false),
			DisplayName:        pulumi.String("Snowflake User"),
			Email:              pulumi.String("user@snowflake.example"),
			FirstName:          pulumi.String("Snowflake"),
			LastName:           pulumi.String("User"),
			LoginName:          pulumi.String("snowflake_user"),
			MustChangePassword: pulumi.Bool(false),
			Password:           pulumi.String("secret"),
			RsaPublicKey:       pulumi.String("..."),
			RsaPublicKey2:      pulumi.String("..."),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_snowflake as snowflake

user = snowflake.User("user",
    comment="A user of snowflake.",
    default_role="role1",
    default_warehouse="warehouse",
    disabled=False,
    display_name="Snowflake User",
    email="user@snowflake.example",
    first_name="Snowflake",
    last_name="User",
    login_name="snowflake_user",
    must_change_password=False,
    password="secret",
    rsa_public_key="...",
    rsa_public_key2="...")
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const user = new snowflake.User("user", {
    comment: "A user of snowflake.",
    defaultRole: "role1",
    defaultWarehouse: "warehouse",
    disabled: false,
    displayName: "Snowflake User",
    email: "user@snowflake.example",
    firstName: "Snowflake",
    lastName: "User",
    loginName: "snowflake_user",
    mustChangePassword: false,
    password: "secret",
    rsaPublicKey: "...",
    rsaPublicKey2: "...",
});

Create a User Resource

new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         comment: Optional[str] = None,
         default_namespace: Optional[str] = None,
         default_role: Optional[str] = None,
         default_warehouse: Optional[str] = None,
         disabled: Optional[bool] = None,
         display_name: Optional[str] = None,
         email: Optional[str] = None,
         first_name: Optional[str] = None,
         last_name: Optional[str] = None,
         login_name: Optional[str] = None,
         must_change_password: Optional[bool] = None,
         name: Optional[str] = None,
         password: Optional[str] = None,
         rsa_public_key: Optional[str] = None,
         rsa_public_key2: Optional[str] = None)
@overload
def User(resource_name: str,
         args: Optional[UserArgs] = None,
         opts: Optional[ResourceOptions] = None)
func NewUser(ctx *Context, name string, args *UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The User resource accepts the following input properties:

Comment string
DefaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
DefaultRole string
Specifies the role that is active by default for the user’s session upon login.
DefaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
Disabled bool
DisplayName string
Name displayed for the user in the Snowflake web interface.
Email string
Email address for the user.
FirstName string
First name of the user.
LastName string
Last name of the user.
LoginName string
The name users use to log in. If not supplied, snowflake will use name instead.
MustChangePassword bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
Name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
Password string
WARNING: this will put the password in the terraform state file. Use carefully.
RsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
RsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
Comment string
DefaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
DefaultRole string
Specifies the role that is active by default for the user’s session upon login.
DefaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
Disabled bool
DisplayName string
Name displayed for the user in the Snowflake web interface.
Email string
Email address for the user.
FirstName string
First name of the user.
LastName string
Last name of the user.
LoginName string
The name users use to log in. If not supplied, snowflake will use name instead.
MustChangePassword bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
Name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
Password string
WARNING: this will put the password in the terraform state file. Use carefully.
RsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
RsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
comment string
defaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
defaultRole string
Specifies the role that is active by default for the user’s session upon login.
defaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
disabled boolean
displayName string
Name displayed for the user in the Snowflake web interface.
email string
Email address for the user.
firstName string
First name of the user.
lastName string
Last name of the user.
loginName string
The name users use to log in. If not supplied, snowflake will use name instead.
mustChangePassword boolean
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
password string
WARNING: this will put the password in the terraform state file. Use carefully.
rsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
rsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
comment str
default_namespace str
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
default_role str
Specifies the role that is active by default for the user’s session upon login.
default_warehouse str
Specifies the virtual warehouse that is active by default for the user’s session upon login.
disabled bool
display_name str
Name displayed for the user in the Snowflake web interface.
email str
Email address for the user.
first_name str
First name of the user.
last_name str
Last name of the user.
login_name str
The name users use to log in. If not supplied, snowflake will use name instead.
must_change_password bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
name str
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
password str
WARNING: this will put the password in the terraform state file. Use carefully.
rsa_public_key str
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
rsa_public_key2 str
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

HasRsaPublicKey bool
Will be true if user as an RSA key set.
Id string
The provider-assigned unique ID for this managed resource.
HasRsaPublicKey bool
Will be true if user as an RSA key set.
Id string
The provider-assigned unique ID for this managed resource.
hasRsaPublicKey boolean
Will be true if user as an RSA key set.
id string
The provider-assigned unique ID for this managed resource.
has_rsa_public_key bool
Will be true if user as an RSA key set.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        comment: Optional[str] = None,
        default_namespace: Optional[str] = None,
        default_role: Optional[str] = None,
        default_warehouse: Optional[str] = None,
        disabled: Optional[bool] = None,
        display_name: Optional[str] = None,
        email: Optional[str] = None,
        first_name: Optional[str] = None,
        has_rsa_public_key: Optional[bool] = None,
        last_name: Optional[str] = None,
        login_name: Optional[str] = None,
        must_change_password: Optional[bool] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        rsa_public_key: Optional[str] = None,
        rsa_public_key2: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Comment string
DefaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
DefaultRole string
Specifies the role that is active by default for the user’s session upon login.
DefaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
Disabled bool
DisplayName string
Name displayed for the user in the Snowflake web interface.
Email string
Email address for the user.
FirstName string
First name of the user.
HasRsaPublicKey bool
Will be true if user as an RSA key set.
LastName string
Last name of the user.
LoginName string
The name users use to log in. If not supplied, snowflake will use name instead.
MustChangePassword bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
Name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
Password string
WARNING: this will put the password in the terraform state file. Use carefully.
RsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
RsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
Comment string
DefaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
DefaultRole string
Specifies the role that is active by default for the user’s session upon login.
DefaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
Disabled bool
DisplayName string
Name displayed for the user in the Snowflake web interface.
Email string
Email address for the user.
FirstName string
First name of the user.
HasRsaPublicKey bool
Will be true if user as an RSA key set.
LastName string
Last name of the user.
LoginName string
The name users use to log in. If not supplied, snowflake will use name instead.
MustChangePassword bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
Name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
Password string
WARNING: this will put the password in the terraform state file. Use carefully.
RsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
RsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
comment string
defaultNamespace string
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
defaultRole string
Specifies the role that is active by default for the user’s session upon login.
defaultWarehouse string
Specifies the virtual warehouse that is active by default for the user’s session upon login.
disabled boolean
displayName string
Name displayed for the user in the Snowflake web interface.
email string
Email address for the user.
firstName string
First name of the user.
hasRsaPublicKey boolean
Will be true if user as an RSA key set.
lastName string
Last name of the user.
loginName string
The name users use to log in. If not supplied, snowflake will use name instead.
mustChangePassword boolean
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
name string
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
password string
WARNING: this will put the password in the terraform state file. Use carefully.
rsaPublicKey string
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
rsaPublicKey2 string
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.
comment str
default_namespace str
Specifies the namespace (database only or database and schema) that is active by default for the user’s session upon login.
default_role str
Specifies the role that is active by default for the user’s session upon login.
default_warehouse str
Specifies the virtual warehouse that is active by default for the user’s session upon login.
disabled bool
display_name str
Name displayed for the user in the Snowflake web interface.
email str
Email address for the user.
first_name str
First name of the user.
has_rsa_public_key bool
Will be true if user as an RSA key set.
last_name str
Last name of the user.
login_name str
The name users use to log in. If not supplied, snowflake will use name instead.
must_change_password bool
Specifies whether the user is forced to change their password on next login (including their first/initial login) into the system.
name str
Name of the user. Note that if you do not supply loginname this will be used as loginname. doc
password str
WARNING: this will put the password in the terraform state file. Use carefully.
rsa_public_key str
Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer.
rsa_public_key2 str
Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer.

Package Details

Repository
https://github.com/pulumi/pulumi-snowflake
License
Apache-2.0
Notes
This Pulumi package is based on the snowflake Terraform Provider.