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

Snowflake

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

WarehouseGrant

Import

format is warehouse name | | | privilege | true/false for with_grant_option

 $ pulumi import snowflake:index/warehouseGrant:WarehouseGrant example 'warehouseName|||MODIFY|true'

Example Usage

using Pulumi;
using Snowflake = Pulumi.Snowflake;

class MyStack : Stack
{
    public MyStack()
    {
        var grant = new Snowflake.WarehouseGrant("grant", new Snowflake.WarehouseGrantArgs
        {
            Privilege = "MODIFY",
            Roles = 
            {
                "role1",
            },
            WarehouseName = "wh",
            WithGrantOption = false,
        });
    }

}
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.NewWarehouseGrant(ctx, "grant", &snowflake.WarehouseGrantArgs{
			Privilege: pulumi.String("MODIFY"),
			Roles: pulumi.StringArray{
				pulumi.String("role1"),
			},
			WarehouseName:   pulumi.String("wh"),
			WithGrantOption: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_snowflake as snowflake

grant = snowflake.WarehouseGrant("grant",
    privilege="MODIFY",
    roles=["role1"],
    warehouse_name="wh",
    with_grant_option=False)
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";

const grant = new snowflake.WarehouseGrant("grant", {
    privilege: "MODIFY",
    roles: ["role1"],
    warehouseName: "wh",
    withGrantOption: false,
});

Create a WarehouseGrant Resource

new WarehouseGrant(name: string, args: WarehouseGrantArgs, opts?: CustomResourceOptions);
@overload
def WarehouseGrant(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   privilege: Optional[str] = None,
                   roles: Optional[Sequence[str]] = None,
                   warehouse_name: Optional[str] = None,
                   with_grant_option: Optional[bool] = None)
@overload
def WarehouseGrant(resource_name: str,
                   args: WarehouseGrantArgs,
                   opts: Optional[ResourceOptions] = None)
func NewWarehouseGrant(ctx *Context, name string, args WarehouseGrantArgs, opts ...ResourceOption) (*WarehouseGrant, error)
public WarehouseGrant(string name, WarehouseGrantArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args WarehouseGrantArgs
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 WarehouseGrantArgs
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 WarehouseGrantArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WarehouseGrantArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

WarehouseGrant 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 WarehouseGrant resource accepts the following input properties:

WarehouseName string
The name of the warehouse on which to grant privileges.
Privilege string
The privilege to grant on the warehouse.
Roles List<string>
Grants privilege to these roles.
WithGrantOption bool
When this is set to true, allows the recipient role to grant the privileges to other roles.
WarehouseName string
The name of the warehouse on which to grant privileges.
Privilege string
The privilege to grant on the warehouse.
Roles []string
Grants privilege to these roles.
WithGrantOption bool
When this is set to true, allows the recipient role to grant the privileges to other roles.
warehouseName string
The name of the warehouse on which to grant privileges.
privilege string
The privilege to grant on the warehouse.
roles string[]
Grants privilege to these roles.
withGrantOption boolean
When this is set to true, allows the recipient role to grant the privileges to other roles.
warehouse_name str
The name of the warehouse on which to grant privileges.
privilege str
The privilege to grant on the warehouse.
roles Sequence[str]
Grants privilege to these roles.
with_grant_option bool
When this is set to true, allows the recipient role to grant the privileges to other roles.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing WarehouseGrant Resource

Get an existing WarehouseGrant 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?: WarehouseGrantState, opts?: CustomResourceOptions): WarehouseGrant
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        privilege: Optional[str] = None,
        roles: Optional[Sequence[str]] = None,
        warehouse_name: Optional[str] = None,
        with_grant_option: Optional[bool] = None) -> WarehouseGrant
func GetWarehouseGrant(ctx *Context, name string, id IDInput, state *WarehouseGrantState, opts ...ResourceOption) (*WarehouseGrant, error)
public static WarehouseGrant Get(string name, Input<string> id, WarehouseGrantState? 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:

Privilege string
The privilege to grant on the warehouse.
Roles List<string>
Grants privilege to these roles.
WarehouseName string
The name of the warehouse on which to grant privileges.
WithGrantOption bool
When this is set to true, allows the recipient role to grant the privileges to other roles.
Privilege string
The privilege to grant on the warehouse.
Roles []string
Grants privilege to these roles.
WarehouseName string
The name of the warehouse on which to grant privileges.
WithGrantOption bool
When this is set to true, allows the recipient role to grant the privileges to other roles.
privilege string
The privilege to grant on the warehouse.
roles string[]
Grants privilege to these roles.
warehouseName string
The name of the warehouse on which to grant privileges.
withGrantOption boolean
When this is set to true, allows the recipient role to grant the privileges to other roles.
privilege str
The privilege to grant on the warehouse.
roles Sequence[str]
Grants privilege to these roles.
warehouse_name str
The name of the warehouse on which to grant privileges.
with_grant_option bool
When this is set to true, allows the recipient role to grant the privileges to other roles.

Package Details

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