diff --git a/dist/snowflake_resources/external_table.d.ts b/dist/snowflake_resources/external_table.d.ts index b1540ac..6d4c21a 100644 --- a/dist/snowflake_resources/external_table.d.ts +++ b/dist/snowflake_resources/external_table.d.ts @@ -25,6 +25,7 @@ export interface External_TableConfig extends TerraformMetaArguments { partition_by?: string[]; pattern?: string; refresh_on_create?: boolean; + table_format?: string; tag?: External_Table_Tag[]; } export declare class External_Table extends TerraformResource { @@ -41,6 +42,7 @@ export declare class External_Table extends TerraformResource { _partition_by?: string[]; _pattern?: string; _refresh_on_create?: boolean; + _table_format?: string; _tag?: External_Table_Tag[]; readonly _id: string; constructor(scope: Construct, id: string, config: External_TableConfig); @@ -75,6 +77,8 @@ export declare class External_Table extends TerraformResource { set pattern(value: string | undefined); get refresh_on_create(): boolean | undefined; set refresh_on_create(value: boolean | undefined); + get table_format(): string | undefined; + set table_format(value: string | undefined); get tag(): External_Table_Tag[] | undefined; set tag(value: External_Table_Tag[] | undefined); } diff --git a/dist/snowflake_resources/external_table.js b/dist/snowflake_resources/external_table.js index 60f8007..1f59d49 100644 --- a/dist/snowflake_resources/external_table.js +++ b/dist/snowflake_resources/external_table.js @@ -19,6 +19,7 @@ class External_Table extends cdktf_1.TerraformResource { _partition_by; _pattern; _refresh_on_create; + _table_format; _tag; _id; constructor(scope, id, config) { @@ -46,6 +47,7 @@ class External_Table extends cdktf_1.TerraformResource { this._partition_by = config.partition_by; this._pattern = config.pattern; this._refresh_on_create = config.refresh_on_create; + this._table_format = config.table_format; this._tag = config.tag; } getAttributes() { @@ -63,6 +65,7 @@ class External_Table extends cdktf_1.TerraformResource { partition_by: this._partition_by, pattern: this._pattern, refresh_on_create: this._refresh_on_create, + table_format: this._table_format, tag: this._tag, }; } @@ -150,6 +153,12 @@ class External_Table extends cdktf_1.TerraformResource { set refresh_on_create(value) { this._refresh_on_create = value; } + get table_format() { + return this._table_format; + } + set table_format(value) { + this._table_format = value; + } get tag() { return this._tag; } diff --git a/dist/snowflake_resources/grant_privileges_to_database_role.d.ts b/dist/snowflake_resources/grant_privileges_to_database_role.d.ts new file mode 100644 index 0000000..e5a479d --- /dev/null +++ b/dist/snowflake_resources/grant_privileges_to_database_role.d.ts @@ -0,0 +1,68 @@ +import { TerraformMetaArguments, TerraformResource } from "cdktf"; +import { Construct } from "constructs"; +export interface Grant_Privileges_To_Database_Role_On_Schema { + readonly all_schemas_in_database?: string; + readonly future_schemas_in_database?: string; + readonly schema_name?: string; +} +export interface Grant_Privileges_To_Database_Role_On_Schema_Object { + readonly all?: { + readonly object_type_plural: string; + readonly in_database?: string; + readonly in_schema?: string; + }; + readonly future?: { + readonly object_type_plural: string; + readonly in_database?: string; + readonly in_schema?: string; + }; + readonly object_name?: string; + readonly object_type?: string; +} +export interface Grant_Privileges_To_Database_RoleConfig extends TerraformMetaArguments { + database_role_name: string; + all_privileges?: boolean; + always_apply?: boolean; + always_apply_trigger?: string; + on_database?: string; + on_schema?: Grant_Privileges_To_Database_Role_On_Schema[]; + on_schema_object?: Grant_Privileges_To_Database_Role_On_Schema_Object[]; + privileges?: Set; + with_grant_option?: boolean; +} +export declare class Grant_Privileges_To_Database_Role extends TerraformResource { + _database_role_name: string; + _all_privileges?: boolean; + _always_apply?: boolean; + _always_apply_trigger?: string; + _on_database?: string; + _on_schema?: Grant_Privileges_To_Database_Role_On_Schema[]; + _on_schema_object?: Grant_Privileges_To_Database_Role_On_Schema_Object[]; + _privileges?: Set; + _with_grant_option?: boolean; + readonly _id: string; + constructor(scope: Construct, id: string, config: Grant_Privileges_To_Database_RoleConfig); + getAttributes(): { + [name: string]: any; + }; + get id(): string; + ref(attribute: string): string; + get database_role_name(): string; + set database_role_name(value: string); + get all_privileges(): boolean | undefined; + set all_privileges(value: boolean | undefined); + get always_apply(): boolean | undefined; + set always_apply(value: boolean | undefined); + get always_apply_trigger(): string | undefined; + set always_apply_trigger(value: string | undefined); + get on_database(): string | undefined; + set on_database(value: string | undefined); + get on_schema(): Grant_Privileges_To_Database_Role_On_Schema[] | undefined; + set on_schema(value: Grant_Privileges_To_Database_Role_On_Schema[] | undefined); + get on_schema_object(): Grant_Privileges_To_Database_Role_On_Schema_Object[] | undefined; + set on_schema_object(value: Grant_Privileges_To_Database_Role_On_Schema_Object[] | undefined); + get privileges(): Set | undefined; + set privileges(value: Set | undefined); + get with_grant_option(): boolean | undefined; + set with_grant_option(value: boolean | undefined); +} diff --git a/dist/snowflake_resources/grant_privileges_to_database_role.js b/dist/snowflake_resources/grant_privileges_to_database_role.js new file mode 100644 index 0000000..85e528a --- /dev/null +++ b/dist/snowflake_resources/grant_privileges_to_database_role.js @@ -0,0 +1,115 @@ +"use strict"; +/* +DO NOT EDIT - Generated by main.js. Refer to the README for more info. +*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Grant_Privileges_To_Database_Role = void 0; +const cdktf_1 = require("cdktf"); +class Grant_Privileges_To_Database_Role extends cdktf_1.TerraformResource { + _database_role_name; + _all_privileges; + _always_apply; + _always_apply_trigger; + _on_database; + _on_schema; + _on_schema_object; + _privileges; + _with_grant_option; + _id; + constructor(scope, id, config) { + super(scope, id, { + terraformResourceType: "snowflake_grant_privileges_to_database_role", + terraformGeneratorMetadata: { + providerName: "snowflake" + }, + provider: config.provider, + dependsOn: config.dependsOn, + count: config.count, + lifecycle: config.lifecycle + }); + this._id = id; + this._database_role_name = config.database_role_name; + this._all_privileges = config.all_privileges; + this._always_apply = config.always_apply; + this._always_apply_trigger = config.always_apply_trigger; + this._on_database = config.on_database; + this._on_schema = config.on_schema; + this._on_schema_object = config.on_schema_object; + this._privileges = config.privileges; + this._with_grant_option = config.with_grant_option; + } + getAttributes() { + return { + database_role_name: this._database_role_name, + all_privileges: this._all_privileges, + always_apply: this._always_apply, + always_apply_trigger: this._always_apply_trigger, + on_database: this._on_database, + on_schema: this._on_schema, + on_schema_object: this._on_schema_object, + privileges: this._privileges, + with_grant_option: this._with_grant_option, + }; + } + get id() { + return this._id; + } + ref(attribute) { + return `\${snowflake_grant_privileges_to_database_role.${this.friendlyUniqueId}.${attribute}}`; + } + get database_role_name() { + return this._database_role_name; + } + set database_role_name(value) { + this._database_role_name = value; + } + get all_privileges() { + return this._all_privileges; + } + set all_privileges(value) { + this._all_privileges = value; + } + get always_apply() { + return this._always_apply; + } + set always_apply(value) { + this._always_apply = value; + } + get always_apply_trigger() { + return this._always_apply_trigger; + } + set always_apply_trigger(value) { + this._always_apply_trigger = value; + } + get on_database() { + return this._on_database; + } + set on_database(value) { + this._on_database = value; + } + get on_schema() { + return this._on_schema; + } + set on_schema(value) { + this._on_schema = value; + } + get on_schema_object() { + return this._on_schema_object; + } + set on_schema_object(value) { + this._on_schema_object = value; + } + get privileges() { + return this._privileges; + } + set privileges(value) { + this._privileges = value; + } + get with_grant_option() { + return this._with_grant_option; + } + set with_grant_option(value) { + this._with_grant_option = value; + } +} +exports.Grant_Privileges_To_Database_Role = Grant_Privileges_To_Database_Role; diff --git a/dist/snowflake_resources/index.d.ts b/dist/snowflake_resources/index.d.ts index ed40cb3..df3e334 100644 --- a/dist/snowflake_resources/index.d.ts +++ b/dist/snowflake_resources/index.d.ts @@ -19,6 +19,7 @@ export * from "./file_format"; export * from "./file_format_grant"; export * from "./function"; export * from "./function_grant"; +export * from "./grant_privileges_to_database_role"; export * from "./grant_privileges_to_role"; export * from "./integration_grant"; export * from "./managed_account"; diff --git a/dist/snowflake_resources/index.js b/dist/snowflake_resources/index.js index 4d695b7..c4707e6 100644 --- a/dist/snowflake_resources/index.js +++ b/dist/snowflake_resources/index.js @@ -38,6 +38,7 @@ __exportStar(require("./file_format"), exports); __exportStar(require("./file_format_grant"), exports); __exportStar(require("./function"), exports); __exportStar(require("./function_grant"), exports); +__exportStar(require("./grant_privileges_to_database_role"), exports); __exportStar(require("./grant_privileges_to_role"), exports); __exportStar(require("./integration_grant"), exports); __exportStar(require("./managed_account"), exports); diff --git a/dist/snowflake_resources/snowflake_provider.js b/dist/snowflake_resources/snowflake_provider.js index 7953cfb..c89f71a 100644 --- a/dist/snowflake_resources/snowflake_provider.js +++ b/dist/snowflake_resources/snowflake_provider.js @@ -20,7 +20,7 @@ class SnowflakeProvider extends cdktf_1.TerraformProvider { terraformResourceType: "snowflake", terraformGeneratorMetadata: { providerName: "snowflake", - providerVersionConstraint: "0.82.0" + providerVersionConstraint: "0.83.1" }, terraformProviderSource: "terraform-cdk-provider-snowflake" }); diff --git a/src/snowflake_resources/external_table.ts b/src/snowflake_resources/external_table.ts index 26a2aea..567a277 100644 --- a/src/snowflake_resources/external_table.ts +++ b/src/snowflake_resources/external_table.ts @@ -31,6 +31,7 @@ export interface External_TableConfig extends TerraformMetaArguments { partition_by?: string[]; pattern?: string; refresh_on_create?: boolean; + table_format?: string; tag?: External_Table_Tag[]; } @@ -48,6 +49,7 @@ export class External_Table extends TerraformResource { _partition_by?: string[]; _pattern?: string; _refresh_on_create?: boolean; + _table_format?: string; _tag?: External_Table_Tag[]; readonly _id: string; @@ -90,6 +92,8 @@ export class External_Table extends TerraformResource { this._refresh_on_create = config.refresh_on_create; + this._table_format = config.table_format; + this._tag = config.tag; } public getAttributes(): { [name: string]: any } { @@ -107,6 +111,7 @@ export class External_Table extends TerraformResource { partition_by: this._partition_by, pattern: this._pattern, refresh_on_create: this._refresh_on_create, + table_format: this._table_format, tag: this._tag, } } @@ -223,6 +228,14 @@ export class External_Table extends TerraformResource { this._refresh_on_create = value; } + public get table_format(): string | undefined { + return this._table_format + } + + public set table_format(value: string | undefined) { + this._table_format = value; + } + public get tag(): External_Table_Tag[] | undefined { return this._tag } diff --git a/src/snowflake_resources/grant_privileges_to_database_role.ts b/src/snowflake_resources/grant_privileges_to_database_role.ts new file mode 100644 index 0000000..bac62ca --- /dev/null +++ b/src/snowflake_resources/grant_privileges_to_database_role.ts @@ -0,0 +1,171 @@ +/* +DO NOT EDIT - Generated by main.js. Refer to the README for more info. +*/ + +import { TerraformMetaArguments, TerraformResource } from "cdktf"; +import { Construct } from "constructs"; + + export interface Grant_Privileges_To_Database_Role_On_Schema { + readonly all_schemas_in_database?: string; + readonly future_schemas_in_database?: string; + readonly schema_name?: string; + } + export interface Grant_Privileges_To_Database_Role_On_Schema_Object { + readonly all?: {readonly object_type_plural: string; readonly in_database?: string; readonly in_schema?: string; }; + readonly future?: {readonly object_type_plural: string; readonly in_database?: string; +readonly in_schema?: string; }; + readonly object_name?: string; + readonly object_type?: string; + } + +export interface Grant_Privileges_To_Database_RoleConfig extends TerraformMetaArguments { + database_role_name: string; + all_privileges?: boolean; + always_apply?: boolean; + always_apply_trigger?: string; + on_database?: string; + on_schema?: Grant_Privileges_To_Database_Role_On_Schema[]; + on_schema_object?: Grant_Privileges_To_Database_Role_On_Schema_Object[]; + privileges?: Set; + with_grant_option?: boolean; +} + +export class Grant_Privileges_To_Database_Role extends TerraformResource { + _database_role_name: string; + _all_privileges?: boolean; + _always_apply?: boolean; + _always_apply_trigger?: string; + _on_database?: string; + _on_schema?: Grant_Privileges_To_Database_Role_On_Schema[]; + _on_schema_object?: Grant_Privileges_To_Database_Role_On_Schema_Object[]; + _privileges?: Set; + _with_grant_option?: boolean; + readonly _id: string; + + public constructor(scope: Construct, id: string, config: Grant_Privileges_To_Database_RoleConfig) { + super(scope, id, { + terraformResourceType: "snowflake_grant_privileges_to_database_role", + terraformGeneratorMetadata: { + providerName: "snowflake" + }, + provider: config.provider, + dependsOn: config.dependsOn, + count: config.count, + lifecycle: config.lifecycle + }); + this._id = id; + + this._database_role_name = config.database_role_name; + + this._all_privileges = config.all_privileges; + + this._always_apply = config.always_apply; + + this._always_apply_trigger = config.always_apply_trigger; + + this._on_database = config.on_database; + + this._on_schema = config.on_schema; + + this._on_schema_object = config.on_schema_object; + + this._privileges = config.privileges; + + this._with_grant_option = config.with_grant_option; + } + public getAttributes(): { [name: string]: any } { + return { + database_role_name: this._database_role_name, + all_privileges: this._all_privileges, + always_apply: this._always_apply, + always_apply_trigger: this._always_apply_trigger, + on_database: this._on_database, + on_schema: this._on_schema, + on_schema_object: this._on_schema_object, + privileges: this._privileges, + with_grant_option: this._with_grant_option, + } + } + + public get id(): string { + return this._id; + } + + public ref(attribute: string): string { + return `\${snowflake_grant_privileges_to_database_role.${this.friendlyUniqueId}.${attribute}}`; + } + + public get database_role_name(): string { + return this._database_role_name + } + + public set database_role_name(value: string) { + this._database_role_name = value; + } + + public get all_privileges(): boolean | undefined { + return this._all_privileges + } + + public set all_privileges(value: boolean | undefined) { + this._all_privileges = value; + } + + public get always_apply(): boolean | undefined { + return this._always_apply + } + + public set always_apply(value: boolean | undefined) { + this._always_apply = value; + } + + public get always_apply_trigger(): string | undefined { + return this._always_apply_trigger + } + + public set always_apply_trigger(value: string | undefined) { + this._always_apply_trigger = value; + } + + public get on_database(): string | undefined { + return this._on_database + } + + public set on_database(value: string | undefined) { + this._on_database = value; + } + + public get on_schema(): Grant_Privileges_To_Database_Role_On_Schema[] | undefined { + return this._on_schema + } + + public set on_schema(value: Grant_Privileges_To_Database_Role_On_Schema[] | undefined) { + this._on_schema = value; + } + + public get on_schema_object(): Grant_Privileges_To_Database_Role_On_Schema_Object[] | undefined { + return this._on_schema_object + } + + public set on_schema_object(value: Grant_Privileges_To_Database_Role_On_Schema_Object[] | undefined) { + this._on_schema_object = value; + } + + public get privileges(): Set | undefined { + return this._privileges + } + + public set privileges(value: Set | undefined) { + this._privileges = value; + } + + public get with_grant_option(): boolean | undefined { + return this._with_grant_option + } + + public set with_grant_option(value: boolean | undefined) { + this._with_grant_option = value; + } + +} + diff --git a/src/snowflake_resources/index.ts b/src/snowflake_resources/index.ts index 37b4139..400466c 100644 --- a/src/snowflake_resources/index.ts +++ b/src/snowflake_resources/index.ts @@ -23,6 +23,7 @@ export * from "./file_format"; export * from "./file_format_grant"; export * from "./function"; export * from "./function_grant"; +export * from "./grant_privileges_to_database_role"; export * from "./grant_privileges_to_role"; export * from "./integration_grant"; export * from "./managed_account"; diff --git a/src/snowflake_resources/snowflake_provider.ts b/src/snowflake_resources/snowflake_provider.ts index c739bc7..88e504e 100644 --- a/src/snowflake_resources/snowflake_provider.ts +++ b/src/snowflake_resources/snowflake_provider.ts @@ -33,7 +33,7 @@ export class SnowflakeProvider extends TerraformProvider { terraformResourceType: "snowflake", terraformGeneratorMetadata: { providerName: "snowflake", - providerVersionConstraint: "0.82.0" + providerVersionConstraint: "0.83.1" }, terraformProviderSource: "terraform-cdk-provider-snowflake" }) diff --git a/terraform-provider-snowflake b/terraform-provider-snowflake index b1a740a..9e6ae30 160000 --- a/terraform-provider-snowflake +++ b/terraform-provider-snowflake @@ -1 +1 @@ -Subproject commit b1a740ab29ff8be45de3ab416a01d0cad468d51d +Subproject commit 9e6ae307dcc1eaf31fc003616efeea1a3843da30 diff --git a/tools/snowflake_resources.json b/tools/snowflake_resources.json index 96fb505..36f6f2b 100644 --- a/tools/snowflake_resources.json +++ b/tools/snowflake_resources.json @@ -718,6 +718,11 @@ "type": "boolean", "required": false }, + { + "name": "table_format", + "type": "string", + "required": false + }, { "name": "tag", "type": "External_Table_Tag[]", @@ -1287,6 +1292,77 @@ } ] }, + { + "name": "Grant_Privileges_To_Database_Role", + "additional_types": [ + [ + { + "name": "Grant_Privileges_To_Database_Role_On_Schema", + "properties": [ + "readonly all_schemas_in_database?: string;", + "readonly future_schemas_in_database?: string;", + "readonly schema_name?: string;" + ] + }, + { + "name": "Grant_Privileges_To_Database_Role_On_Schema_Object", + "properties": [ + "readonly all?: {readonly object_type_plural: string; readonly in_database?: string; readonly in_schema?: string; };", + "readonly future?: {readonly object_type_plural: string; readonly in_database?: string; \nreadonly in_schema?: string; };", + "readonly object_name?: string;", + "readonly object_type?: string;" + ] + } + ] + ], + "properties": [ + { + "name": "database_role_name", + "type": "string", + "required": true + }, + { + "name": "all_privileges", + "type": "boolean", + "required": false + }, + { + "name": "always_apply", + "type": "boolean", + "required": false + }, + { + "name": "always_apply_trigger", + "type": "string", + "required": false + }, + { + "name": "on_database", + "type": "string", + "required": false + }, + { + "name": "on_schema", + "type": "Grant_Privileges_To_Database_Role_On_Schema[]", + "required": false + }, + { + "name": "on_schema_object", + "type": "Grant_Privileges_To_Database_Role_On_Schema_Object[]", + "required": false + }, + { + "name": "privileges", + "type": "Set", + "required": false + }, + { + "name": "with_grant_option", + "type": "boolean", + "required": false + } + ] + }, { "name": "Grant_Privileges_To_Role", "additional_types": [