createRole

Last updated: January 27, 2026

Creates a new role in Snowflake. Roles are named entities to which privileges can be granted and are used to control access to database objects.

Note: Automatic rollback drops the role.

Note: This change type does not support database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

roleName

String

Name of the role to create

Yes

replaceIfExists

Boolean

Replace the role if it exists using OR REPLACE*

No

ifNotExists

Boolean

Only create if the role doesn't exist using IF NOT EXISTS*

No

comment

String

Comment describing the role

No

tags

Nested

Key-value pairs of tags to apply

No

* replaceIfExists and ifNotExists are mutually exclusive

tags attributes

Key-value pairs of tags to apply to the role. Tags must exist before use.

Attribute

Type

Description

Required

key

String

Tag name

Yes

value

String

Tag value

Yes

loading

loading

loading

loading