diff --git a/provider/cmd/pulumi-resource-snowflake/schema.json b/provider/cmd/pulumi-resource-snowflake/schema.json index 7384f31e..16675250 100644 --- a/provider/cmd/pulumi-resource-snowflake/schema.json +++ b/provider/cmd/pulumi-resource-snowflake/schema.json @@ -97,6 +97,10 @@ "description": "Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from\n`SNOWFLAKE_PASSWORD` environment variable.\n", "secret": true }, + "port": { + "type": "integer", + "description": "Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT`\nenvironment variable.\n" + }, "privateKey": { "type": "string", "description": "Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from\n`SNOWFLAKE_PRIVATE_KEY` environment variable.\n", @@ -112,6 +116,10 @@ "description": "Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or\n`password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable.\n", "secret": true }, + "protocol": { + "type": "string", + "description": "Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable.\n" + }, "region": { "type": "string", "description": "[Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the\n`SNOWFLAKE_REGION` environment variable.\n" @@ -126,7 +134,7 @@ }, "warehouse": { "type": "string", - "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable.\n" + "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable.\n" } }, "defaults": [ @@ -2337,6 +2345,10 @@ "description": "Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from\n`SNOWFLAKE_PASSWORD` environment variable.\n", "secret": true }, + "port": { + "type": "integer", + "description": "Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT`\nenvironment variable.\n" + }, "privateKey": { "type": "string", "description": "Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from\n`SNOWFLAKE_PRIVATE_KEY` environment variable.\n", @@ -2352,6 +2364,10 @@ "description": "Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or\n`password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable.\n", "secret": true }, + "protocol": { + "type": "string", + "description": "Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable.\n" + }, "region": { "type": "string", "description": "[Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the\n`SNOWFLAKE_REGION` environment variable.\n" @@ -2366,7 +2382,7 @@ }, "warehouse": { "type": "string", - "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable.\n" + "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable.\n" } }, "required": [ @@ -2422,6 +2438,10 @@ "description": "Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from\n`SNOWFLAKE_PASSWORD` environment variable.\n", "secret": true }, + "port": { + "type": "integer", + "description": "Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT`\nenvironment variable.\n" + }, "privateKey": { "type": "string", "description": "Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from\n`SNOWFLAKE_PRIVATE_KEY` environment variable.\n", @@ -2437,6 +2457,10 @@ "description": "Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or\n`password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable.\n", "secret": true }, + "protocol": { + "type": "string", + "description": "Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable.\n" + }, "region": { "type": "string", "description": "[Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the\n`SNOWFLAKE_REGION` environment variable.\n" @@ -2451,7 +2475,7 @@ }, "warehouse": { "type": "string", - "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable.\n" + "description": "Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable.\n" } }, "requiredInputs": [ @@ -3515,7 +3539,7 @@ } }, "snowflake:index/externalTable:ExternalTable": { - "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst externalTable = new snowflake.ExternalTable(\"external_table\", {\n columns: [\n {\n name: \"id\",\n type: \"int\",\n },\n {\n name: \"data\",\n type: \"text\",\n },\n ],\n comment: \"External table\",\n database: \"db\",\n schema: \"schema\",\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\nexternal_table = snowflake.ExternalTable(\"externalTable\",\n columns=[\n snowflake.ExternalTableColumnArgs(\n name=\"id\",\n type=\"int\",\n ),\n snowflake.ExternalTableColumnArgs(\n name=\"data\",\n type=\"text\",\n ),\n ],\n comment=\"External table\",\n database=\"db\",\n schema=\"schema\")\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var externalTable = new Snowflake.ExternalTable(\"externalTable\", new()\n {\n Columns = new[]\n {\n new Snowflake.Inputs.ExternalTableColumnArgs\n {\n Name = \"id\",\n Type = \"int\",\n },\n new Snowflake.Inputs.ExternalTableColumnArgs\n {\n Name = \"data\",\n Type = \"text\",\n },\n },\n Comment = \"External table\",\n Database = \"db\",\n Schema = \"schema\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewExternalTable(ctx, \"externalTable\", \u0026snowflake.ExternalTableArgs{\n\t\t\tColumns: ExternalTableColumnArray{\n\t\t\t\t\u0026ExternalTableColumnArgs{\n\t\t\t\t\tName: pulumi.String(\"id\"),\n\t\t\t\t\tType: pulumi.String(\"int\"),\n\t\t\t\t},\n\t\t\t\t\u0026ExternalTableColumnArgs{\n\t\t\t\t\tName: pulumi.String(\"data\"),\n\t\t\t\t\tType: pulumi.String(\"text\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tComment: pulumi.String(\"External table\"),\n\t\t\tDatabase: pulumi.String(\"db\"),\n\t\t\tSchema: pulumi.String(\"schema\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.snowflake.ExternalTable;\nimport com.pulumi.snowflake.ExternalTableArgs;\nimport com.pulumi.snowflake.inputs.ExternalTableColumnArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var externalTable = new ExternalTable(\"externalTable\", ExternalTableArgs.builder() \n .columns( \n ExternalTableColumnArgs.builder()\n .name(\"id\")\n .type(\"int\")\n .build(),\n ExternalTableColumnArgs.builder()\n .name(\"data\")\n .type(\"text\")\n .build())\n .comment(\"External table\")\n .database(\"db\")\n .schema(\"schema\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n externalTable:\n type: snowflake:ExternalTable\n properties:\n columns:\n - name: id\n type: int\n - name: data\n type: text\n comment: External table\n database: db\n schema: schema\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nformat is database name | schema name | external table name\n\n```sh\n $ pulumi import snowflake:index/externalTable:ExternalTable example 'dbName|schemaName|externalTableName'\n```\n\n ", + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst externalTable = new snowflake.ExternalTable(\"external_table\", {\n columns: [\n {\n name: \"id\",\n type: \"int\",\n },\n {\n name: \"data\",\n type: \"text\",\n },\n ],\n comment: \"External table\",\n database: \"db\",\n fileFormat: \"TYPE = CSV FIELD_DELIMITER = '|'\",\n schema: \"schema\",\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\nexternal_table = snowflake.ExternalTable(\"externalTable\",\n columns=[\n snowflake.ExternalTableColumnArgs(\n name=\"id\",\n type=\"int\",\n ),\n snowflake.ExternalTableColumnArgs(\n name=\"data\",\n type=\"text\",\n ),\n ],\n comment=\"External table\",\n database=\"db\",\n file_format=\"TYPE = CSV FIELD_DELIMITER = '|'\",\n schema=\"schema\")\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var externalTable = new Snowflake.ExternalTable(\"externalTable\", new()\n {\n Columns = new[]\n {\n new Snowflake.Inputs.ExternalTableColumnArgs\n {\n Name = \"id\",\n Type = \"int\",\n },\n new Snowflake.Inputs.ExternalTableColumnArgs\n {\n Name = \"data\",\n Type = \"text\",\n },\n },\n Comment = \"External table\",\n Database = \"db\",\n FileFormat = \"TYPE = CSV FIELD_DELIMITER = '|'\",\n Schema = \"schema\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewExternalTable(ctx, \"externalTable\", \u0026snowflake.ExternalTableArgs{\n\t\t\tColumns: ExternalTableColumnArray{\n\t\t\t\t\u0026ExternalTableColumnArgs{\n\t\t\t\t\tName: pulumi.String(\"id\"),\n\t\t\t\t\tType: pulumi.String(\"int\"),\n\t\t\t\t},\n\t\t\t\t\u0026ExternalTableColumnArgs{\n\t\t\t\t\tName: pulumi.String(\"data\"),\n\t\t\t\t\tType: pulumi.String(\"text\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tComment: pulumi.String(\"External table\"),\n\t\t\tDatabase: pulumi.String(\"db\"),\n\t\t\tFileFormat: pulumi.String(\"TYPE = CSV FIELD_DELIMITER = '|'\"),\n\t\t\tSchema: pulumi.String(\"schema\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.snowflake.ExternalTable;\nimport com.pulumi.snowflake.ExternalTableArgs;\nimport com.pulumi.snowflake.inputs.ExternalTableColumnArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var externalTable = new ExternalTable(\"externalTable\", ExternalTableArgs.builder() \n .columns( \n ExternalTableColumnArgs.builder()\n .name(\"id\")\n .type(\"int\")\n .build(),\n ExternalTableColumnArgs.builder()\n .name(\"data\")\n .type(\"text\")\n .build())\n .comment(\"External table\")\n .database(\"db\")\n .fileFormat(\"TYPE = CSV FIELD_DELIMITER = '|'\")\n .schema(\"schema\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n externalTable:\n type: snowflake:ExternalTable\n properties:\n columns:\n - name: id\n type: int\n - name: data\n type: text\n comment: External table\n database: db\n fileFormat: TYPE = CSV FIELD_DELIMITER = '|'\n schema: schema\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nformat is database name | schema name | external table name\n\n```sh\n $ pulumi import snowflake:index/externalTable:ExternalTable example 'dbName|schemaName|externalTableName'\n```\n\n ", "properties": { "autoRefresh": { "type": "boolean", @@ -10155,6 +10179,55 @@ "type": "object" } }, + "snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation": { + "description": "\n\n## Import\n\nformat is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name\n\n```sh\n $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name'\n```\n\n ", + "properties": { + "maskingPolicyId": { + "type": "string", + "description": "The the resource id of the masking policy\n" + }, + "tagId": { + "type": "string", + "description": "Specifies the identifier for the tag. Note: format must follow: \"databaseName\".\"schemaName\".\"tagName\" or \"databaseName.schemaName.tagName\" or \"databaseName|schemaName.tagName\" (snowflake_tag.tag.id)\n" + } + }, + "required": [ + "maskingPolicyId", + "tagId" + ], + "inputProperties": { + "maskingPolicyId": { + "type": "string", + "description": "The the resource id of the masking policy\n", + "willReplaceOnChanges": true + }, + "tagId": { + "type": "string", + "description": "Specifies the identifier for the tag. Note: format must follow: \"databaseName\".\"schemaName\".\"tagName\" or \"databaseName.schemaName.tagName\" or \"databaseName|schemaName.tagName\" (snowflake_tag.tag.id)\n", + "willReplaceOnChanges": true + } + }, + "requiredInputs": [ + "maskingPolicyId", + "tagId" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering TagMaskingPolicyAssociation resources.\n", + "properties": { + "maskingPolicyId": { + "type": "string", + "description": "The the resource id of the masking policy\n", + "willReplaceOnChanges": true + }, + "tagId": { + "type": "string", + "description": "Specifies the identifier for the tag. Note: format must follow: \"databaseName\".\"schemaName\".\"tagName\" or \"databaseName.schemaName.tagName\" or \"databaseName|schemaName.tagName\" (snowflake_tag.tag.id)\n", + "willReplaceOnChanges": true + } + }, + "type": "object" + } + }, "snowflake:index/task:Task": { "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst task = new snowflake.Task(\"task\", {\n comment: \"my task\",\n database: \"db\",\n schema: \"schema\",\n warehouse: \"warehouse\",\n schedule: \"10 MINUTE\",\n sqlStatement: \"select * from foo;\",\n sessionParameters: {\n foo: \"bar\",\n },\n userTaskTimeoutMs: 10000,\n after: \"preceding_task\",\n when: \"foo AND bar\",\n enabled: true,\n});\nconst serverlessTask = new snowflake.Task(\"serverlessTask\", {\n comment: \"my serverless task\",\n database: \"db\",\n schema: \"schema\",\n schedule: \"10 MINUTE\",\n sqlStatement: \"select * from foo;\",\n sessionParameters: {\n foo: \"bar\",\n },\n userTaskTimeoutMs: 10000,\n userTaskManagedInitialWarehouseSize: \"XSMALL\",\n after: \"preceding_task\",\n when: \"foo AND bar\",\n enabled: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ntask = snowflake.Task(\"task\",\n comment=\"my task\",\n database=\"db\",\n schema=\"schema\",\n warehouse=\"warehouse\",\n schedule=\"10 MINUTE\",\n sql_statement=\"select * from foo;\",\n session_parameters={\n \"foo\": \"bar\",\n },\n user_task_timeout_ms=10000,\n after=\"preceding_task\",\n when=\"foo AND bar\",\n enabled=True)\nserverless_task = snowflake.Task(\"serverlessTask\",\n comment=\"my serverless task\",\n database=\"db\",\n schema=\"schema\",\n schedule=\"10 MINUTE\",\n sql_statement=\"select * from foo;\",\n session_parameters={\n \"foo\": \"bar\",\n },\n user_task_timeout_ms=10000,\n user_task_managed_initial_warehouse_size=\"XSMALL\",\n after=\"preceding_task\",\n when=\"foo AND bar\",\n enabled=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var task = new Snowflake.Task(\"task\", new()\n {\n Comment = \"my task\",\n Database = \"db\",\n Schema = \"schema\",\n Warehouse = \"warehouse\",\n Schedule = \"10 MINUTE\",\n SqlStatement = \"select * from foo;\",\n SessionParameters = \n {\n { \"foo\", \"bar\" },\n },\n UserTaskTimeoutMs = 10000,\n After = \"preceding_task\",\n When = \"foo AND bar\",\n Enabled = true,\n });\n\n var serverlessTask = new Snowflake.Task(\"serverlessTask\", new()\n {\n Comment = \"my serverless task\",\n Database = \"db\",\n Schema = \"schema\",\n Schedule = \"10 MINUTE\",\n SqlStatement = \"select * from foo;\",\n SessionParameters = \n {\n { \"foo\", \"bar\" },\n },\n UserTaskTimeoutMs = 10000,\n UserTaskManagedInitialWarehouseSize = \"XSMALL\",\n After = \"preceding_task\",\n When = \"foo AND bar\",\n Enabled = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewTask(ctx, \"task\", \u0026snowflake.TaskArgs{\n\t\t\tComment: pulumi.String(\"my task\"),\n\t\t\tDatabase: pulumi.String(\"db\"),\n\t\t\tSchema: pulumi.String(\"schema\"),\n\t\t\tWarehouse: pulumi.String(\"warehouse\"),\n\t\t\tSchedule: pulumi.String(\"10 MINUTE\"),\n\t\t\tSqlStatement: pulumi.String(\"select * from foo;\"),\n\t\t\tSessionParameters: pulumi.StringMap{\n\t\t\t\t\"foo\": pulumi.String(\"bar\"),\n\t\t\t},\n\t\t\tUserTaskTimeoutMs: pulumi.Int(10000),\n\t\t\tAfter: pulumi.String(\"preceding_task\"),\n\t\t\tWhen: pulumi.String(\"foo AND bar\"),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = snowflake.NewTask(ctx, \"serverlessTask\", \u0026snowflake.TaskArgs{\n\t\t\tComment: pulumi.String(\"my serverless task\"),\n\t\t\tDatabase: pulumi.String(\"db\"),\n\t\t\tSchema: pulumi.String(\"schema\"),\n\t\t\tSchedule: pulumi.String(\"10 MINUTE\"),\n\t\t\tSqlStatement: pulumi.String(\"select * from foo;\"),\n\t\t\tSessionParameters: pulumi.StringMap{\n\t\t\t\t\"foo\": pulumi.String(\"bar\"),\n\t\t\t},\n\t\t\tUserTaskTimeoutMs: pulumi.Int(10000),\n\t\t\tUserTaskManagedInitialWarehouseSize: pulumi.String(\"XSMALL\"),\n\t\t\tAfter: pulumi.String(\"preceding_task\"),\n\t\t\tWhen: pulumi.String(\"foo AND bar\"),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.snowflake.Task;\nimport com.pulumi.snowflake.TaskArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var task = new Task(\"task\", TaskArgs.builder() \n .comment(\"my task\")\n .database(\"db\")\n .schema(\"schema\")\n .warehouse(\"warehouse\")\n .schedule(\"10 MINUTE\")\n .sqlStatement(\"select * from foo;\")\n .sessionParameters(Map.of(\"foo\", \"bar\"))\n .userTaskTimeoutMs(10000)\n .after(\"preceding_task\")\n .when(\"foo AND bar\")\n .enabled(true)\n .build());\n\n var serverlessTask = new Task(\"serverlessTask\", TaskArgs.builder() \n .comment(\"my serverless task\")\n .database(\"db\")\n .schema(\"schema\")\n .schedule(\"10 MINUTE\")\n .sqlStatement(\"select * from foo;\")\n .sessionParameters(Map.of(\"foo\", \"bar\"))\n .userTaskTimeoutMs(10000)\n .userTaskManagedInitialWarehouseSize(\"XSMALL\")\n .after(\"preceding_task\")\n .when(\"foo AND bar\")\n .enabled(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n task:\n type: snowflake:Task\n properties:\n comment: my task\n database: db\n schema: schema\n warehouse: warehouse\n schedule: 10 MINUTE\n sqlStatement: select * from foo;\n sessionParameters:\n foo: bar\n userTaskTimeoutMs: 10000\n after: preceding_task\n when: foo AND bar\n enabled: true\n serverlessTask:\n type: snowflake:Task\n properties:\n comment: my serverless task\n database: db\n schema: schema\n schedule: 10 MINUTE\n sqlStatement: select * from foo;\n sessionParameters:\n foo: bar\n userTaskTimeoutMs: 10000\n userTaskManagedInitialWarehouseSize: XSMALL\n after: preceding_task\n when: foo AND bar\n enabled: true\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nformat is database name | schema name | task name\n\n```sh\n $ pulumi import snowflake:index/task:Task example 'dbName|schemaName|taskName'\n```\n\n ", "properties": { @@ -10755,6 +10828,102 @@ "type": "object" } }, + "snowflake:index/userGrant:UserGrant": { + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst grant = new snowflake.UserGrant(\"grant\", {\n privilege: \"MONITOR\",\n roles: [\"role1\"],\n userName: \"user\",\n withGrantOption: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ngrant = snowflake.UserGrant(\"grant\",\n privilege=\"MONITOR\",\n roles=[\"role1\"],\n user_name=\"user\",\n with_grant_option=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var grant = new Snowflake.UserGrant(\"grant\", new()\n {\n Privilege = \"MONITOR\",\n Roles = new[]\n {\n \"role1\",\n },\n UserName = \"user\",\n WithGrantOption = false,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewUserGrant(ctx, \"grant\", \u0026snowflake.UserGrantArgs{\n\t\t\tPrivilege: pulumi.String(\"MONITOR\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"role1\"),\n\t\t\t},\n\t\t\tUserName: pulumi.String(\"user\"),\n\t\t\tWithGrantOption: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.snowflake.UserGrant;\nimport com.pulumi.snowflake.UserGrantArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var grant = new UserGrant(\"grant\", UserGrantArgs.builder() \n .privilege(\"MONITOR\")\n .roles(\"role1\")\n .userName(\"user\")\n .withGrantOption(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n grant:\n type: snowflake:UserGrant\n properties:\n privilege: MONITOR\n roles:\n - role1\n userName: user\n withGrantOption: false\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nformat is user name | | | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true'\n```\n\n ", + "properties": { + "enableMultipleGrants": { + "type": "boolean", + "description": "When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke\ngrants applied to roles and objects outside Terraform.\n" + }, + "privilege": { + "type": "string", + "description": "The privilege to grant on the user.\n" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Grants privilege to these roles.\n" + }, + "userName": { + "type": "string", + "description": "The name of the user on which to grant privileges.\n" + }, + "withGrantOption": { + "type": "boolean", + "description": "When this is set to true, allows the recipient role to grant the privileges to other roles.\n" + } + }, + "required": [ + "privilege", + "userName" + ], + "inputProperties": { + "enableMultipleGrants": { + "type": "boolean", + "description": "When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke\ngrants applied to roles and objects outside Terraform.\n" + }, + "privilege": { + "type": "string", + "description": "The privilege to grant on the user.\n", + "willReplaceOnChanges": true + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Grants privilege to these roles.\n" + }, + "userName": { + "type": "string", + "description": "The name of the user on which to grant privileges.\n", + "willReplaceOnChanges": true + }, + "withGrantOption": { + "type": "boolean", + "description": "When this is set to true, allows the recipient role to grant the privileges to other roles.\n", + "willReplaceOnChanges": true + } + }, + "requiredInputs": [ + "privilege", + "userName" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering UserGrant resources.\n", + "properties": { + "enableMultipleGrants": { + "type": "boolean", + "description": "When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke\ngrants applied to roles and objects outside Terraform.\n" + }, + "privilege": { + "type": "string", + "description": "The privilege to grant on the user.\n", + "willReplaceOnChanges": true + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Grants privilege to these roles.\n" + }, + "userName": { + "type": "string", + "description": "The name of the user on which to grant privileges.\n", + "willReplaceOnChanges": true + }, + "withGrantOption": { + "type": "boolean", + "description": "When this is set to true, allows the recipient role to grant the privileges to other roles.\n", + "willReplaceOnChanges": true + } + }, + "type": "object" + } + }, "snowflake:index/userOwnershipGrant:UserOwnershipGrant": { "properties": { "currentGrants": { diff --git a/provider/go.mod b/provider/go.mod index d130bc00..e288337b 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -5,11 +5,11 @@ go 1.18 replace ( cloud.google.com/go/storage => cloud.google.com/go/storage v1.15.0 github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220725190814-23001ad6ec03 - github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.9 + github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.1 ) require ( - github.com/Snowflake-Labs/terraform-provider-snowflake v0.42.0 + github.com/Snowflake-Labs/terraform-provider-snowflake v0.45.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.31.0 github.com/pulumi/pulumi/sdk/v3 v3.40.2 ) @@ -22,13 +22,13 @@ require ( cloud.google.com/go/logging v1.0.0 // indirect cloud.google.com/go/storage v1.22.1 // indirect github.com/Azure/azure-pipeline-go v0.2.3 // indirect - github.com/Azure/azure-sdk-for-go v57.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go v59.3.0+incompatible // indirect github.com/Azure/azure-storage-blob-go v0.15.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.20 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.15 // indirect - github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect + github.com/Azure/go-autorest/autorest v0.11.22 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.17 // indirect + github.com/Azure/go-autorest/autorest/azure/auth v0.5.9 // indirect github.com/Azure/go-autorest/autorest/azure/cli v0.4.3 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect @@ -62,7 +62,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.5.0 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.16.3 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect @@ -88,7 +88,7 @@ require ( github.com/go-git/go-git/v5 v5.4.2 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.0.0 // indirect + github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -221,7 +221,7 @@ require ( golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/api v0.74.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/provider/go.sum b/provider/go.sum index 3764512b..2cb68c3d 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -71,8 +71,9 @@ github.com/Azure/azure-amqp-common-go/v3 v3.1.1/go.mod h1:YsDaPfaO9Ub2XeSKdIy2Df github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v51.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v57.0.0+incompatible h1:isVki3PbIFrwKvKdVP1byxo73/pt+Nn174YxW1k4PNw= github.com/Azure/azure-sdk-for-go v57.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v59.3.0+incompatible h1:dPIm0BO4jsMXFcCI/sLTPkBtE7mk8WMuRHA0JeWhlcQ= +github.com/Azure/azure-sdk-for-go v59.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-service-bus-go v0.10.16/go.mod h1:MlkLwGGf1ewcx5jZadn0gUEty+tTg0RaElr6bPf+QhI= github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck= github.com/Azure/azure-storage-blob-go v0.15.0 h1:rXtgp8tN1p29GvpGgfJetavIG0V7OgcSXPpwp3tx6qk= @@ -88,17 +89,21 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.11.3/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.20 h1:s8H1PbCZSqg/DH7JMlOz6YMig6htWLNPsjDdlLqCx3M= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.20/go.mod h1:o3tqFY+QR40VOlk+pV4d77mORO64jOXSgEnPQgLK6JY= +github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= +github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.15 h1:X+p2GF0GWyOiSmqohIaEeuNFNDY4I4EOlVuUQvFdWMk= github.com/Azure/go-autorest/autorest/adal v0.9.15/go.mod h1:tGMin8I49Yij6AQ+rvV+Xa/zwxYQB5hmsd6DkfAx2+A= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 h1:TzPg6B6fTZ0G1zBf3T54aI7p3cAT6u//TOXGPmFMOXg= +github.com/Azure/go-autorest/autorest/adal v0.9.17 h1:esOPl2dhcz9P3jqBSJ8tPGEj2EqzPPT6zfyuloiogKY= +github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.9 h1:Y2CgdzitFDsdMwYMzf9LIZWrrTFysqbRc7b94XVVJ78= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.9/go.mod h1:hg3/1yw0Bq87O3KvvnJoAh34/0zbP7SFizX/qN5JvjU= github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= github.com/Azure/go-autorest/autorest/azure/cli v0.4.3 h1:DOhB+nXkF7LN0JfBGB5YtCF6QLK8mLe4psaHF7ZQEKM= github.com/Azure/go-autorest/autorest/azure/cli v0.4.3/go.mod h1:yAQ2b6eP/CmLPnmLvxtT1ALIY3OR1oFcCqVBi8vHiTc= @@ -142,8 +147,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/Snowflake-Labs/terraform-provider-snowflake v0.42.0 h1:xazeoJOfJWoquKbMGAO+2rB8X1Knw1ai0Z93fKwKVgE= -github.com/Snowflake-Labs/terraform-provider-snowflake v0.42.0/go.mod h1:JTP/JDIGKxTBrKWAFeTWDFpCXGwED6MvedDSnbwPkoI= +github.com/Snowflake-Labs/terraform-provider-snowflake v0.45.0 h1:tgXfshuPPVHp5TYUdJTAwQPnO5P3xeDW8j3IGsUr6Sk= +github.com/Snowflake-Labs/terraform-provider-snowflake v0.45.0/go.mod h1:uX8qR0LOa48WqKYRC+srBn86lVDxWBIyDcOQ4ryFqzI= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= @@ -190,6 +195,7 @@ github.com/aws/aws-sdk-go v1.40.34/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm github.com/aws/aws-sdk-go v1.44.16 h1:6voHuNZZNWo71MdNlym4eRlcogTeTSk9Ipo6qDJWzoU= github.com/aws/aws-sdk-go v1.44.16/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.9.0/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2 v1.16.2/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU= github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ= github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 h1:zfT11pa7ifu/VlLDpmc5OY2W4nYmnKkFDGeMVnmqAI0= @@ -205,8 +211,10 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 h1:wgJBHO58Pc1V1QAnzdVM3J github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12/go.mod h1:aZ4vZnyUuxedC7eD4JyEHpGnCz+O2sHQEx3VvAwklSE= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27 h1:xFXIMBci0UXStoOHq/8w0XIZPB2hgb9CD7uATJhqt10= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27/go.mod h1:+tj2cHQkChanggNZn1J2fJ1Cv6RO1TV0AA3472do31I= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9/go.mod h1:AnVH5pvai0pAF4lXRq0bmhbes1u9R8wTE+g+183bZNM= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18/go.mod h1:348MLhzV1GSlZSMusdwQpXKbhD7X2gbI/TxwAPKkYZQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3/go.mod h1:ssOhaLpRlh88H3UmEcsBoVKq309quMvm3Ds8e9d4eJM= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 h1:5mvQDtNWtI6H56+E4LUnLWEmATMB7oEh+Z9RurtIuC0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12/go.mod h1:ckaCVTEdGAxO6KwTGzgskxR1xM+iJW4lxMyDFVda2Fc= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.2/go.mod h1:BQV0agm+JEhqR+2RT5e1XTFIDcAAV0eW6z2trp+iduw= @@ -223,8 +231,9 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 h1:7iPTTX4SA github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12/go.mod h1:1TODGhheLWjpQWSuhYuAUWYTCKwEjx2iblIFKDHjeTc= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12 h1:QFjSOmHSb77qRTv7KI9UFon9X5wLWY5/M+6la3dTcZc= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12/go.mod h1:MADjAN0GHFDuc5lRa5Y5ki+oIO/w7X4qczHy+OUx0IA= -github.com/aws/aws-sdk-go-v2/service/kms v1.5.0 h1:10e9mzaaYIIePEuxUzW5YJ8LKHNG/NX63evcvS3ux9U= github.com/aws/aws-sdk-go-v2/service/kms v1.5.0/go.mod h1:w7JuP9Oq1IKMFQPkNe3V6s9rOssXzOVEMNEqK1L1bao= +github.com/aws/aws-sdk-go-v2/service/kms v1.16.3 h1:nUP29LA4GZZPihNSo5ZcF4Rl73u+bN5IBRnrQA0jFK4= +github.com/aws/aws-sdk-go-v2/service/kms v1.16.3/go.mod h1:QuiHPBqlOFCi4LqdSskYYAWpQlx3PKmohy+rE2F+o5g= github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5 h1:h9qqTedYnA9JcWjKyLV6UYIMSdp91ExLCUbjbpDLH7A= github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5/go.mod h1:J8SS5Tp/zeLxaubB0xGfKnVrvssNBNLwTipreTKLhjQ= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.6.0/go.mod h1:B+7C5UKdVq1ylkI/A6O8wcurFtaux0R1njePNPtKwoA= @@ -236,6 +245,7 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.0/go.mod h1:0qcSMCyASQPN2sk/1KQLQ2 github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 h1:dl8T0PJlN92rvEGOEUiD0+YPYdPEaCZK0TqHukvSfII= github.com/aws/aws-sdk-go-v2/service/sts v1.16.13/go.mod h1:Ru3QVMLygVs/07UQ3YDur1AQZZp2tUNje8wfloFttC0= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -397,8 +407,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -706,8 +717,8 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-ieproxy v0.0.9 h1:RvVbLiMv/Hbjf1gRaC2AQyzwbdVhdId7D2vPnXIml4k= -github.com/mattn/go-ieproxy v0.0.9/go.mod h1:eF30/rfdQUO9EnzNIZQr0r9HiLMlZNCpJkHbmMuOAE0= +github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= +github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -1023,6 +1034,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 h1:vJ2V3lFLg+bBhgroYuRfyN583UzVveQmIXjc8T/y3to= @@ -1091,6 +1103,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1121,7 +1134,6 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c h1:JVAXQ10yGGVbSyoer5VILysz6YKjdNT2bsvlayjqhes= golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1182,6 +1194,7 @@ golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1238,7 +1251,6 @@ golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 h1:TyKJRhyo17yWxOMCTHKWrc5rddHORMlnZ/j57umaUd8= @@ -1260,8 +1272,9 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 h1:M73Iuj3xbbb9Uk1DYhzydthsj6oOd6l9bpuFcNoUvTs= +golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/provider/resources.go b/provider/resources.go index f11cb5ef..9e284a85 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -77,65 +77,67 @@ func Provider() tfbridge.ProviderInfo { Repository: "https://github.com/pulumi/pulumi-snowflake", Config: map[string]*tfbridge.SchemaInfo{}, Resources: map[string]*tfbridge.ResourceInfo{ - "snowflake_account_grant": {Tok: makeResource(mainMod, "AccountGrant")}, - "snowflake_api_integration": {Tok: makeResource(mainMod, "ApiIntegration")}, - "snowflake_database": {Tok: makeResource(mainMod, "Database")}, - "snowflake_database_grant": {Tok: makeResource(mainMod, "DatabaseGrant")}, - "snowflake_external_function": {Tok: makeResource(mainMod, "ExternalFunction")}, - "snowflake_external_table": {Tok: makeResource(mainMod, "ExternalTable")}, - "snowflake_external_table_grant": {Tok: makeResource(mainMod, "ExternalTableGrant")}, - "snowflake_file_format": {Tok: makeResource(mainMod, "FileFormat")}, - "snowflake_file_format_grant": {Tok: makeResource(mainMod, "FileFormatGrant")}, - "snowflake_function": {Tok: makeResource(mainMod, "Function")}, - "snowflake_function_grant": {Tok: makeResource(mainMod, "FunctionGrant")}, - "snowflake_integration_grant": {Tok: makeResource(mainMod, "IntegrationGrant")}, - "snowflake_managed_account": {Tok: makeResource(mainMod, "ManagedAccount")}, - "snowflake_masking_policy": {Tok: makeResource(mainMod, "MaskingPolicy")}, - "snowflake_masking_policy_grant": {Tok: makeResource(mainMod, "MaskingPolicyGrant")}, - "snowflake_materialized_view": {Tok: makeResource(mainMod, "MaterializedView")}, - "snowflake_materialized_view_grant": {Tok: makeResource(mainMod, "MaterializedViewGrant")}, - "snowflake_network_policy": {Tok: makeResource(mainMod, "NetworkPolicy")}, - "snowflake_network_policy_attachment": {Tok: makeResource(mainMod, "NetworkPolicyAttachment")}, - "snowflake_notification_integration": {Tok: makeResource(mainMod, "NotificationIntegration")}, - "snowflake_pipe": {Tok: makeResource(mainMod, "Pipe")}, - "snowflake_pipe_grant": {Tok: makeResource(mainMod, "PipeGrant")}, - "snowflake_procedure": {Tok: makeResource(mainMod, "Procedure")}, - "snowflake_procedure_grant": {Tok: makeResource(mainMod, "ProcedureGrant")}, - "snowflake_resource_monitor": {Tok: makeResource(mainMod, "ResourceMonitor")}, - "snowflake_resource_monitor_grant": {Tok: makeResource(mainMod, "ResourceMonitorGrant")}, - "snowflake_role": {Tok: makeResource(mainMod, "Role")}, - "snowflake_role_grants": {Tok: makeResource(mainMod, "RoleGrants")}, - "snowflake_row_access_policy": {Tok: makeResource(mainMod, "RowAccessPolicy")}, - "snowflake_row_access_policy_grant": {Tok: makeResource(mainMod, "RowAccessPolicyGrant")}, - "snowflake_schema": {Tok: makeResource(mainMod, "Schema")}, - "snowflake_schema_grant": {Tok: makeResource(mainMod, "SchemaGrant")}, - "snowflake_scim_integration": {Tok: makeResource(mainMod, "ScimIntegration")}, - "snowflake_sequence": {Tok: makeResource(mainMod, "Sequence")}, - "snowflake_sequence_grant": {Tok: makeResource(mainMod, "SequenceGrant")}, - "snowflake_share": {Tok: makeResource(mainMod, "Share")}, - "snowflake_stage": {Tok: makeResource(mainMod, "Stage")}, - "snowflake_stage_grant": {Tok: makeResource(mainMod, "StageGrant")}, - "snowflake_storage_integration": {Tok: makeResource(mainMod, "StorageIntegration")}, - "snowflake_stream": {Tok: makeResource(mainMod, "Stream")}, - "snowflake_stream_grant": {Tok: makeResource(mainMod, "StreamGrant")}, - "snowflake_table": {Tok: makeResource(mainMod, "Table")}, - "snowflake_table_grant": {Tok: makeResource(mainMod, "TableGrant")}, - "snowflake_tag": {Tok: makeResource(mainMod, "Tag")}, - "snowflake_task": {Tok: makeResource(mainMod, "Task")}, - "snowflake_task_grant": {Tok: makeResource(mainMod, "TaskGrant")}, - "snowflake_user": {Tok: makeResource(mainMod, "User")}, - "snowflake_user_public_keys": {Tok: makeResource(mainMod, "UserPublicKeys")}, - "snowflake_view": {Tok: makeResource(mainMod, "View")}, - "snowflake_view_grant": {Tok: makeResource(mainMod, "ViewGrant")}, - "snowflake_warehouse": {Tok: makeResource(mainMod, "Warehouse")}, - "snowflake_warehouse_grant": {Tok: makeResource(mainMod, "WarehouseGrant")}, - "snowflake_oauth_integration": {Tok: makeResource(mainMod, "OauthIntegration")}, - "snowflake_saml_integration": {Tok: makeResource(mainMod, "SamlIntegration")}, - "snowflake_external_oauth_integration": {Tok: makeResource(mainMod, "ExternalOauthIntegration")}, - "snowflake_role_ownership_grant": {Tok: makeResource(mainMod, "RoleOwnershipGrant")}, - "snowflake_user_ownership_grant": {Tok: makeResource(mainMod, "UserOwnershipGrant")}, - "snowflake_tag_grant": {Tok: makeResource(mainMod, "TagGrant")}, - "snowflake_tag_association": {Tok: makeResource(mainMod, "TagAssociation")}, + "snowflake_account_grant": {Tok: makeResource(mainMod, "AccountGrant")}, + "snowflake_api_integration": {Tok: makeResource(mainMod, "ApiIntegration")}, + "snowflake_database": {Tok: makeResource(mainMod, "Database")}, + "snowflake_database_grant": {Tok: makeResource(mainMod, "DatabaseGrant")}, + "snowflake_external_function": {Tok: makeResource(mainMod, "ExternalFunction")}, + "snowflake_external_table": {Tok: makeResource(mainMod, "ExternalTable")}, + "snowflake_external_table_grant": {Tok: makeResource(mainMod, "ExternalTableGrant")}, + "snowflake_file_format": {Tok: makeResource(mainMod, "FileFormat")}, + "snowflake_file_format_grant": {Tok: makeResource(mainMod, "FileFormatGrant")}, + "snowflake_function": {Tok: makeResource(mainMod, "Function")}, + "snowflake_function_grant": {Tok: makeResource(mainMod, "FunctionGrant")}, + "snowflake_integration_grant": {Tok: makeResource(mainMod, "IntegrationGrant")}, + "snowflake_managed_account": {Tok: makeResource(mainMod, "ManagedAccount")}, + "snowflake_masking_policy": {Tok: makeResource(mainMod, "MaskingPolicy")}, + "snowflake_masking_policy_grant": {Tok: makeResource(mainMod, "MaskingPolicyGrant")}, + "snowflake_materialized_view": {Tok: makeResource(mainMod, "MaterializedView")}, + "snowflake_materialized_view_grant": {Tok: makeResource(mainMod, "MaterializedViewGrant")}, + "snowflake_network_policy": {Tok: makeResource(mainMod, "NetworkPolicy")}, + "snowflake_network_policy_attachment": {Tok: makeResource(mainMod, "NetworkPolicyAttachment")}, + "snowflake_notification_integration": {Tok: makeResource(mainMod, "NotificationIntegration")}, + "snowflake_pipe": {Tok: makeResource(mainMod, "Pipe")}, + "snowflake_pipe_grant": {Tok: makeResource(mainMod, "PipeGrant")}, + "snowflake_procedure": {Tok: makeResource(mainMod, "Procedure")}, + "snowflake_procedure_grant": {Tok: makeResource(mainMod, "ProcedureGrant")}, + "snowflake_resource_monitor": {Tok: makeResource(mainMod, "ResourceMonitor")}, + "snowflake_resource_monitor_grant": {Tok: makeResource(mainMod, "ResourceMonitorGrant")}, + "snowflake_role": {Tok: makeResource(mainMod, "Role")}, + "snowflake_role_grants": {Tok: makeResource(mainMod, "RoleGrants")}, + "snowflake_row_access_policy": {Tok: makeResource(mainMod, "RowAccessPolicy")}, + "snowflake_row_access_policy_grant": {Tok: makeResource(mainMod, "RowAccessPolicyGrant")}, + "snowflake_schema": {Tok: makeResource(mainMod, "Schema")}, + "snowflake_schema_grant": {Tok: makeResource(mainMod, "SchemaGrant")}, + "snowflake_scim_integration": {Tok: makeResource(mainMod, "ScimIntegration")}, + "snowflake_sequence": {Tok: makeResource(mainMod, "Sequence")}, + "snowflake_sequence_grant": {Tok: makeResource(mainMod, "SequenceGrant")}, + "snowflake_share": {Tok: makeResource(mainMod, "Share")}, + "snowflake_stage": {Tok: makeResource(mainMod, "Stage")}, + "snowflake_stage_grant": {Tok: makeResource(mainMod, "StageGrant")}, + "snowflake_storage_integration": {Tok: makeResource(mainMod, "StorageIntegration")}, + "snowflake_stream": {Tok: makeResource(mainMod, "Stream")}, + "snowflake_stream_grant": {Tok: makeResource(mainMod, "StreamGrant")}, + "snowflake_table": {Tok: makeResource(mainMod, "Table")}, + "snowflake_table_grant": {Tok: makeResource(mainMod, "TableGrant")}, + "snowflake_tag": {Tok: makeResource(mainMod, "Tag")}, + "snowflake_task": {Tok: makeResource(mainMod, "Task")}, + "snowflake_task_grant": {Tok: makeResource(mainMod, "TaskGrant")}, + "snowflake_user": {Tok: makeResource(mainMod, "User")}, + "snowflake_user_grant": {Tok: makeResource(mainMod, "UserGrant")}, + "snowflake_user_public_keys": {Tok: makeResource(mainMod, "UserPublicKeys")}, + "snowflake_view": {Tok: makeResource(mainMod, "View")}, + "snowflake_view_grant": {Tok: makeResource(mainMod, "ViewGrant")}, + "snowflake_warehouse": {Tok: makeResource(mainMod, "Warehouse")}, + "snowflake_warehouse_grant": {Tok: makeResource(mainMod, "WarehouseGrant")}, + "snowflake_oauth_integration": {Tok: makeResource(mainMod, "OauthIntegration")}, + "snowflake_saml_integration": {Tok: makeResource(mainMod, "SamlIntegration")}, + "snowflake_external_oauth_integration": {Tok: makeResource(mainMod, "ExternalOauthIntegration")}, + "snowflake_role_ownership_grant": {Tok: makeResource(mainMod, "RoleOwnershipGrant")}, + "snowflake_user_ownership_grant": {Tok: makeResource(mainMod, "UserOwnershipGrant")}, + "snowflake_tag_association": {Tok: makeResource(mainMod, "TagAssociation")}, + "snowflake_tag_grant": {Tok: makeResource(mainMod, "TagGrant")}, + "snowflake_tag_masking_policy_association": {Tok: makeResource(mainMod, "TagMaskingPolicyAssociation")}, }, DataSources: map[string]*tfbridge.DataSourceInfo{ "snowflake_current_account": {Tok: makeDataSource(mainMod, "getCurrentAccount")}, diff --git a/sdk/dotnet/Config/Config.cs b/sdk/dotnet/Config/Config.cs index 028c3e76..86027dbc 100644 --- a/sdk/dotnet/Config/Config.cs +++ b/sdk/dotnet/Config/Config.cs @@ -138,6 +138,17 @@ public static string? Password set => _password.Set(value); } + private static readonly __Value _port = new __Value(() => __config.GetInt32("port")); + /// + /// Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + /// environment variable. + /// + public static int? Port + { + get => _port.Get(); + set => _port.Set(value); + } + private static readonly __Value _privateKey = new __Value(() => __config.Get("privateKey")); /// /// Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from @@ -171,6 +182,16 @@ public static string? PrivateKeyPath set => _privateKeyPath.Set(value); } + private static readonly __Value _protocol = new __Value(() => __config.Get("protocol")); + /// + /// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + /// + public static string? Protocol + { + get => _protocol.Get(); + set => _protocol.Set(value); + } + private static readonly __Value _region = new __Value(() => __config.Get("region")); /// /// [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the @@ -205,7 +226,7 @@ public static string? Username private static readonly __Value _warehouse = new __Value(() => __config.Get("warehouse")); /// - /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. /// public static string? Warehouse { diff --git a/sdk/dotnet/ExternalTable.cs b/sdk/dotnet/ExternalTable.cs index 33bf8740..1cd91fe7 100644 --- a/sdk/dotnet/ExternalTable.cs +++ b/sdk/dotnet/ExternalTable.cs @@ -36,6 +36,7 @@ namespace Pulumi.Snowflake /// }, /// Comment = "External table", /// Database = "db", + /// FileFormat = "TYPE = CSV FIELD_DELIMITER = '|'", /// Schema = "schema", /// }); /// diff --git a/sdk/dotnet/Provider.cs b/sdk/dotnet/Provider.cs index 1537af7a..bf108e9e 100644 --- a/sdk/dotnet/Provider.cs +++ b/sdk/dotnet/Provider.cs @@ -99,6 +99,12 @@ public partial class Provider : global::Pulumi.ProviderResource [Output("privateKeyPath")] public Output PrivateKeyPath { get; private set; } = null!; + /// + /// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + /// + [Output("protocol")] + public Output Protocol { get; private set; } = null!; + /// /// [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the /// `SNOWFLAKE_REGION` environment variable. @@ -120,7 +126,7 @@ public partial class Provider : global::Pulumi.ProviderResource public Output Username { get; private set; } = null!; /// - /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. /// [Output("warehouse")] public Output Warehouse { get; private set; } = null!; @@ -302,6 +308,13 @@ public Input? Password } } + /// + /// Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + /// environment variable. + /// + [Input("port", json: true)] + public Input? Port { get; set; } + [Input("privateKey")] private Input? _privateKey; @@ -353,6 +366,12 @@ public Input? PrivateKeyPath } } + /// + /// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + /// + [Input("protocol")] + public Input? Protocol { get; set; } + /// /// [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the /// `SNOWFLAKE_REGION` environment variable. @@ -374,7 +393,7 @@ public Input? PrivateKeyPath public Input Username { get; set; } = null!; /// - /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + /// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. /// [Input("warehouse")] public Input? Warehouse { get; set; } diff --git a/sdk/dotnet/TagMaskingPolicyAssociation.cs b/sdk/dotnet/TagMaskingPolicyAssociation.cs new file mode 100644 index 00000000..2e10a20d --- /dev/null +++ b/sdk/dotnet/TagMaskingPolicyAssociation.cs @@ -0,0 +1,119 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Snowflake +{ + /// + /// ## Import + /// + /// format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name + /// + /// ```sh + /// $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' + /// ``` + /// + [SnowflakeResourceType("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation")] + public partial class TagMaskingPolicyAssociation : global::Pulumi.CustomResource + { + /// + /// The the resource id of the masking policy + /// + [Output("maskingPolicyId")] + public Output MaskingPolicyId { get; private set; } = null!; + + /// + /// Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + /// + [Output("tagId")] + public Output TagId { get; private set; } = null!; + + + /// + /// Create a TagMaskingPolicyAssociation resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public TagMaskingPolicyAssociation(string name, TagMaskingPolicyAssociationArgs args, CustomResourceOptions? options = null) + : base("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, args ?? new TagMaskingPolicyAssociationArgs(), MakeResourceOptions(options, "")) + { + } + + private TagMaskingPolicyAssociation(string name, Input id, TagMaskingPolicyAssociationState? state = null, CustomResourceOptions? options = null) + : base("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing TagMaskingPolicyAssociation resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static TagMaskingPolicyAssociation Get(string name, Input id, TagMaskingPolicyAssociationState? state = null, CustomResourceOptions? options = null) + { + return new TagMaskingPolicyAssociation(name, id, state, options); + } + } + + public sealed class TagMaskingPolicyAssociationArgs : global::Pulumi.ResourceArgs + { + /// + /// The the resource id of the masking policy + /// + [Input("maskingPolicyId", required: true)] + public Input MaskingPolicyId { get; set; } = null!; + + /// + /// Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + /// + [Input("tagId", required: true)] + public Input TagId { get; set; } = null!; + + public TagMaskingPolicyAssociationArgs() + { + } + public static new TagMaskingPolicyAssociationArgs Empty => new TagMaskingPolicyAssociationArgs(); + } + + public sealed class TagMaskingPolicyAssociationState : global::Pulumi.ResourceArgs + { + /// + /// The the resource id of the masking policy + /// + [Input("maskingPolicyId")] + public Input? MaskingPolicyId { get; set; } + + /// + /// Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + /// + [Input("tagId")] + public Input? TagId { get; set; } + + public TagMaskingPolicyAssociationState() + { + } + public static new TagMaskingPolicyAssociationState Empty => new TagMaskingPolicyAssociationState(); + } +} diff --git a/sdk/dotnet/UserGrant.cs b/sdk/dotnet/UserGrant.cs new file mode 100644 index 00000000..56f9db18 --- /dev/null +++ b/sdk/dotnet/UserGrant.cs @@ -0,0 +1,211 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Snowflake +{ + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using Pulumi; + /// using Snowflake = Pulumi.Snowflake; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var grant = new Snowflake.UserGrant("grant", new() + /// { + /// Privilege = "MONITOR", + /// Roles = new[] + /// { + /// "role1", + /// }, + /// UserName = "user", + /// WithGrantOption = false, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format is user name | | | privilege | true/false for with_grant_option + /// + /// ```sh + /// $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' + /// ``` + /// + [SnowflakeResourceType("snowflake:index/userGrant:UserGrant")] + public partial class UserGrant : global::Pulumi.CustomResource + { + /// + /// When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + /// grants applied to roles and objects outside Terraform. + /// + [Output("enableMultipleGrants")] + public Output EnableMultipleGrants { get; private set; } = null!; + + /// + /// The privilege to grant on the user. + /// + [Output("privilege")] + public Output Privilege { get; private set; } = null!; + + /// + /// Grants privilege to these roles. + /// + [Output("roles")] + public Output> Roles { get; private set; } = null!; + + /// + /// The name of the user on which to grant privileges. + /// + [Output("userName")] + public Output UserName { get; private set; } = null!; + + /// + /// When this is set to true, allows the recipient role to grant the privileges to other roles. + /// + [Output("withGrantOption")] + public Output WithGrantOption { get; private set; } = null!; + + + /// + /// Create a UserGrant resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public UserGrant(string name, UserGrantArgs args, CustomResourceOptions? options = null) + : base("snowflake:index/userGrant:UserGrant", name, args ?? new UserGrantArgs(), MakeResourceOptions(options, "")) + { + } + + private UserGrant(string name, Input id, UserGrantState? state = null, CustomResourceOptions? options = null) + : base("snowflake:index/userGrant:UserGrant", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing UserGrant resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static UserGrant Get(string name, Input id, UserGrantState? state = null, CustomResourceOptions? options = null) + { + return new UserGrant(name, id, state, options); + } + } + + public sealed class UserGrantArgs : global::Pulumi.ResourceArgs + { + /// + /// When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + /// grants applied to roles and objects outside Terraform. + /// + [Input("enableMultipleGrants")] + public Input? EnableMultipleGrants { get; set; } + + /// + /// The privilege to grant on the user. + /// + [Input("privilege", required: true)] + public Input Privilege { get; set; } = null!; + + [Input("roles")] + private InputList? _roles; + + /// + /// Grants privilege to these roles. + /// + public InputList Roles + { + get => _roles ?? (_roles = new InputList()); + set => _roles = value; + } + + /// + /// The name of the user on which to grant privileges. + /// + [Input("userName", required: true)] + public Input UserName { get; set; } = null!; + + /// + /// When this is set to true, allows the recipient role to grant the privileges to other roles. + /// + [Input("withGrantOption")] + public Input? WithGrantOption { get; set; } + + public UserGrantArgs() + { + } + public static new UserGrantArgs Empty => new UserGrantArgs(); + } + + public sealed class UserGrantState : global::Pulumi.ResourceArgs + { + /// + /// When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + /// grants applied to roles and objects outside Terraform. + /// + [Input("enableMultipleGrants")] + public Input? EnableMultipleGrants { get; set; } + + /// + /// The privilege to grant on the user. + /// + [Input("privilege")] + public Input? Privilege { get; set; } + + [Input("roles")] + private InputList? _roles; + + /// + /// Grants privilege to these roles. + /// + public InputList Roles + { + get => _roles ?? (_roles = new InputList()); + set => _roles = value; + } + + /// + /// The name of the user on which to grant privileges. + /// + [Input("userName")] + public Input? UserName { get; set; } + + /// + /// When this is set to true, allows the recipient role to grant the privileges to other roles. + /// + [Input("withGrantOption")] + public Input? WithGrantOption { get; set; } + + public UserGrantState() + { + } + public static new UserGrantState Empty => new UserGrantState(); + } +} diff --git a/sdk/go/snowflake/config/config.go b/sdk/go/snowflake/config/config.go index a8de52c4..9f24a880 100644 --- a/sdk/go/snowflake/config/config.go +++ b/sdk/go/snowflake/config/config.go @@ -64,6 +64,12 @@ func GetPassword(ctx *pulumi.Context) string { return config.Get(ctx, "snowflake:password") } +// Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` +// environment variable. +func GetPort(ctx *pulumi.Context) int { + return config.GetInt(ctx, "snowflake:port") +} + // Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from // `SNOWFLAKE_PRIVATE_KEY` environment variable. func GetPrivateKey(ctx *pulumi.Context) string { @@ -82,6 +88,11 @@ func GetPrivateKeyPath(ctx *pulumi.Context) string { return config.Get(ctx, "snowflake:privateKeyPath") } +// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. +func GetProtocol(ctx *pulumi.Context) string { + return config.Get(ctx, "snowflake:protocol") +} + // [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the // `SNOWFLAKE_REGION` environment variable. func GetRegion(ctx *pulumi.Context) string { @@ -99,7 +110,7 @@ func GetUsername(ctx *pulumi.Context) string { return config.Get(ctx, "snowflake:username") } -// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. +// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. func GetWarehouse(ctx *pulumi.Context) string { return config.Get(ctx, "snowflake:warehouse") } diff --git a/sdk/go/snowflake/externalTable.go b/sdk/go/snowflake/externalTable.go index ecaff021..20233e47 100644 --- a/sdk/go/snowflake/externalTable.go +++ b/sdk/go/snowflake/externalTable.go @@ -36,9 +36,10 @@ import ( // Type: pulumi.String("text"), // }, // }, -// Comment: pulumi.String("External table"), -// Database: pulumi.String("db"), -// Schema: pulumi.String("schema"), +// Comment: pulumi.String("External table"), +// Database: pulumi.String("db"), +// FileFormat: pulumi.String("TYPE = CSV FIELD_DELIMITER = '|'"), +// Schema: pulumi.String("schema"), // }) // if err != nil { // return err diff --git a/sdk/go/snowflake/init.go b/sdk/go/snowflake/init.go index 2946731e..87c1b72b 100644 --- a/sdk/go/snowflake/init.go +++ b/sdk/go/snowflake/init.go @@ -120,12 +120,16 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &TagAssociation{} case "snowflake:index/tagGrant:TagGrant": r = &TagGrant{} + case "snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation": + r = &TagMaskingPolicyAssociation{} case "snowflake:index/task:Task": r = &Task{} case "snowflake:index/taskGrant:TaskGrant": r = &TaskGrant{} case "snowflake:index/user:User": r = &User{} + case "snowflake:index/userGrant:UserGrant": + r = &UserGrant{} case "snowflake:index/userOwnershipGrant:UserOwnershipGrant": r = &UserOwnershipGrant{} case "snowflake:index/userPublicKeys:UserPublicKeys": @@ -416,6 +420,11 @@ func init() { "index/tagGrant", &module{version}, ) + pulumi.RegisterResourceModule( + "snowflake", + "index/tagMaskingPolicyAssociation", + &module{version}, + ) pulumi.RegisterResourceModule( "snowflake", "index/task", @@ -431,6 +440,11 @@ func init() { "index/user", &module{version}, ) + pulumi.RegisterResourceModule( + "snowflake", + "index/userGrant", + &module{version}, + ) pulumi.RegisterResourceModule( "snowflake", "index/userOwnershipGrant", diff --git a/sdk/go/snowflake/provider.go b/sdk/go/snowflake/provider.go index f2a51600..c38fd3d6 100644 --- a/sdk/go/snowflake/provider.go +++ b/sdk/go/snowflake/provider.go @@ -51,6 +51,8 @@ type Provider struct { // Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or // `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. PrivateKeyPath pulumi.StringPtrOutput `pulumi:"privateKeyPath"` + // Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + Protocol pulumi.StringPtrOutput `pulumi:"protocol"` // [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the // `SNOWFLAKE_REGION` environment variable. Region pulumi.StringOutput `pulumi:"region"` @@ -59,7 +61,7 @@ type Provider struct { Role pulumi.StringPtrOutput `pulumi:"role"` // Username for username+password authentication. Can come from the `SNOWFLAKE_USER` environment variable. Username pulumi.StringOutput `pulumi:"username"` - // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. Warehouse pulumi.StringPtrOutput `pulumi:"warehouse"` } @@ -157,6 +159,9 @@ type providerArgs struct { // Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from // `SNOWFLAKE_PASSWORD` environment variable. Password *string `pulumi:"password"` + // Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + // environment variable. + Port *int `pulumi:"port"` // Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from // `SNOWFLAKE_PRIVATE_KEY` environment variable. PrivateKey *string `pulumi:"privateKey"` @@ -166,6 +171,8 @@ type providerArgs struct { // Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or // `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. PrivateKeyPath *string `pulumi:"privateKeyPath"` + // Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + Protocol *string `pulumi:"protocol"` // [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the // `SNOWFLAKE_REGION` environment variable. Region string `pulumi:"region"` @@ -174,7 +181,7 @@ type providerArgs struct { Role *string `pulumi:"role"` // Username for username+password authentication. Can come from the `SNOWFLAKE_USER` environment variable. Username string `pulumi:"username"` - // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. Warehouse *string `pulumi:"warehouse"` } @@ -206,6 +213,9 @@ type ProviderArgs struct { // Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from // `SNOWFLAKE_PASSWORD` environment variable. Password pulumi.StringPtrInput + // Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + // environment variable. + Port pulumi.IntPtrInput // Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from // `SNOWFLAKE_PRIVATE_KEY` environment variable. PrivateKey pulumi.StringPtrInput @@ -215,6 +225,8 @@ type ProviderArgs struct { // Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or // `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. PrivateKeyPath pulumi.StringPtrInput + // Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + Protocol pulumi.StringPtrInput // [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the // `SNOWFLAKE_REGION` environment variable. Region pulumi.StringInput @@ -223,7 +235,7 @@ type ProviderArgs struct { Role pulumi.StringPtrInput // Username for username+password authentication. Can come from the `SNOWFLAKE_USER` environment variable. Username pulumi.StringInput - // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + // Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. Warehouse pulumi.StringPtrInput } @@ -333,6 +345,11 @@ func (o ProviderOutput) PrivateKeyPath() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.PrivateKeyPath }).(pulumi.StringPtrOutput) } +// Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. +func (o ProviderOutput) Protocol() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Protocol }).(pulumi.StringPtrOutput) +} + // [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the // `SNOWFLAKE_REGION` environment variable. func (o ProviderOutput) Region() pulumi.StringOutput { @@ -350,7 +367,7 @@ func (o ProviderOutput) Username() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput) } -// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. +// Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. func (o ProviderOutput) Warehouse() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Warehouse }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/snowflake/tagMaskingPolicyAssociation.go b/sdk/go/snowflake/tagMaskingPolicyAssociation.go new file mode 100644 index 00000000..5811c1e6 --- /dev/null +++ b/sdk/go/snowflake/tagMaskingPolicyAssociation.go @@ -0,0 +1,243 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package snowflake + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## Import +// +// format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name +// +// ```sh +// +// $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' +// +// ``` +type TagMaskingPolicyAssociation struct { + pulumi.CustomResourceState + + // The the resource id of the masking policy + MaskingPolicyId pulumi.StringOutput `pulumi:"maskingPolicyId"` + // Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + TagId pulumi.StringOutput `pulumi:"tagId"` +} + +// NewTagMaskingPolicyAssociation registers a new resource with the given unique name, arguments, and options. +func NewTagMaskingPolicyAssociation(ctx *pulumi.Context, + name string, args *TagMaskingPolicyAssociationArgs, opts ...pulumi.ResourceOption) (*TagMaskingPolicyAssociation, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.MaskingPolicyId == nil { + return nil, errors.New("invalid value for required argument 'MaskingPolicyId'") + } + if args.TagId == nil { + return nil, errors.New("invalid value for required argument 'TagId'") + } + var resource TagMaskingPolicyAssociation + err := ctx.RegisterResource("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetTagMaskingPolicyAssociation gets an existing TagMaskingPolicyAssociation resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetTagMaskingPolicyAssociation(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *TagMaskingPolicyAssociationState, opts ...pulumi.ResourceOption) (*TagMaskingPolicyAssociation, error) { + var resource TagMaskingPolicyAssociation + err := ctx.ReadResource("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering TagMaskingPolicyAssociation resources. +type tagMaskingPolicyAssociationState struct { + // The the resource id of the masking policy + MaskingPolicyId *string `pulumi:"maskingPolicyId"` + // Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + TagId *string `pulumi:"tagId"` +} + +type TagMaskingPolicyAssociationState struct { + // The the resource id of the masking policy + MaskingPolicyId pulumi.StringPtrInput + // Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + TagId pulumi.StringPtrInput +} + +func (TagMaskingPolicyAssociationState) ElementType() reflect.Type { + return reflect.TypeOf((*tagMaskingPolicyAssociationState)(nil)).Elem() +} + +type tagMaskingPolicyAssociationArgs struct { + // The the resource id of the masking policy + MaskingPolicyId string `pulumi:"maskingPolicyId"` + // Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + TagId string `pulumi:"tagId"` +} + +// The set of arguments for constructing a TagMaskingPolicyAssociation resource. +type TagMaskingPolicyAssociationArgs struct { + // The the resource id of the masking policy + MaskingPolicyId pulumi.StringInput + // Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + TagId pulumi.StringInput +} + +func (TagMaskingPolicyAssociationArgs) ElementType() reflect.Type { + return reflect.TypeOf((*tagMaskingPolicyAssociationArgs)(nil)).Elem() +} + +type TagMaskingPolicyAssociationInput interface { + pulumi.Input + + ToTagMaskingPolicyAssociationOutput() TagMaskingPolicyAssociationOutput + ToTagMaskingPolicyAssociationOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationOutput +} + +func (*TagMaskingPolicyAssociation) ElementType() reflect.Type { + return reflect.TypeOf((**TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (i *TagMaskingPolicyAssociation) ToTagMaskingPolicyAssociationOutput() TagMaskingPolicyAssociationOutput { + return i.ToTagMaskingPolicyAssociationOutputWithContext(context.Background()) +} + +func (i *TagMaskingPolicyAssociation) ToTagMaskingPolicyAssociationOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationOutput { + return pulumi.ToOutputWithContext(ctx, i).(TagMaskingPolicyAssociationOutput) +} + +// TagMaskingPolicyAssociationArrayInput is an input type that accepts TagMaskingPolicyAssociationArray and TagMaskingPolicyAssociationArrayOutput values. +// You can construct a concrete instance of `TagMaskingPolicyAssociationArrayInput` via: +// +// TagMaskingPolicyAssociationArray{ TagMaskingPolicyAssociationArgs{...} } +type TagMaskingPolicyAssociationArrayInput interface { + pulumi.Input + + ToTagMaskingPolicyAssociationArrayOutput() TagMaskingPolicyAssociationArrayOutput + ToTagMaskingPolicyAssociationArrayOutputWithContext(context.Context) TagMaskingPolicyAssociationArrayOutput +} + +type TagMaskingPolicyAssociationArray []TagMaskingPolicyAssociationInput + +func (TagMaskingPolicyAssociationArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (i TagMaskingPolicyAssociationArray) ToTagMaskingPolicyAssociationArrayOutput() TagMaskingPolicyAssociationArrayOutput { + return i.ToTagMaskingPolicyAssociationArrayOutputWithContext(context.Background()) +} + +func (i TagMaskingPolicyAssociationArray) ToTagMaskingPolicyAssociationArrayOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(TagMaskingPolicyAssociationArrayOutput) +} + +// TagMaskingPolicyAssociationMapInput is an input type that accepts TagMaskingPolicyAssociationMap and TagMaskingPolicyAssociationMapOutput values. +// You can construct a concrete instance of `TagMaskingPolicyAssociationMapInput` via: +// +// TagMaskingPolicyAssociationMap{ "key": TagMaskingPolicyAssociationArgs{...} } +type TagMaskingPolicyAssociationMapInput interface { + pulumi.Input + + ToTagMaskingPolicyAssociationMapOutput() TagMaskingPolicyAssociationMapOutput + ToTagMaskingPolicyAssociationMapOutputWithContext(context.Context) TagMaskingPolicyAssociationMapOutput +} + +type TagMaskingPolicyAssociationMap map[string]TagMaskingPolicyAssociationInput + +func (TagMaskingPolicyAssociationMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (i TagMaskingPolicyAssociationMap) ToTagMaskingPolicyAssociationMapOutput() TagMaskingPolicyAssociationMapOutput { + return i.ToTagMaskingPolicyAssociationMapOutputWithContext(context.Background()) +} + +func (i TagMaskingPolicyAssociationMap) ToTagMaskingPolicyAssociationMapOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(TagMaskingPolicyAssociationMapOutput) +} + +type TagMaskingPolicyAssociationOutput struct{ *pulumi.OutputState } + +func (TagMaskingPolicyAssociationOutput) ElementType() reflect.Type { + return reflect.TypeOf((**TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (o TagMaskingPolicyAssociationOutput) ToTagMaskingPolicyAssociationOutput() TagMaskingPolicyAssociationOutput { + return o +} + +func (o TagMaskingPolicyAssociationOutput) ToTagMaskingPolicyAssociationOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationOutput { + return o +} + +// The the resource id of the masking policy +func (o TagMaskingPolicyAssociationOutput) MaskingPolicyId() pulumi.StringOutput { + return o.ApplyT(func(v *TagMaskingPolicyAssociation) pulumi.StringOutput { return v.MaskingPolicyId }).(pulumi.StringOutput) +} + +// Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) +func (o TagMaskingPolicyAssociationOutput) TagId() pulumi.StringOutput { + return o.ApplyT(func(v *TagMaskingPolicyAssociation) pulumi.StringOutput { return v.TagId }).(pulumi.StringOutput) +} + +type TagMaskingPolicyAssociationArrayOutput struct{ *pulumi.OutputState } + +func (TagMaskingPolicyAssociationArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (o TagMaskingPolicyAssociationArrayOutput) ToTagMaskingPolicyAssociationArrayOutput() TagMaskingPolicyAssociationArrayOutput { + return o +} + +func (o TagMaskingPolicyAssociationArrayOutput) ToTagMaskingPolicyAssociationArrayOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationArrayOutput { + return o +} + +func (o TagMaskingPolicyAssociationArrayOutput) Index(i pulumi.IntInput) TagMaskingPolicyAssociationOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TagMaskingPolicyAssociation { + return vs[0].([]*TagMaskingPolicyAssociation)[vs[1].(int)] + }).(TagMaskingPolicyAssociationOutput) +} + +type TagMaskingPolicyAssociationMapOutput struct{ *pulumi.OutputState } + +func (TagMaskingPolicyAssociationMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*TagMaskingPolicyAssociation)(nil)).Elem() +} + +func (o TagMaskingPolicyAssociationMapOutput) ToTagMaskingPolicyAssociationMapOutput() TagMaskingPolicyAssociationMapOutput { + return o +} + +func (o TagMaskingPolicyAssociationMapOutput) ToTagMaskingPolicyAssociationMapOutputWithContext(ctx context.Context) TagMaskingPolicyAssociationMapOutput { + return o +} + +func (o TagMaskingPolicyAssociationMapOutput) MapIndex(k pulumi.StringInput) TagMaskingPolicyAssociationOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TagMaskingPolicyAssociation { + return vs[0].(map[string]*TagMaskingPolicyAssociation)[vs[1].(string)] + }).(TagMaskingPolicyAssociationOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*TagMaskingPolicyAssociationInput)(nil)).Elem(), &TagMaskingPolicyAssociation{}) + pulumi.RegisterInputType(reflect.TypeOf((*TagMaskingPolicyAssociationArrayInput)(nil)).Elem(), TagMaskingPolicyAssociationArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*TagMaskingPolicyAssociationMapInput)(nil)).Elem(), TagMaskingPolicyAssociationMap{}) + pulumi.RegisterOutputType(TagMaskingPolicyAssociationOutput{}) + pulumi.RegisterOutputType(TagMaskingPolicyAssociationArrayOutput{}) + pulumi.RegisterOutputType(TagMaskingPolicyAssociationMapOutput{}) +} diff --git a/sdk/go/snowflake/userGrant.go b/sdk/go/snowflake/userGrant.go new file mode 100644 index 00000000..6a576324 --- /dev/null +++ b/sdk/go/snowflake/userGrant.go @@ -0,0 +1,325 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package snowflake + +import ( + "context" + "reflect" + + "github.com/pkg/errors" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## Example Usage +// +// ```go +// 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.NewUserGrant(ctx, "grant", &snowflake.UserGrantArgs{ +// Privilege: pulumi.String("MONITOR"), +// Roles: pulumi.StringArray{ +// pulumi.String("role1"), +// }, +// UserName: pulumi.String("user"), +// WithGrantOption: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format is user name | | | privilege | true/false for with_grant_option +// +// ```sh +// +// $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' +// +// ``` +type UserGrant struct { + pulumi.CustomResourceState + + // When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + // grants applied to roles and objects outside Terraform. + EnableMultipleGrants pulumi.BoolPtrOutput `pulumi:"enableMultipleGrants"` + // The privilege to grant on the user. + Privilege pulumi.StringOutput `pulumi:"privilege"` + // Grants privilege to these roles. + Roles pulumi.StringArrayOutput `pulumi:"roles"` + // The name of the user on which to grant privileges. + UserName pulumi.StringOutput `pulumi:"userName"` + // When this is set to true, allows the recipient role to grant the privileges to other roles. + WithGrantOption pulumi.BoolPtrOutput `pulumi:"withGrantOption"` +} + +// NewUserGrant registers a new resource with the given unique name, arguments, and options. +func NewUserGrant(ctx *pulumi.Context, + name string, args *UserGrantArgs, opts ...pulumi.ResourceOption) (*UserGrant, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Privilege == nil { + return nil, errors.New("invalid value for required argument 'Privilege'") + } + if args.UserName == nil { + return nil, errors.New("invalid value for required argument 'UserName'") + } + var resource UserGrant + err := ctx.RegisterResource("snowflake:index/userGrant:UserGrant", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetUserGrant gets an existing UserGrant resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetUserGrant(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *UserGrantState, opts ...pulumi.ResourceOption) (*UserGrant, error) { + var resource UserGrant + err := ctx.ReadResource("snowflake:index/userGrant:UserGrant", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering UserGrant resources. +type userGrantState struct { + // When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + // grants applied to roles and objects outside Terraform. + EnableMultipleGrants *bool `pulumi:"enableMultipleGrants"` + // The privilege to grant on the user. + Privilege *string `pulumi:"privilege"` + // Grants privilege to these roles. + Roles []string `pulumi:"roles"` + // The name of the user on which to grant privileges. + UserName *string `pulumi:"userName"` + // When this is set to true, allows the recipient role to grant the privileges to other roles. + WithGrantOption *bool `pulumi:"withGrantOption"` +} + +type UserGrantState struct { + // When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + // grants applied to roles and objects outside Terraform. + EnableMultipleGrants pulumi.BoolPtrInput + // The privilege to grant on the user. + Privilege pulumi.StringPtrInput + // Grants privilege to these roles. + Roles pulumi.StringArrayInput + // The name of the user on which to grant privileges. + UserName pulumi.StringPtrInput + // When this is set to true, allows the recipient role to grant the privileges to other roles. + WithGrantOption pulumi.BoolPtrInput +} + +func (UserGrantState) ElementType() reflect.Type { + return reflect.TypeOf((*userGrantState)(nil)).Elem() +} + +type userGrantArgs struct { + // When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + // grants applied to roles and objects outside Terraform. + EnableMultipleGrants *bool `pulumi:"enableMultipleGrants"` + // The privilege to grant on the user. + Privilege string `pulumi:"privilege"` + // Grants privilege to these roles. + Roles []string `pulumi:"roles"` + // The name of the user on which to grant privileges. + UserName string `pulumi:"userName"` + // When this is set to true, allows the recipient role to grant the privileges to other roles. + WithGrantOption *bool `pulumi:"withGrantOption"` +} + +// The set of arguments for constructing a UserGrant resource. +type UserGrantArgs struct { + // When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + // grants applied to roles and objects outside Terraform. + EnableMultipleGrants pulumi.BoolPtrInput + // The privilege to grant on the user. + Privilege pulumi.StringInput + // Grants privilege to these roles. + Roles pulumi.StringArrayInput + // The name of the user on which to grant privileges. + UserName pulumi.StringInput + // When this is set to true, allows the recipient role to grant the privileges to other roles. + WithGrantOption pulumi.BoolPtrInput +} + +func (UserGrantArgs) ElementType() reflect.Type { + return reflect.TypeOf((*userGrantArgs)(nil)).Elem() +} + +type UserGrantInput interface { + pulumi.Input + + ToUserGrantOutput() UserGrantOutput + ToUserGrantOutputWithContext(ctx context.Context) UserGrantOutput +} + +func (*UserGrant) ElementType() reflect.Type { + return reflect.TypeOf((**UserGrant)(nil)).Elem() +} + +func (i *UserGrant) ToUserGrantOutput() UserGrantOutput { + return i.ToUserGrantOutputWithContext(context.Background()) +} + +func (i *UserGrant) ToUserGrantOutputWithContext(ctx context.Context) UserGrantOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserGrantOutput) +} + +// UserGrantArrayInput is an input type that accepts UserGrantArray and UserGrantArrayOutput values. +// You can construct a concrete instance of `UserGrantArrayInput` via: +// +// UserGrantArray{ UserGrantArgs{...} } +type UserGrantArrayInput interface { + pulumi.Input + + ToUserGrantArrayOutput() UserGrantArrayOutput + ToUserGrantArrayOutputWithContext(context.Context) UserGrantArrayOutput +} + +type UserGrantArray []UserGrantInput + +func (UserGrantArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserGrant)(nil)).Elem() +} + +func (i UserGrantArray) ToUserGrantArrayOutput() UserGrantArrayOutput { + return i.ToUserGrantArrayOutputWithContext(context.Background()) +} + +func (i UserGrantArray) ToUserGrantArrayOutputWithContext(ctx context.Context) UserGrantArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserGrantArrayOutput) +} + +// UserGrantMapInput is an input type that accepts UserGrantMap and UserGrantMapOutput values. +// You can construct a concrete instance of `UserGrantMapInput` via: +// +// UserGrantMap{ "key": UserGrantArgs{...} } +type UserGrantMapInput interface { + pulumi.Input + + ToUserGrantMapOutput() UserGrantMapOutput + ToUserGrantMapOutputWithContext(context.Context) UserGrantMapOutput +} + +type UserGrantMap map[string]UserGrantInput + +func (UserGrantMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserGrant)(nil)).Elem() +} + +func (i UserGrantMap) ToUserGrantMapOutput() UserGrantMapOutput { + return i.ToUserGrantMapOutputWithContext(context.Background()) +} + +func (i UserGrantMap) ToUserGrantMapOutputWithContext(ctx context.Context) UserGrantMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserGrantMapOutput) +} + +type UserGrantOutput struct{ *pulumi.OutputState } + +func (UserGrantOutput) ElementType() reflect.Type { + return reflect.TypeOf((**UserGrant)(nil)).Elem() +} + +func (o UserGrantOutput) ToUserGrantOutput() UserGrantOutput { + return o +} + +func (o UserGrantOutput) ToUserGrantOutputWithContext(ctx context.Context) UserGrantOutput { + return o +} + +// When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke +// grants applied to roles and objects outside Terraform. +func (o UserGrantOutput) EnableMultipleGrants() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *UserGrant) pulumi.BoolPtrOutput { return v.EnableMultipleGrants }).(pulumi.BoolPtrOutput) +} + +// The privilege to grant on the user. +func (o UserGrantOutput) Privilege() pulumi.StringOutput { + return o.ApplyT(func(v *UserGrant) pulumi.StringOutput { return v.Privilege }).(pulumi.StringOutput) +} + +// Grants privilege to these roles. +func (o UserGrantOutput) Roles() pulumi.StringArrayOutput { + return o.ApplyT(func(v *UserGrant) pulumi.StringArrayOutput { return v.Roles }).(pulumi.StringArrayOutput) +} + +// The name of the user on which to grant privileges. +func (o UserGrantOutput) UserName() pulumi.StringOutput { + return o.ApplyT(func(v *UserGrant) pulumi.StringOutput { return v.UserName }).(pulumi.StringOutput) +} + +// When this is set to true, allows the recipient role to grant the privileges to other roles. +func (o UserGrantOutput) WithGrantOption() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *UserGrant) pulumi.BoolPtrOutput { return v.WithGrantOption }).(pulumi.BoolPtrOutput) +} + +type UserGrantArrayOutput struct{ *pulumi.OutputState } + +func (UserGrantArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserGrant)(nil)).Elem() +} + +func (o UserGrantArrayOutput) ToUserGrantArrayOutput() UserGrantArrayOutput { + return o +} + +func (o UserGrantArrayOutput) ToUserGrantArrayOutputWithContext(ctx context.Context) UserGrantArrayOutput { + return o +} + +func (o UserGrantArrayOutput) Index(i pulumi.IntInput) UserGrantOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserGrant { + return vs[0].([]*UserGrant)[vs[1].(int)] + }).(UserGrantOutput) +} + +type UserGrantMapOutput struct{ *pulumi.OutputState } + +func (UserGrantMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserGrant)(nil)).Elem() +} + +func (o UserGrantMapOutput) ToUserGrantMapOutput() UserGrantMapOutput { + return o +} + +func (o UserGrantMapOutput) ToUserGrantMapOutputWithContext(ctx context.Context) UserGrantMapOutput { + return o +} + +func (o UserGrantMapOutput) MapIndex(k pulumi.StringInput) UserGrantOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserGrant { + return vs[0].(map[string]*UserGrant)[vs[1].(string)] + }).(UserGrantOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*UserGrantInput)(nil)).Elem(), &UserGrant{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserGrantArrayInput)(nil)).Elem(), UserGrantArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserGrantMapInput)(nil)).Elem(), UserGrantMap{}) + pulumi.RegisterOutputType(UserGrantOutput{}) + pulumi.RegisterOutputType(UserGrantArrayOutput{}) + pulumi.RegisterOutputType(UserGrantMapOutput{}) +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/Config.java b/sdk/java/src/main/java/com/pulumi/snowflake/Config.java index ef5f8be8..06bc7807 100644 --- a/sdk/java/src/main/java/com/pulumi/snowflake/Config.java +++ b/sdk/java/src/main/java/com/pulumi/snowflake/Config.java @@ -5,6 +5,7 @@ import com.pulumi.core.internal.Codegen; import java.lang.Boolean; +import java.lang.Integer; import java.lang.String; import java.util.Optional; @@ -87,6 +88,14 @@ public Optional oauthRefreshToken() { public Optional password() { return Codegen.stringProp("password").config(config).get(); } +/** + * Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + * + */ + public Optional port() { + return Codegen.integerProp("port").config(config).get(); + } /** * Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from * `SNOWFLAKE_PRIVATE_KEY` environment variable. @@ -111,6 +120,13 @@ public Optional privateKeyPassphrase() { public Optional privateKeyPath() { return Codegen.stringProp("privateKeyPath").config(config).get(); } +/** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + */ + public Optional protocol() { + return Codegen.stringProp("protocol").config(config).get(); + } /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -135,7 +151,7 @@ public String username() { return Codegen.stringProp("username").config(config).require(); } /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * */ public Optional warehouse() { diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/ExternalTable.java b/sdk/java/src/main/java/com/pulumi/snowflake/ExternalTable.java index b17bdbdb..1605f690 100644 --- a/sdk/java/src/main/java/com/pulumi/snowflake/ExternalTable.java +++ b/sdk/java/src/main/java/com/pulumi/snowflake/ExternalTable.java @@ -54,6 +54,7 @@ * .build()) * .comment("External table") * .database("db") + * .fileFormat("TYPE = CSV FIELD_DELIMITER = '|'") * .schema("schema") * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/Provider.java b/sdk/java/src/main/java/com/pulumi/snowflake/Provider.java index c8787404..d5da1da2 100644 --- a/sdk/java/src/main/java/com/pulumi/snowflake/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/snowflake/Provider.java @@ -209,6 +209,20 @@ public Output> privateKeyPassphrase() { public Output> privateKeyPath() { return Codegen.optional(this.privateKeyPath); } + /** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + */ + @Export(name="protocol", type=String.class, parameters={}) + private Output protocol; + + /** + * @return Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + */ + public Output> protocol() { + return Codegen.optional(this.protocol); + } /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -256,14 +270,14 @@ public Output username() { return this.username; } /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * */ @Export(name="warehouse", type=String.class, parameters={}) private Output warehouse; /** - * @return Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * @return Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * */ public Output> warehouse() { diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/ProviderArgs.java b/sdk/java/src/main/java/com/pulumi/snowflake/ProviderArgs.java index b65ef6d1..aa0aff06 100644 --- a/sdk/java/src/main/java/com/pulumi/snowflake/ProviderArgs.java +++ b/sdk/java/src/main/java/com/pulumi/snowflake/ProviderArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Boolean; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.Optional; @@ -178,6 +179,23 @@ public Optional> password() { return Optional.ofNullable(this.password); } + /** + * Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + * + */ + @Import(name="port", json=true) + private @Nullable Output port; + + /** + * @return Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + * + */ + public Optional> port() { + return Optional.ofNullable(this.port); + } + /** * Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from * `SNOWFLAKE_PRIVATE_KEY` environment variable. @@ -229,6 +247,21 @@ public Optional> privateKeyPath() { return Optional.ofNullable(this.privateKeyPath); } + /** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + */ + @Import(name="protocol") + private @Nullable Output protocol; + + /** + * @return Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + */ + public Optional> protocol() { + return Optional.ofNullable(this.protocol); + } + /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -279,14 +312,14 @@ public Output username() { } /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * */ @Import(name="warehouse") private @Nullable Output warehouse; /** - * @return Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * @return Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * */ public Optional> warehouse() { @@ -306,9 +339,11 @@ private ProviderArgs(ProviderArgs $) { this.oauthRedirectUrl = $.oauthRedirectUrl; this.oauthRefreshToken = $.oauthRefreshToken; this.password = $.password; + this.port = $.port; this.privateKey = $.privateKey; this.privateKeyPassphrase = $.privateKeyPassphrase; this.privateKeyPath = $.privateKeyPath; + this.protocol = $.protocol; this.region = $.region; this.role = $.role; this.username = $.username; @@ -555,6 +590,29 @@ public Builder password(String password) { return password(Output.of(password)); } + /** + * @param port Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + * + * @return builder + * + */ + public Builder port(@Nullable Output port) { + $.port = port; + return this; + } + + /** + * @param port Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + * + * @return builder + * + */ + public Builder port(Integer port) { + return port(Output.of(port)); + } + /** * @param privateKey Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from * `SNOWFLAKE_PRIVATE_KEY` environment variable. @@ -624,6 +682,27 @@ public Builder privateKeyPath(String privateKeyPath) { return privateKeyPath(Output.of(privateKeyPath)); } + /** + * @param protocol Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + * @return builder + * + */ + public Builder protocol(@Nullable Output protocol) { + $.protocol = protocol; + return this; + } + + /** + * @param protocol Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + * + * @return builder + * + */ + public Builder protocol(String protocol) { + return protocol(Output.of(protocol)); + } + /** * @param region [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -692,7 +771,7 @@ public Builder username(String username) { } /** - * @param warehouse Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * @param warehouse Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * * @return builder * @@ -703,7 +782,7 @@ public Builder warehouse(@Nullable Output warehouse) { } /** - * @param warehouse Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * @param warehouse Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociation.java b/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociation.java new file mode 100644 index 00000000..c21781c6 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociation.java @@ -0,0 +1,105 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.snowflake.TagMaskingPolicyAssociationArgs; +import com.pulumi.snowflake.Utilities; +import com.pulumi.snowflake.inputs.TagMaskingPolicyAssociationState; +import java.lang.String; +import javax.annotation.Nullable; + +/** + * ## Import + * + * format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name + * + * ```sh + * $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' + * ``` + * + */ +@ResourceType(type="snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation") +public class TagMaskingPolicyAssociation extends com.pulumi.resources.CustomResource { + /** + * The the resource id of the masking policy + * + */ + @Export(name="maskingPolicyId", type=String.class, parameters={}) + private Output maskingPolicyId; + + /** + * @return The the resource id of the masking policy + * + */ + public Output maskingPolicyId() { + return this.maskingPolicyId; + } + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + @Export(name="tagId", type=String.class, parameters={}) + private Output tagId; + + /** + * @return Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + public Output tagId() { + return this.tagId; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public TagMaskingPolicyAssociation(String name) { + this(name, TagMaskingPolicyAssociationArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public TagMaskingPolicyAssociation(String name, TagMaskingPolicyAssociationArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public TagMaskingPolicyAssociation(String name, TagMaskingPolicyAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, args == null ? TagMaskingPolicyAssociationArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private TagMaskingPolicyAssociation(String name, Output id, @Nullable TagMaskingPolicyAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static TagMaskingPolicyAssociation get(String name, Output id, @Nullable TagMaskingPolicyAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new TagMaskingPolicyAssociation(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociationArgs.java b/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociationArgs.java new file mode 100644 index 00000000..fa627974 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/TagMaskingPolicyAssociationArgs.java @@ -0,0 +1,120 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class TagMaskingPolicyAssociationArgs extends com.pulumi.resources.ResourceArgs { + + public static final TagMaskingPolicyAssociationArgs Empty = new TagMaskingPolicyAssociationArgs(); + + /** + * The the resource id of the masking policy + * + */ + @Import(name="maskingPolicyId", required=true) + private Output maskingPolicyId; + + /** + * @return The the resource id of the masking policy + * + */ + public Output maskingPolicyId() { + return this.maskingPolicyId; + } + + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + @Import(name="tagId", required=true) + private Output tagId; + + /** + * @return Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + public Output tagId() { + return this.tagId; + } + + private TagMaskingPolicyAssociationArgs() {} + + private TagMaskingPolicyAssociationArgs(TagMaskingPolicyAssociationArgs $) { + this.maskingPolicyId = $.maskingPolicyId; + this.tagId = $.tagId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(TagMaskingPolicyAssociationArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private TagMaskingPolicyAssociationArgs $; + + public Builder() { + $ = new TagMaskingPolicyAssociationArgs(); + } + + public Builder(TagMaskingPolicyAssociationArgs defaults) { + $ = new TagMaskingPolicyAssociationArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param maskingPolicyId The the resource id of the masking policy + * + * @return builder + * + */ + public Builder maskingPolicyId(Output maskingPolicyId) { + $.maskingPolicyId = maskingPolicyId; + return this; + } + + /** + * @param maskingPolicyId The the resource id of the masking policy + * + * @return builder + * + */ + public Builder maskingPolicyId(String maskingPolicyId) { + return maskingPolicyId(Output.of(maskingPolicyId)); + } + + /** + * @param tagId Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + * @return builder + * + */ + public Builder tagId(Output tagId) { + $.tagId = tagId; + return this; + } + + /** + * @param tagId Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + * @return builder + * + */ + public Builder tagId(String tagId) { + return tagId(Output.of(tagId)); + } + + public TagMaskingPolicyAssociationArgs build() { + $.maskingPolicyId = Objects.requireNonNull($.maskingPolicyId, "expected parameter 'maskingPolicyId' to be non-null"); + $.tagId = Objects.requireNonNull($.tagId, "expected parameter 'tagId' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/UserGrant.java b/sdk/java/src/main/java/com/pulumi/snowflake/UserGrant.java new file mode 100644 index 00000000..8d34f93a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/UserGrant.java @@ -0,0 +1,185 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.snowflake.UserGrantArgs; +import com.pulumi.snowflake.Utilities; +import com.pulumi.snowflake.inputs.UserGrantState; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.snowflake.UserGrant; + * import com.pulumi.snowflake.UserGrantArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var grant = new UserGrant("grant", UserGrantArgs.builder() + * .privilege("MONITOR") + * .roles("role1") + * .userName("user") + * .withGrantOption(false) + * .build()); + * + * } + * } + * ``` + * + * ## Import + * + * format is user name | | | privilege | true/false for with_grant_option + * + * ```sh + * $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' + * ``` + * + */ +@ResourceType(type="snowflake:index/userGrant:UserGrant") +public class UserGrant extends com.pulumi.resources.CustomResource { + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + @Export(name="enableMultipleGrants", type=Boolean.class, parameters={}) + private Output enableMultipleGrants; + + /** + * @return When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + public Output> enableMultipleGrants() { + return Codegen.optional(this.enableMultipleGrants); + } + /** + * The privilege to grant on the user. + * + */ + @Export(name="privilege", type=String.class, parameters={}) + private Output privilege; + + /** + * @return The privilege to grant on the user. + * + */ + public Output privilege() { + return this.privilege; + } + /** + * Grants privilege to these roles. + * + */ + @Export(name="roles", type=List.class, parameters={String.class}) + private Output> roles; + + /** + * @return Grants privilege to these roles. + * + */ + public Output>> roles() { + return Codegen.optional(this.roles); + } + /** + * The name of the user on which to grant privileges. + * + */ + @Export(name="userName", type=String.class, parameters={}) + private Output userName; + + /** + * @return The name of the user on which to grant privileges. + * + */ + public Output userName() { + return this.userName; + } + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + @Export(name="withGrantOption", type=Boolean.class, parameters={}) + private Output withGrantOption; + + /** + * @return When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + public Output> withGrantOption() { + return Codegen.optional(this.withGrantOption); + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public UserGrant(String name) { + this(name, UserGrantArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public UserGrant(String name, UserGrantArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public UserGrant(String name, UserGrantArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("snowflake:index/userGrant:UserGrant", name, args == null ? UserGrantArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private UserGrant(String name, Output id, @Nullable UserGrantState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("snowflake:index/userGrant:UserGrant", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static UserGrant get(String name, Output id, @Nullable UserGrantState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new UserGrant(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/UserGrantArgs.java b/sdk/java/src/main/java/com/pulumi/snowflake/UserGrantArgs.java new file mode 100644 index 00000000..3bde73ab --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/UserGrantArgs.java @@ -0,0 +1,249 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class UserGrantArgs extends com.pulumi.resources.ResourceArgs { + + public static final UserGrantArgs Empty = new UserGrantArgs(); + + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + @Import(name="enableMultipleGrants") + private @Nullable Output enableMultipleGrants; + + /** + * @return When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + public Optional> enableMultipleGrants() { + return Optional.ofNullable(this.enableMultipleGrants); + } + + /** + * The privilege to grant on the user. + * + */ + @Import(name="privilege", required=true) + private Output privilege; + + /** + * @return The privilege to grant on the user. + * + */ + public Output privilege() { + return this.privilege; + } + + /** + * Grants privilege to these roles. + * + */ + @Import(name="roles") + private @Nullable Output> roles; + + /** + * @return Grants privilege to these roles. + * + */ + public Optional>> roles() { + return Optional.ofNullable(this.roles); + } + + /** + * The name of the user on which to grant privileges. + * + */ + @Import(name="userName", required=true) + private Output userName; + + /** + * @return The name of the user on which to grant privileges. + * + */ + public Output userName() { + return this.userName; + } + + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + @Import(name="withGrantOption") + private @Nullable Output withGrantOption; + + /** + * @return When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + public Optional> withGrantOption() { + return Optional.ofNullable(this.withGrantOption); + } + + private UserGrantArgs() {} + + private UserGrantArgs(UserGrantArgs $) { + this.enableMultipleGrants = $.enableMultipleGrants; + this.privilege = $.privilege; + this.roles = $.roles; + this.userName = $.userName; + this.withGrantOption = $.withGrantOption; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(UserGrantArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private UserGrantArgs $; + + public Builder() { + $ = new UserGrantArgs(); + } + + public Builder(UserGrantArgs defaults) { + $ = new UserGrantArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param enableMultipleGrants When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + * @return builder + * + */ + public Builder enableMultipleGrants(@Nullable Output enableMultipleGrants) { + $.enableMultipleGrants = enableMultipleGrants; + return this; + } + + /** + * @param enableMultipleGrants When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + * @return builder + * + */ + public Builder enableMultipleGrants(Boolean enableMultipleGrants) { + return enableMultipleGrants(Output.of(enableMultipleGrants)); + } + + /** + * @param privilege The privilege to grant on the user. + * + * @return builder + * + */ + public Builder privilege(Output privilege) { + $.privilege = privilege; + return this; + } + + /** + * @param privilege The privilege to grant on the user. + * + * @return builder + * + */ + public Builder privilege(String privilege) { + return privilege(Output.of(privilege)); + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(@Nullable Output> roles) { + $.roles = roles; + return this; + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(List roles) { + return roles(Output.of(roles)); + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(String... roles) { + return roles(List.of(roles)); + } + + /** + * @param userName The name of the user on which to grant privileges. + * + * @return builder + * + */ + public Builder userName(Output userName) { + $.userName = userName; + return this; + } + + /** + * @param userName The name of the user on which to grant privileges. + * + * @return builder + * + */ + public Builder userName(String userName) { + return userName(Output.of(userName)); + } + + /** + * @param withGrantOption When this is set to true, allows the recipient role to grant the privileges to other roles. + * + * @return builder + * + */ + public Builder withGrantOption(@Nullable Output withGrantOption) { + $.withGrantOption = withGrantOption; + return this; + } + + /** + * @param withGrantOption When this is set to true, allows the recipient role to grant the privileges to other roles. + * + * @return builder + * + */ + public Builder withGrantOption(Boolean withGrantOption) { + return withGrantOption(Output.of(withGrantOption)); + } + + public UserGrantArgs build() { + $.privilege = Objects.requireNonNull($.privilege, "expected parameter 'privilege' to be non-null"); + $.userName = Objects.requireNonNull($.userName, "expected parameter 'userName' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/inputs/TagMaskingPolicyAssociationState.java b/sdk/java/src/main/java/com/pulumi/snowflake/inputs/TagMaskingPolicyAssociationState.java new file mode 100644 index 00000000..f9eac2ed --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/inputs/TagMaskingPolicyAssociationState.java @@ -0,0 +1,120 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class TagMaskingPolicyAssociationState extends com.pulumi.resources.ResourceArgs { + + public static final TagMaskingPolicyAssociationState Empty = new TagMaskingPolicyAssociationState(); + + /** + * The the resource id of the masking policy + * + */ + @Import(name="maskingPolicyId") + private @Nullable Output maskingPolicyId; + + /** + * @return The the resource id of the masking policy + * + */ + public Optional> maskingPolicyId() { + return Optional.ofNullable(this.maskingPolicyId); + } + + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + @Import(name="tagId") + private @Nullable Output tagId; + + /** + * @return Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + */ + public Optional> tagId() { + return Optional.ofNullable(this.tagId); + } + + private TagMaskingPolicyAssociationState() {} + + private TagMaskingPolicyAssociationState(TagMaskingPolicyAssociationState $) { + this.maskingPolicyId = $.maskingPolicyId; + this.tagId = $.tagId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(TagMaskingPolicyAssociationState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private TagMaskingPolicyAssociationState $; + + public Builder() { + $ = new TagMaskingPolicyAssociationState(); + } + + public Builder(TagMaskingPolicyAssociationState defaults) { + $ = new TagMaskingPolicyAssociationState(Objects.requireNonNull(defaults)); + } + + /** + * @param maskingPolicyId The the resource id of the masking policy + * + * @return builder + * + */ + public Builder maskingPolicyId(@Nullable Output maskingPolicyId) { + $.maskingPolicyId = maskingPolicyId; + return this; + } + + /** + * @param maskingPolicyId The the resource id of the masking policy + * + * @return builder + * + */ + public Builder maskingPolicyId(String maskingPolicyId) { + return maskingPolicyId(Output.of(maskingPolicyId)); + } + + /** + * @param tagId Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + * @return builder + * + */ + public Builder tagId(@Nullable Output tagId) { + $.tagId = tagId; + return this; + } + + /** + * @param tagId Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + * + * @return builder + * + */ + public Builder tagId(String tagId) { + return tagId(Output.of(tagId)); + } + + public TagMaskingPolicyAssociationState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/snowflake/inputs/UserGrantState.java b/sdk/java/src/main/java/com/pulumi/snowflake/inputs/UserGrantState.java new file mode 100644 index 00000000..8c1dd331 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/snowflake/inputs/UserGrantState.java @@ -0,0 +1,247 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.snowflake.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class UserGrantState extends com.pulumi.resources.ResourceArgs { + + public static final UserGrantState Empty = new UserGrantState(); + + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + @Import(name="enableMultipleGrants") + private @Nullable Output enableMultipleGrants; + + /** + * @return When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + */ + public Optional> enableMultipleGrants() { + return Optional.ofNullable(this.enableMultipleGrants); + } + + /** + * The privilege to grant on the user. + * + */ + @Import(name="privilege") + private @Nullable Output privilege; + + /** + * @return The privilege to grant on the user. + * + */ + public Optional> privilege() { + return Optional.ofNullable(this.privilege); + } + + /** + * Grants privilege to these roles. + * + */ + @Import(name="roles") + private @Nullable Output> roles; + + /** + * @return Grants privilege to these roles. + * + */ + public Optional>> roles() { + return Optional.ofNullable(this.roles); + } + + /** + * The name of the user on which to grant privileges. + * + */ + @Import(name="userName") + private @Nullable Output userName; + + /** + * @return The name of the user on which to grant privileges. + * + */ + public Optional> userName() { + return Optional.ofNullable(this.userName); + } + + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + @Import(name="withGrantOption") + private @Nullable Output withGrantOption; + + /** + * @return When this is set to true, allows the recipient role to grant the privileges to other roles. + * + */ + public Optional> withGrantOption() { + return Optional.ofNullable(this.withGrantOption); + } + + private UserGrantState() {} + + private UserGrantState(UserGrantState $) { + this.enableMultipleGrants = $.enableMultipleGrants; + this.privilege = $.privilege; + this.roles = $.roles; + this.userName = $.userName; + this.withGrantOption = $.withGrantOption; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(UserGrantState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private UserGrantState $; + + public Builder() { + $ = new UserGrantState(); + } + + public Builder(UserGrantState defaults) { + $ = new UserGrantState(Objects.requireNonNull(defaults)); + } + + /** + * @param enableMultipleGrants When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + * @return builder + * + */ + public Builder enableMultipleGrants(@Nullable Output enableMultipleGrants) { + $.enableMultipleGrants = enableMultipleGrants; + return this; + } + + /** + * @param enableMultipleGrants When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + * + * @return builder + * + */ + public Builder enableMultipleGrants(Boolean enableMultipleGrants) { + return enableMultipleGrants(Output.of(enableMultipleGrants)); + } + + /** + * @param privilege The privilege to grant on the user. + * + * @return builder + * + */ + public Builder privilege(@Nullable Output privilege) { + $.privilege = privilege; + return this; + } + + /** + * @param privilege The privilege to grant on the user. + * + * @return builder + * + */ + public Builder privilege(String privilege) { + return privilege(Output.of(privilege)); + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(@Nullable Output> roles) { + $.roles = roles; + return this; + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(List roles) { + return roles(Output.of(roles)); + } + + /** + * @param roles Grants privilege to these roles. + * + * @return builder + * + */ + public Builder roles(String... roles) { + return roles(List.of(roles)); + } + + /** + * @param userName The name of the user on which to grant privileges. + * + * @return builder + * + */ + public Builder userName(@Nullable Output userName) { + $.userName = userName; + return this; + } + + /** + * @param userName The name of the user on which to grant privileges. + * + * @return builder + * + */ + public Builder userName(String userName) { + return userName(Output.of(userName)); + } + + /** + * @param withGrantOption When this is set to true, allows the recipient role to grant the privileges to other roles. + * + * @return builder + * + */ + public Builder withGrantOption(@Nullable Output withGrantOption) { + $.withGrantOption = withGrantOption; + return this; + } + + /** + * @param withGrantOption When this is set to true, allows the recipient role to grant the privileges to other roles. + * + * @return builder + * + */ + public Builder withGrantOption(Boolean withGrantOption) { + return withGrantOption(Output.of(withGrantOption)); + } + + public UserGrantState build() { + return $; + } + } + +} diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts index ad0d0271..d27da9dd 100644 --- a/sdk/nodejs/config/vars.ts +++ b/sdk/nodejs/config/vars.ts @@ -123,6 +123,18 @@ Object.defineProperty(exports, "password", { enumerable: true, }); +/** + * Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + */ +export declare const port: number | undefined; +Object.defineProperty(exports, "port", { + get() { + return __config.getObject("port"); + }, + enumerable: true, +}); + /** * Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from * `SNOWFLAKE_PRIVATE_KEY` environment variable. @@ -159,6 +171,17 @@ Object.defineProperty(exports, "privateKeyPath", { enumerable: true, }); +/** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + */ +export declare const protocol: string | undefined; +Object.defineProperty(exports, "protocol", { + get() { + return __config.get("protocol"); + }, + enumerable: true, +}); + /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -195,7 +218,7 @@ Object.defineProperty(exports, "username", { }); /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. */ export declare const warehouse: string | undefined; Object.defineProperty(exports, "warehouse", { diff --git a/sdk/nodejs/externalTable.ts b/sdk/nodejs/externalTable.ts index 5428c01d..0d83f2d4 100644 --- a/sdk/nodejs/externalTable.ts +++ b/sdk/nodejs/externalTable.ts @@ -26,6 +26,7 @@ import * as utilities from "./utilities"; * ], * comment: "External table", * database: "db", + * fileFormat: "TYPE = CSV FIELD_DELIMITER = '|'", * schema: "schema", * }); * ``` diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 343b1f16..512be44f 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -314,6 +314,10 @@ export { TagGrantArgs, TagGrantState } from "./tagGrant"; export type TagGrant = import("./tagGrant").TagGrant; export const TagGrant: typeof import("./tagGrant").TagGrant = null as any; +export { TagMaskingPolicyAssociationArgs, TagMaskingPolicyAssociationState } from "./tagMaskingPolicyAssociation"; +export type TagMaskingPolicyAssociation = import("./tagMaskingPolicyAssociation").TagMaskingPolicyAssociation; +export const TagMaskingPolicyAssociation: typeof import("./tagMaskingPolicyAssociation").TagMaskingPolicyAssociation = null as any; + export { TaskArgs, TaskState } from "./task"; export type Task = import("./task").Task; export const Task: typeof import("./task").Task = null as any; @@ -326,6 +330,10 @@ export { UserArgs, UserState } from "./user"; export type User = import("./user").User; export const User: typeof import("./user").User = null as any; +export { UserGrantArgs, UserGrantState } from "./userGrant"; +export type UserGrant = import("./userGrant").UserGrant; +export const UserGrant: typeof import("./userGrant").UserGrant = null as any; + export { UserOwnershipGrantArgs, UserOwnershipGrantState } from "./userOwnershipGrant"; export type UserOwnershipGrant = import("./userOwnershipGrant").UserOwnershipGrant; export const UserOwnershipGrant: typeof import("./userOwnershipGrant").UserOwnershipGrant = null as any; @@ -429,9 +437,11 @@ utilities.lazyLoad(exports, ["TableGrant"], () => require("./tableGrant")); utilities.lazyLoad(exports, ["Tag"], () => require("./tag")); utilities.lazyLoad(exports, ["TagAssociation"], () => require("./tagAssociation")); utilities.lazyLoad(exports, ["TagGrant"], () => require("./tagGrant")); +utilities.lazyLoad(exports, ["TagMaskingPolicyAssociation"], () => require("./tagMaskingPolicyAssociation")); utilities.lazyLoad(exports, ["Task"], () => require("./task")); utilities.lazyLoad(exports, ["TaskGrant"], () => require("./taskGrant")); utilities.lazyLoad(exports, ["User"], () => require("./user")); +utilities.lazyLoad(exports, ["UserGrant"], () => require("./userGrant")); utilities.lazyLoad(exports, ["UserOwnershipGrant"], () => require("./userOwnershipGrant")); utilities.lazyLoad(exports, ["UserPublicKeys"], () => require("./userPublicKeys")); utilities.lazyLoad(exports, ["View"], () => require("./view")); @@ -552,12 +562,16 @@ const _module = { return new TagAssociation(name, undefined, { urn }) case "snowflake:index/tagGrant:TagGrant": return new TagGrant(name, undefined, { urn }) + case "snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation": + return new TagMaskingPolicyAssociation(name, undefined, { urn }) case "snowflake:index/task:Task": return new Task(name, undefined, { urn }) case "snowflake:index/taskGrant:TaskGrant": return new TaskGrant(name, undefined, { urn }) case "snowflake:index/user:User": return new User(name, undefined, { urn }) + case "snowflake:index/userGrant:UserGrant": + return new UserGrant(name, undefined, { urn }) case "snowflake:index/userOwnershipGrant:UserOwnershipGrant": return new UserOwnershipGrant(name, undefined, { urn }) case "snowflake:index/userPublicKeys:UserPublicKeys": @@ -625,9 +639,11 @@ pulumi.runtime.registerResourceModule("snowflake", "index/tableGrant", _module) pulumi.runtime.registerResourceModule("snowflake", "index/tag", _module) pulumi.runtime.registerResourceModule("snowflake", "index/tagAssociation", _module) pulumi.runtime.registerResourceModule("snowflake", "index/tagGrant", _module) +pulumi.runtime.registerResourceModule("snowflake", "index/tagMaskingPolicyAssociation", _module) pulumi.runtime.registerResourceModule("snowflake", "index/task", _module) pulumi.runtime.registerResourceModule("snowflake", "index/taskGrant", _module) pulumi.runtime.registerResourceModule("snowflake", "index/user", _module) +pulumi.runtime.registerResourceModule("snowflake", "index/userGrant", _module) pulumi.runtime.registerResourceModule("snowflake", "index/userOwnershipGrant", _module) pulumi.runtime.registerResourceModule("snowflake", "index/userPublicKeys", _module) pulumi.runtime.registerResourceModule("snowflake", "index/view", _module) diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 10b43ac5..5efb2126 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -82,6 +82,10 @@ export class Provider extends pulumi.ProviderResource { * `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. */ public readonly privateKeyPath!: pulumi.Output; + /** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + */ + public readonly protocol!: pulumi.Output; /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -97,7 +101,7 @@ export class Provider extends pulumi.ProviderResource { */ public readonly username!: pulumi.Output; /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. */ public readonly warehouse!: pulumi.Output; @@ -131,9 +135,11 @@ export class Provider extends pulumi.ProviderResource { resourceInputs["oauthRedirectUrl"] = args?.oauthRedirectUrl ? pulumi.secret(args.oauthRedirectUrl) : undefined; resourceInputs["oauthRefreshToken"] = args?.oauthRefreshToken ? pulumi.secret(args.oauthRefreshToken) : undefined; resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined; + resourceInputs["port"] = pulumi.output(args ? args.port : undefined).apply(JSON.stringify); resourceInputs["privateKey"] = args?.privateKey ? pulumi.secret(args.privateKey) : undefined; resourceInputs["privateKeyPassphrase"] = args?.privateKeyPassphrase ? pulumi.secret(args.privateKeyPassphrase) : undefined; resourceInputs["privateKeyPath"] = args?.privateKeyPath ? pulumi.secret(args.privateKeyPath) : undefined; + resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["role"] = args ? args.role : undefined; resourceInputs["username"] = args ? args.username : undefined; @@ -196,6 +202,11 @@ export interface ProviderArgs { * `SNOWFLAKE_PASSWORD` environment variable. */ password?: pulumi.Input; + /** + * Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + * environment variable. + */ + port?: pulumi.Input; /** * Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from * `SNOWFLAKE_PRIVATE_KEY` environment variable. @@ -211,6 +222,10 @@ export interface ProviderArgs { * `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. */ privateKeyPath?: pulumi.Input; + /** + * Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + */ + protocol?: pulumi.Input; /** * [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the * `SNOWFLAKE_REGION` environment variable. @@ -226,7 +241,7 @@ export interface ProviderArgs { */ username: pulumi.Input; /** - * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + * Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. */ warehouse?: pulumi.Input; } diff --git a/sdk/nodejs/tagMaskingPolicyAssociation.ts b/sdk/nodejs/tagMaskingPolicyAssociation.ts new file mode 100644 index 00000000..481835ed --- /dev/null +++ b/sdk/nodejs/tagMaskingPolicyAssociation.ts @@ -0,0 +1,110 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## Import + * + * format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name + * + * ```sh + * $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' + * ``` + */ +export class TagMaskingPolicyAssociation extends pulumi.CustomResource { + /** + * Get an existing TagMaskingPolicyAssociation resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: TagMaskingPolicyAssociationState, opts?: pulumi.CustomResourceOptions): TagMaskingPolicyAssociation { + return new TagMaskingPolicyAssociation(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation'; + + /** + * Returns true if the given object is an instance of TagMaskingPolicyAssociation. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is TagMaskingPolicyAssociation { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === TagMaskingPolicyAssociation.__pulumiType; + } + + /** + * The the resource id of the masking policy + */ + public readonly maskingPolicyId!: pulumi.Output; + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + */ + public readonly tagId!: pulumi.Output; + + /** + * Create a TagMaskingPolicyAssociation resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: TagMaskingPolicyAssociationArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: TagMaskingPolicyAssociationArgs | TagMaskingPolicyAssociationState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as TagMaskingPolicyAssociationState | undefined; + resourceInputs["maskingPolicyId"] = state ? state.maskingPolicyId : undefined; + resourceInputs["tagId"] = state ? state.tagId : undefined; + } else { + const args = argsOrState as TagMaskingPolicyAssociationArgs | undefined; + if ((!args || args.maskingPolicyId === undefined) && !opts.urn) { + throw new Error("Missing required property 'maskingPolicyId'"); + } + if ((!args || args.tagId === undefined) && !opts.urn) { + throw new Error("Missing required property 'tagId'"); + } + resourceInputs["maskingPolicyId"] = args ? args.maskingPolicyId : undefined; + resourceInputs["tagId"] = args ? args.tagId : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(TagMaskingPolicyAssociation.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering TagMaskingPolicyAssociation resources. + */ +export interface TagMaskingPolicyAssociationState { + /** + * The the resource id of the masking policy + */ + maskingPolicyId?: pulumi.Input; + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + */ + tagId?: pulumi.Input; +} + +/** + * The set of arguments for constructing a TagMaskingPolicyAssociation resource. + */ +export interface TagMaskingPolicyAssociationArgs { + /** + * The the resource id of the masking policy + */ + maskingPolicyId: pulumi.Input; + /** + * Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + */ + tagId: pulumi.Input; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index ef444182..19b4154c 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -95,12 +95,14 @@ "tag.ts", "tagAssociation.ts", "tagGrant.ts", + "tagMaskingPolicyAssociation.ts", "task.ts", "taskGrant.ts", "types/index.ts", "types/input.ts", "types/output.ts", "user.ts", + "userGrant.ts", "userOwnershipGrant.ts", "userPublicKeys.ts", "utilities.ts", diff --git a/sdk/nodejs/userGrant.ts b/sdk/nodejs/userGrant.ts new file mode 100644 index 00000000..b752ee17 --- /dev/null +++ b/sdk/nodejs/userGrant.ts @@ -0,0 +1,169 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as snowflake from "@pulumi/snowflake"; + * + * const grant = new snowflake.UserGrant("grant", { + * privilege: "MONITOR", + * roles: ["role1"], + * userName: "user", + * withGrantOption: false, + * }); + * ``` + * + * ## Import + * + * format is user name | | | privilege | true/false for with_grant_option + * + * ```sh + * $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' + * ``` + */ +export class UserGrant extends pulumi.CustomResource { + /** + * Get an existing UserGrant resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: UserGrantState, opts?: pulumi.CustomResourceOptions): UserGrant { + return new UserGrant(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'snowflake:index/userGrant:UserGrant'; + + /** + * Returns true if the given object is an instance of UserGrant. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is UserGrant { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === UserGrant.__pulumiType; + } + + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + */ + public readonly enableMultipleGrants!: pulumi.Output; + /** + * The privilege to grant on the user. + */ + public readonly privilege!: pulumi.Output; + /** + * Grants privilege to these roles. + */ + public readonly roles!: pulumi.Output; + /** + * The name of the user on which to grant privileges. + */ + public readonly userName!: pulumi.Output; + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + */ + public readonly withGrantOption!: pulumi.Output; + + /** + * Create a UserGrant resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: UserGrantArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: UserGrantArgs | UserGrantState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as UserGrantState | undefined; + resourceInputs["enableMultipleGrants"] = state ? state.enableMultipleGrants : undefined; + resourceInputs["privilege"] = state ? state.privilege : undefined; + resourceInputs["roles"] = state ? state.roles : undefined; + resourceInputs["userName"] = state ? state.userName : undefined; + resourceInputs["withGrantOption"] = state ? state.withGrantOption : undefined; + } else { + const args = argsOrState as UserGrantArgs | undefined; + if ((!args || args.privilege === undefined) && !opts.urn) { + throw new Error("Missing required property 'privilege'"); + } + if ((!args || args.userName === undefined) && !opts.urn) { + throw new Error("Missing required property 'userName'"); + } + resourceInputs["enableMultipleGrants"] = args ? args.enableMultipleGrants : undefined; + resourceInputs["privilege"] = args ? args.privilege : undefined; + resourceInputs["roles"] = args ? args.roles : undefined; + resourceInputs["userName"] = args ? args.userName : undefined; + resourceInputs["withGrantOption"] = args ? args.withGrantOption : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(UserGrant.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering UserGrant resources. + */ +export interface UserGrantState { + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + */ + enableMultipleGrants?: pulumi.Input; + /** + * The privilege to grant on the user. + */ + privilege?: pulumi.Input; + /** + * Grants privilege to these roles. + */ + roles?: pulumi.Input[]>; + /** + * The name of the user on which to grant privileges. + */ + userName?: pulumi.Input; + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + */ + withGrantOption?: pulumi.Input; +} + +/** + * The set of arguments for constructing a UserGrant resource. + */ +export interface UserGrantArgs { + /** + * When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + * grants applied to roles and objects outside Terraform. + */ + enableMultipleGrants?: pulumi.Input; + /** + * The privilege to grant on the user. + */ + privilege: pulumi.Input; + /** + * Grants privilege to these roles. + */ + roles?: pulumi.Input[]>; + /** + * The name of the user on which to grant privileges. + */ + userName: pulumi.Input; + /** + * When this is set to true, allows the recipient role to grant the privileges to other roles. + */ + withGrantOption?: pulumi.Input; +} diff --git a/sdk/python/pulumi_snowflake/__init__.py b/sdk/python/pulumi_snowflake/__init__.py index 183e1535..22d40849 100644 --- a/sdk/python/pulumi_snowflake/__init__.py +++ b/sdk/python/pulumi_snowflake/__init__.py @@ -84,9 +84,11 @@ from .tag import * from .tag_association import * from .tag_grant import * +from .tag_masking_policy_association import * from .task import * from .task_grant import * from .user import * +from .user_grant import * from .user_ownership_grant import * from .user_public_keys import * from .view import * @@ -506,6 +508,14 @@ "snowflake:index/tagGrant:TagGrant": "TagGrant" } }, + { + "pkg": "snowflake", + "mod": "index/tagMaskingPolicyAssociation", + "fqn": "pulumi_snowflake", + "classes": { + "snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation": "TagMaskingPolicyAssociation" + } + }, { "pkg": "snowflake", "mod": "index/task", @@ -530,6 +540,14 @@ "snowflake:index/user:User": "User" } }, + { + "pkg": "snowflake", + "mod": "index/userGrant", + "fqn": "pulumi_snowflake", + "classes": { + "snowflake:index/userGrant:UserGrant": "UserGrant" + } + }, { "pkg": "snowflake", "mod": "index/userOwnershipGrant", diff --git a/sdk/python/pulumi_snowflake/config/__init__.pyi b/sdk/python/pulumi_snowflake/config/__init__.pyi index 4deb815c..9f5a62d4 100644 --- a/sdk/python/pulumi_snowflake/config/__init__.pyi +++ b/sdk/python/pulumi_snowflake/config/__init__.pyi @@ -65,6 +65,12 @@ Password for username+password auth. Cannot be used with `browser_auth` or `priv `SNOWFLAKE_PASSWORD` environment variable. """ +port: Optional[int] +""" +Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` +environment variable. +""" + privateKey: Optional[str] """ Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from @@ -83,6 +89,11 @@ Path to a private key for using keypair authentication. Cannot be used with `bro `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. """ +protocol: Optional[str] +""" +Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. +""" + region: Optional[str] """ [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the @@ -102,6 +113,6 @@ Username for username+password authentication. Can come from the `SNOWFLAKE_USER warehouse: Optional[str] """ -Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. +Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ diff --git a/sdk/python/pulumi_snowflake/config/vars.py b/sdk/python/pulumi_snowflake/config/vars.py index cbd5f667..6972a4a6 100644 --- a/sdk/python/pulumi_snowflake/config/vars.py +++ b/sdk/python/pulumi_snowflake/config/vars.py @@ -91,6 +91,14 @@ def password(self) -> Optional[str]: """ return __config__.get('password') + @property + def port(self) -> Optional[int]: + """ + Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + environment variable. + """ + return __config__.get_int('port') + @property def private_key(self) -> Optional[str]: """ @@ -115,6 +123,13 @@ def private_key_path(self) -> Optional[str]: """ return __config__.get('privateKeyPath') + @property + def protocol(self) -> Optional[str]: + """ + Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + """ + return __config__.get('protocol') + @property def region(self) -> Optional[str]: """ @@ -141,7 +156,7 @@ def username(self) -> Optional[str]: @property def warehouse(self) -> Optional[str]: """ - Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ return __config__.get('warehouse') diff --git a/sdk/python/pulumi_snowflake/external_table.py b/sdk/python/pulumi_snowflake/external_table.py index e6654393..f72a8557 100644 --- a/sdk/python/pulumi_snowflake/external_table.py +++ b/sdk/python/pulumi_snowflake/external_table.py @@ -534,6 +534,7 @@ def __init__(__self__, ], comment="External table", database="db", + file_format="TYPE = CSV FIELD_DELIMITER = '|'", schema="schema") ``` @@ -588,6 +589,7 @@ def __init__(__self__, ], comment="External table", database="db", + file_format="TYPE = CSV FIELD_DELIMITER = '|'", schema="schema") ``` diff --git a/sdk/python/pulumi_snowflake/provider.py b/sdk/python/pulumi_snowflake/provider.py index c3d64d55..a7f873ca 100644 --- a/sdk/python/pulumi_snowflake/provider.py +++ b/sdk/python/pulumi_snowflake/provider.py @@ -26,9 +26,11 @@ def __init__(__self__, *, oauth_redirect_url: Optional[pulumi.Input[str]] = None, oauth_refresh_token: Optional[pulumi.Input[str]] = None, password: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, private_key: Optional[pulumi.Input[str]] = None, private_key_passphrase: Optional[pulumi.Input[str]] = None, private_key_path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, role: Optional[pulumi.Input[str]] = None, warehouse: Optional[pulumi.Input[str]] = None): """ @@ -52,15 +54,18 @@ def __init__(__self__, *, variable. :param pulumi.Input[str] password: Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from `SNOWFLAKE_PASSWORD` environment variable. + :param pulumi.Input[int] port: Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + environment variable. :param pulumi.Input[str] private_key: Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY` environment variable. :param pulumi.Input[str] private_key_passphrase: 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 :param pulumi.Input[str] private_key_path: Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. + :param pulumi.Input[str] protocol: Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. :param pulumi.Input[str] role: Snowflake role to use for operations. If left unset, default role for user will be used. Can come from the `SNOWFLAKE_ROLE` environment variable. - :param pulumi.Input[str] warehouse: Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + :param pulumi.Input[str] warehouse: Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ pulumi.set(__self__, "account", account) pulumi.set(__self__, "region", region) @@ -83,12 +88,16 @@ def __init__(__self__, *, pulumi.set(__self__, "oauth_refresh_token", oauth_refresh_token) if password is not None: pulumi.set(__self__, "password", password) + if port is not None: + pulumi.set(__self__, "port", port) if private_key is not None: pulumi.set(__self__, "private_key", private_key) if private_key_passphrase is not None: pulumi.set(__self__, "private_key_passphrase", private_key_passphrase) if private_key_path is not None: pulumi.set(__self__, "private_key_path", private_key_path) + if protocol is not None: + pulumi.set(__self__, "protocol", protocol) if role is not None: pulumi.set(__self__, "role", role) if warehouse is not None: @@ -245,6 +254,19 @@ def password(self) -> Optional[pulumi.Input[str]]: def password(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "password", value) + @property + @pulumi.getter + def port(self) -> Optional[pulumi.Input[int]]: + """ + Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + environment variable. + """ + return pulumi.get(self, "port") + + @port.setter + def port(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "port", value) + @property @pulumi.getter(name="privateKey") def private_key(self) -> Optional[pulumi.Input[str]]: @@ -284,6 +306,18 @@ def private_key_path(self) -> Optional[pulumi.Input[str]]: def private_key_path(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "private_key_path", value) + @property + @pulumi.getter + def protocol(self) -> Optional[pulumi.Input[str]]: + """ + Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + """ + return pulumi.get(self, "protocol") + + @protocol.setter + def protocol(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "protocol", value) + @property @pulumi.getter def role(self) -> Optional[pulumi.Input[str]]: @@ -301,7 +335,7 @@ def role(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def warehouse(self) -> Optional[pulumi.Input[str]]: """ - Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ return pulumi.get(self, "warehouse") @@ -325,9 +359,11 @@ def __init__(__self__, oauth_redirect_url: Optional[pulumi.Input[str]] = None, oauth_refresh_token: Optional[pulumi.Input[str]] = None, password: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, private_key: Optional[pulumi.Input[str]] = None, private_key_passphrase: Optional[pulumi.Input[str]] = None, private_key_path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, region: Optional[pulumi.Input[str]] = None, role: Optional[pulumi.Input[str]] = None, username: Optional[pulumi.Input[str]] = None, @@ -357,18 +393,21 @@ def __init__(__self__, variable. :param pulumi.Input[str] password: Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be source from `SNOWFLAKE_PASSWORD` environment variable. + :param pulumi.Input[int] port: Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` + environment variable. :param pulumi.Input[str] private_key: Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY` environment variable. :param pulumi.Input[str] private_key_passphrase: 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 :param pulumi.Input[str] private_key_path: Path to a private key for using keypair authentication. Cannot be used with `browser_auth`, `oauth_access_token` or `password`. Can be source from `SNOWFLAKE_PRIVATE_KEY_PATH` environment variable. + :param pulumi.Input[str] protocol: Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. :param pulumi.Input[str] region: [Snowflake region](https://docs.snowflake.com/en/user-guide/intro-regions.html) to use. Can be source from the `SNOWFLAKE_REGION` environment variable. :param pulumi.Input[str] role: Snowflake role to use for operations. If left unset, default role for user will be used. Can come from the `SNOWFLAKE_ROLE` environment variable. :param pulumi.Input[str] username: Username for username+password authentication. Can come from the `SNOWFLAKE_USER` environment variable. - :param pulumi.Input[str] warehouse: Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + :param pulumi.Input[str] warehouse: Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ ... @overload @@ -407,9 +446,11 @@ def _internal_init(__self__, oauth_redirect_url: Optional[pulumi.Input[str]] = None, oauth_refresh_token: Optional[pulumi.Input[str]] = None, password: Optional[pulumi.Input[str]] = None, + port: Optional[pulumi.Input[int]] = None, private_key: Optional[pulumi.Input[str]] = None, private_key_passphrase: Optional[pulumi.Input[str]] = None, private_key_path: Optional[pulumi.Input[str]] = None, + protocol: Optional[pulumi.Input[str]] = None, region: Optional[pulumi.Input[str]] = None, role: Optional[pulumi.Input[str]] = None, username: Optional[pulumi.Input[str]] = None, @@ -435,9 +476,11 @@ def _internal_init(__self__, __props__.__dict__["oauth_redirect_url"] = None if oauth_redirect_url is None else pulumi.Output.secret(oauth_redirect_url) __props__.__dict__["oauth_refresh_token"] = None if oauth_refresh_token is None else pulumi.Output.secret(oauth_refresh_token) __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password) + __props__.__dict__["port"] = pulumi.Output.from_input(port).apply(pulumi.runtime.to_json) if port is not None else None __props__.__dict__["private_key"] = None if private_key is None else pulumi.Output.secret(private_key) __props__.__dict__["private_key_passphrase"] = None if private_key_passphrase is None else pulumi.Output.secret(private_key_passphrase) __props__.__dict__["private_key_path"] = None if private_key_path is None else pulumi.Output.secret(private_key_path) + __props__.__dict__["protocol"] = protocol if region is None and not opts.urn: raise TypeError("Missing required property 'region'") __props__.__dict__["region"] = region @@ -559,6 +602,14 @@ def private_key_path(self) -> pulumi.Output[Optional[str]]: """ return pulumi.get(self, "private_key_path") + @property + @pulumi.getter + def protocol(self) -> pulumi.Output[Optional[str]]: + """ + Support custom protocols to snowflake go driver. Can be sourced from `SNOWFLAKE_PROTOCOL` environment variable. + """ + return pulumi.get(self, "protocol") + @property @pulumi.getter def region(self) -> pulumi.Output[str]: @@ -589,7 +640,7 @@ def username(self) -> pulumi.Output[str]: @pulumi.getter def warehouse(self) -> pulumi.Output[Optional[str]]: """ - Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE enviornment variable. + Sets the default warehouse. Optional. Can be sourced from SNOWFLAKE_WAREHOUSE environment variable. """ return pulumi.get(self, "warehouse") diff --git a/sdk/python/pulumi_snowflake/tag_masking_policy_association.py b/sdk/python/pulumi_snowflake/tag_masking_policy_association.py new file mode 100644 index 00000000..b0ab3f9a --- /dev/null +++ b/sdk/python/pulumi_snowflake/tag_masking_policy_association.py @@ -0,0 +1,206 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['TagMaskingPolicyAssociationArgs', 'TagMaskingPolicyAssociation'] + +@pulumi.input_type +class TagMaskingPolicyAssociationArgs: + def __init__(__self__, *, + masking_policy_id: pulumi.Input[str], + tag_id: pulumi.Input[str]): + """ + The set of arguments for constructing a TagMaskingPolicyAssociation resource. + :param pulumi.Input[str] masking_policy_id: The the resource id of the masking policy + :param pulumi.Input[str] tag_id: Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + pulumi.set(__self__, "masking_policy_id", masking_policy_id) + pulumi.set(__self__, "tag_id", tag_id) + + @property + @pulumi.getter(name="maskingPolicyId") + def masking_policy_id(self) -> pulumi.Input[str]: + """ + The the resource id of the masking policy + """ + return pulumi.get(self, "masking_policy_id") + + @masking_policy_id.setter + def masking_policy_id(self, value: pulumi.Input[str]): + pulumi.set(self, "masking_policy_id", value) + + @property + @pulumi.getter(name="tagId") + def tag_id(self) -> pulumi.Input[str]: + """ + Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + return pulumi.get(self, "tag_id") + + @tag_id.setter + def tag_id(self, value: pulumi.Input[str]): + pulumi.set(self, "tag_id", value) + + +@pulumi.input_type +class _TagMaskingPolicyAssociationState: + def __init__(__self__, *, + masking_policy_id: Optional[pulumi.Input[str]] = None, + tag_id: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering TagMaskingPolicyAssociation resources. + :param pulumi.Input[str] masking_policy_id: The the resource id of the masking policy + :param pulumi.Input[str] tag_id: Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + if masking_policy_id is not None: + pulumi.set(__self__, "masking_policy_id", masking_policy_id) + if tag_id is not None: + pulumi.set(__self__, "tag_id", tag_id) + + @property + @pulumi.getter(name="maskingPolicyId") + def masking_policy_id(self) -> Optional[pulumi.Input[str]]: + """ + The the resource id of the masking policy + """ + return pulumi.get(self, "masking_policy_id") + + @masking_policy_id.setter + def masking_policy_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "masking_policy_id", value) + + @property + @pulumi.getter(name="tagId") + def tag_id(self) -> Optional[pulumi.Input[str]]: + """ + Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + return pulumi.get(self, "tag_id") + + @tag_id.setter + def tag_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "tag_id", value) + + +class TagMaskingPolicyAssociation(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + masking_policy_id: Optional[pulumi.Input[str]] = None, + tag_id: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + ## Import + + format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name + + ```sh + $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] masking_policy_id: The the resource id of the masking policy + :param pulumi.Input[str] tag_id: Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: TagMaskingPolicyAssociationArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## Import + + format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name + + ```sh + $ pulumi import snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation example 'tag_db|tag_schema|tag_name|mp_db|mp_schema|mp_name' + ``` + + :param str resource_name: The name of the resource. + :param TagMaskingPolicyAssociationArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(TagMaskingPolicyAssociationArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + masking_policy_id: Optional[pulumi.Input[str]] = None, + tag_id: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = TagMaskingPolicyAssociationArgs.__new__(TagMaskingPolicyAssociationArgs) + + if masking_policy_id is None and not opts.urn: + raise TypeError("Missing required property 'masking_policy_id'") + __props__.__dict__["masking_policy_id"] = masking_policy_id + if tag_id is None and not opts.urn: + raise TypeError("Missing required property 'tag_id'") + __props__.__dict__["tag_id"] = tag_id + super(TagMaskingPolicyAssociation, __self__).__init__( + 'snowflake:index/tagMaskingPolicyAssociation:TagMaskingPolicyAssociation', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + masking_policy_id: Optional[pulumi.Input[str]] = None, + tag_id: Optional[pulumi.Input[str]] = None) -> 'TagMaskingPolicyAssociation': + """ + Get an existing TagMaskingPolicyAssociation resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] masking_policy_id: The the resource id of the masking policy + :param pulumi.Input[str] tag_id: Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _TagMaskingPolicyAssociationState.__new__(_TagMaskingPolicyAssociationState) + + __props__.__dict__["masking_policy_id"] = masking_policy_id + __props__.__dict__["tag_id"] = tag_id + return TagMaskingPolicyAssociation(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="maskingPolicyId") + def masking_policy_id(self) -> pulumi.Output[str]: + """ + The the resource id of the masking policy + """ + return pulumi.get(self, "masking_policy_id") + + @property + @pulumi.getter(name="tagId") + def tag_id(self) -> pulumi.Output[str]: + """ + Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) + """ + return pulumi.get(self, "tag_id") + diff --git a/sdk/python/pulumi_snowflake/user_grant.py b/sdk/python/pulumi_snowflake/user_grant.py new file mode 100644 index 00000000..fbac4cc4 --- /dev/null +++ b/sdk/python/pulumi_snowflake/user_grant.py @@ -0,0 +1,380 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['UserGrantArgs', 'UserGrant'] + +@pulumi.input_type +class UserGrantArgs: + def __init__(__self__, *, + privilege: pulumi.Input[str], + user_name: pulumi.Input[str], + enable_multiple_grants: Optional[pulumi.Input[bool]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + with_grant_option: Optional[pulumi.Input[bool]] = None): + """ + The set of arguments for constructing a UserGrant resource. + :param pulumi.Input[str] privilege: The privilege to grant on the user. + :param pulumi.Input[str] user_name: The name of the user on which to grant privileges. + :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. + :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + pulumi.set(__self__, "privilege", privilege) + pulumi.set(__self__, "user_name", user_name) + if enable_multiple_grants is not None: + pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants) + if roles is not None: + pulumi.set(__self__, "roles", roles) + if with_grant_option is not None: + pulumi.set(__self__, "with_grant_option", with_grant_option) + + @property + @pulumi.getter + def privilege(self) -> pulumi.Input[str]: + """ + The privilege to grant on the user. + """ + return pulumi.get(self, "privilege") + + @privilege.setter + def privilege(self, value: pulumi.Input[str]): + pulumi.set(self, "privilege", value) + + @property + @pulumi.getter(name="userName") + def user_name(self) -> pulumi.Input[str]: + """ + The name of the user on which to grant privileges. + """ + return pulumi.get(self, "user_name") + + @user_name.setter + def user_name(self, value: pulumi.Input[str]): + pulumi.set(self, "user_name", value) + + @property + @pulumi.getter(name="enableMultipleGrants") + def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]: + """ + When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + """ + return pulumi.get(self, "enable_multiple_grants") + + @enable_multiple_grants.setter + def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "enable_multiple_grants", value) + + @property + @pulumi.getter + def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Grants privilege to these roles. + """ + return pulumi.get(self, "roles") + + @roles.setter + def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "roles", value) + + @property + @pulumi.getter(name="withGrantOption") + def with_grant_option(self) -> Optional[pulumi.Input[bool]]: + """ + When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + return pulumi.get(self, "with_grant_option") + + @with_grant_option.setter + def with_grant_option(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "with_grant_option", value) + + +@pulumi.input_type +class _UserGrantState: + def __init__(__self__, *, + enable_multiple_grants: Optional[pulumi.Input[bool]] = None, + privilege: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + with_grant_option: Optional[pulumi.Input[bool]] = None): + """ + Input properties used for looking up and filtering UserGrant resources. + :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + :param pulumi.Input[str] privilege: The privilege to grant on the user. + :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. + :param pulumi.Input[str] user_name: The name of the user on which to grant privileges. + :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + if enable_multiple_grants is not None: + pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants) + if privilege is not None: + pulumi.set(__self__, "privilege", privilege) + if roles is not None: + pulumi.set(__self__, "roles", roles) + if user_name is not None: + pulumi.set(__self__, "user_name", user_name) + if with_grant_option is not None: + pulumi.set(__self__, "with_grant_option", with_grant_option) + + @property + @pulumi.getter(name="enableMultipleGrants") + def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]: + """ + When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + """ + return pulumi.get(self, "enable_multiple_grants") + + @enable_multiple_grants.setter + def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "enable_multiple_grants", value) + + @property + @pulumi.getter + def privilege(self) -> Optional[pulumi.Input[str]]: + """ + The privilege to grant on the user. + """ + return pulumi.get(self, "privilege") + + @privilege.setter + def privilege(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "privilege", value) + + @property + @pulumi.getter + def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Grants privilege to these roles. + """ + return pulumi.get(self, "roles") + + @roles.setter + def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "roles", value) + + @property + @pulumi.getter(name="userName") + def user_name(self) -> Optional[pulumi.Input[str]]: + """ + The name of the user on which to grant privileges. + """ + return pulumi.get(self, "user_name") + + @user_name.setter + def user_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "user_name", value) + + @property + @pulumi.getter(name="withGrantOption") + def with_grant_option(self) -> Optional[pulumi.Input[bool]]: + """ + When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + return pulumi.get(self, "with_grant_option") + + @with_grant_option.setter + def with_grant_option(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "with_grant_option", value) + + +class UserGrant(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + enable_multiple_grants: Optional[pulumi.Input[bool]] = None, + privilege: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + with_grant_option: Optional[pulumi.Input[bool]] = None, + __props__=None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_snowflake as snowflake + + grant = snowflake.UserGrant("grant", + privilege="MONITOR", + roles=["role1"], + user_name="user", + with_grant_option=False) + ``` + + ## Import + + format is user name | | | privilege | true/false for with_grant_option + + ```sh + $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + :param pulumi.Input[str] privilege: The privilege to grant on the user. + :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. + :param pulumi.Input[str] user_name: The name of the user on which to grant privileges. + :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: UserGrantArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_snowflake as snowflake + + grant = snowflake.UserGrant("grant", + privilege="MONITOR", + roles=["role1"], + user_name="user", + with_grant_option=False) + ``` + + ## Import + + format is user name | | | privilege | true/false for with_grant_option + + ```sh + $ pulumi import snowflake:index/userGrant:UserGrant example 'userName|||MONITOR|true' + ``` + + :param str resource_name: The name of the resource. + :param UserGrantArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(UserGrantArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + enable_multiple_grants: Optional[pulumi.Input[bool]] = None, + privilege: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + with_grant_option: Optional[pulumi.Input[bool]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = UserGrantArgs.__new__(UserGrantArgs) + + __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants + if privilege is None and not opts.urn: + raise TypeError("Missing required property 'privilege'") + __props__.__dict__["privilege"] = privilege + __props__.__dict__["roles"] = roles + if user_name is None and not opts.urn: + raise TypeError("Missing required property 'user_name'") + __props__.__dict__["user_name"] = user_name + __props__.__dict__["with_grant_option"] = with_grant_option + super(UserGrant, __self__).__init__( + 'snowflake:index/userGrant:UserGrant', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + enable_multiple_grants: Optional[pulumi.Input[bool]] = None, + privilege: Optional[pulumi.Input[str]] = None, + roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + user_name: Optional[pulumi.Input[str]] = None, + with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'UserGrant': + """ + Get an existing UserGrant resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + :param pulumi.Input[str] privilege: The privilege to grant on the user. + :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. + :param pulumi.Input[str] user_name: The name of the user on which to grant privileges. + :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _UserGrantState.__new__(_UserGrantState) + + __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants + __props__.__dict__["privilege"] = privilege + __props__.__dict__["roles"] = roles + __props__.__dict__["user_name"] = user_name + __props__.__dict__["with_grant_option"] = with_grant_option + return UserGrant(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="enableMultipleGrants") + def enable_multiple_grants(self) -> pulumi.Output[Optional[bool]]: + """ + When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke + grants applied to roles and objects outside Terraform. + """ + return pulumi.get(self, "enable_multiple_grants") + + @property + @pulumi.getter + def privilege(self) -> pulumi.Output[str]: + """ + The privilege to grant on the user. + """ + return pulumi.get(self, "privilege") + + @property + @pulumi.getter + def roles(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + Grants privilege to these roles. + """ + return pulumi.get(self, "roles") + + @property + @pulumi.getter(name="userName") + def user_name(self) -> pulumi.Output[str]: + """ + The name of the user on which to grant privileges. + """ + return pulumi.get(self, "user_name") + + @property + @pulumi.getter(name="withGrantOption") + def with_grant_option(self) -> pulumi.Output[Optional[bool]]: + """ + When this is set to true, allows the recipient role to grant the privileges to other roles. + """ + return pulumi.get(self, "with_grant_option") +