Skip to content

Commit

Permalink
Upgrade to v0.40.0 of the Snowflake Terraform Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Jul 20, 2022
1 parent ff2ea7f commit f10c345
Show file tree
Hide file tree
Showing 19 changed files with 295 additions and 73 deletions.
36 changes: 23 additions & 13 deletions provider/cmd/pulumi-resource-snowflake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2625,8 +2625,7 @@
},
"replicationConfiguration": {
"$ref": "#/types/snowflake:index/DatabaseReplicationConfiguration:DatabaseReplicationConfiguration",
"description": "When set, specifies the configurations for database replication.\n",
"willReplaceOnChanges": true
"description": "When set, specifies the configurations for database replication.\n"
},
"tags": {
"type": "array",
Expand Down Expand Up @@ -2668,8 +2667,7 @@
},
"replicationConfiguration": {
"$ref": "#/types/snowflake:index/DatabaseReplicationConfiguration:DatabaseReplicationConfiguration",
"description": "When set, specifies the configurations for database replication.\n",
"willReplaceOnChanges": true
"description": "When set, specifies the configurations for database replication.\n"
},
"tags": {
"type": "array",
Expand Down Expand Up @@ -3644,8 +3642,7 @@
}
},
"required": [
"databaseName",
"schemaName"
"databaseName"
],
"inputProperties": {
"databaseName": {
Expand Down Expand Up @@ -3701,8 +3698,7 @@
}
},
"requiredInputs": [
"databaseName",
"schemaName"
"databaseName"
],
"stateInputs": {
"description": "Input properties used for looking up and filtering ExternalTableGrant resources.\n",
Expand Down Expand Up @@ -6319,7 +6315,7 @@
}
},
"snowflake:index/pipeGrant:PipeGrant": {
"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.PipeGrant(\"grant\", {\n databaseName: \"db\",\n onFuture: false,\n privilege: \"operate\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n schemaName: \"schema\",\n sequenceName: \"sequence\",\n withGrantOption: false,\n});\n```\n```java\npackage generated_program;\n\nimport java.util.*;\nimport java.io.*;\nimport java.nio.*;\nimport com.pulumi.*;\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 PipeGrant(\"grant\", PipeGrantArgs.builder() \n .databaseName(\"db\")\n .onFuture(false)\n .privilege(\"operate\")\n .roles( \n \"role1\",\n \"role2\")\n .schemaName(\"schema\")\n .sequenceName(\"sequence\")\n .withGrantOption(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n grant:\n type: snowflake:PipeGrant\n properties:\n databaseName: db\n onFuture: false\n privilege: operate\n roles:\n - role1\n - role2\n schemaName: schema\n sequenceName: sequence\n withGrantOption: false\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | pipe name | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/pipeGrant:PipeGrant example 'dbName|schemaName|pipeName|OPERATE|false'\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 grant = new snowflake.PipeGrant(\"grant\", {\n databaseName: \"db\",\n onFuture: false,\n pipeName: \"pipe\",\n privilege: \"operate\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n schemaName: \"schema\",\n withGrantOption: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ngrant = snowflake.PipeGrant(\"grant\",\n database_name=\"db\",\n on_future=False,\n pipe_name=\"pipe\",\n privilege=\"operate\",\n roles=[\n \"role1\",\n \"role2\",\n ],\n schema_name=\"schema\",\n with_grant_option=False)\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var grant = new Snowflake.PipeGrant(\"grant\", new Snowflake.PipeGrantArgs\n {\n DatabaseName = \"db\",\n OnFuture = false,\n PipeName = \"pipe\",\n Privilege = \"operate\",\n Roles = \n {\n \"role1\",\n \"role2\",\n },\n SchemaName = \"schema\",\n WithGrantOption = false,\n });\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.NewPipeGrant(ctx, \"grant\", \u0026snowflake.PipeGrantArgs{\n\t\t\tDatabaseName: pulumi.String(\"db\"),\n\t\t\tOnFuture: pulumi.Bool(false),\n\t\t\tPipeName: pulumi.String(\"pipe\"),\n\t\t\tPrivilege: pulumi.String(\"operate\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"role1\"),\n\t\t\t\tpulumi.String(\"role2\"),\n\t\t\t},\n\t\t\tSchemaName: pulumi.String(\"schema\"),\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 java.util.*;\nimport java.io.*;\nimport java.nio.*;\nimport com.pulumi.*;\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 PipeGrant(\"grant\", PipeGrantArgs.builder() \n .databaseName(\"db\")\n .onFuture(false)\n .pipeName(\"pipe\")\n .privilege(\"operate\")\n .roles( \n \"role1\",\n \"role2\")\n .schemaName(\"schema\")\n .withGrantOption(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n grant:\n type: snowflake:PipeGrant\n properties:\n databaseName: db\n onFuture: false\n pipeName: pipe\n privilege: operate\n roles:\n - role1\n - role2\n schemaName: schema\n withGrantOption: false\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | pipe name | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/pipeGrant:PipeGrant example 'dbName|schemaName|pipeName|OPERATE|false'\n```\n\n ",
"properties": {
"databaseName": {
"type": "string",
Expand Down Expand Up @@ -8410,14 +8406,14 @@
}
},
"snowflake:index/share:Share": {
"description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst test = new snowflake.Share(\"test\", {\n comment: \"cool comment\",\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ntest = snowflake.Share(\"test\", comment=\"cool comment\")\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var test = new Snowflake.Share(\"test\", new Snowflake.ShareArgs\n {\n Comment = \"cool comment\",\n });\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.NewShare(ctx, \"test\", \u0026snowflake.ShareArgs{\n\t\t\tComment: pulumi.String(\"cool comment\"),\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 java.util.*;\nimport java.io.*;\nimport java.nio.*;\nimport com.pulumi.*;\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 test = new Share(\"test\", ShareArgs.builder() \n .comment(\"cool comment\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: snowflake:Share\n properties:\n comment: cool comment\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n\n\n```sh\n $ pulumi import snowflake:index/share:Share example name\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 test = new snowflake.Share(\"test\", {\n accounts: \"organizationName.accountName\",\n comment: \"cool comment\",\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ntest = snowflake.Share(\"test\",\n accounts=\"organizationName.accountName\",\n comment=\"cool comment\")\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var test = new Snowflake.Share(\"test\", new Snowflake.ShareArgs\n {\n Accounts = \"organizationName.accountName\",\n Comment = \"cool comment\",\n });\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.NewShare(ctx, \"test\", \u0026snowflake.ShareArgs{\n\t\t\tAccounts: pulumi.StringArray(\"organizationName.accountName\"),\n\t\t\tComment: pulumi.String(\"cool comment\"),\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 java.util.*;\nimport java.io.*;\nimport java.nio.*;\nimport com.pulumi.*;\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 test = new Share(\"test\", ShareArgs.builder() \n .accounts(\"organizationName.accountName\")\n .comment(\"cool comment\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: snowflake:Share\n properties:\n accounts: organizationName.accountName\n comment: cool comment\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n\n\n```sh\n $ pulumi import snowflake:index/share:Share example name\n```\n\n ",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of accounts to be added to the share.\n"
"description": "A list of accounts to be added to the share. Values should not be the account locator, but in the form of\n'organization_name.account_name\n"
},
"comment": {
"type": "string",
Expand All @@ -8437,7 +8433,7 @@
"items": {
"type": "string"
},
"description": "A list of accounts to be added to the share.\n"
"description": "A list of accounts to be added to the share. Values should not be the account locator, but in the form of\n'organization_name.account_name\n"
},
"comment": {
"type": "string",
Expand All @@ -8457,7 +8453,7 @@
"items": {
"type": "string"
},
"description": "A list of accounts to be added to the share.\n"
"description": "A list of accounts to be added to the share. Values should not be the account locator, but in the form of\n'organization_name.account_name\n"
},
"comment": {
"type": "string",
Expand Down Expand Up @@ -9041,6 +9037,10 @@
"type": "string",
"description": "Name of the table the stream will monitor.\n"
},
"onView": {
"type": "string",
"description": "Name of the view the stream will monitor.\n"
},
"owner": {
"type": "string",
"description": "Name of the role that owns the stream.\n"
Expand Down Expand Up @@ -9090,6 +9090,11 @@
"description": "Name of the table the stream will monitor.\n",
"willReplaceOnChanges": true
},
"onView": {
"type": "string",
"description": "Name of the view the stream will monitor.\n",
"willReplaceOnChanges": true
},
"schema": {
"type": "string",
"description": "The schema in which to create the stream.\n",
Expand Down Expand Up @@ -9137,6 +9142,11 @@
"description": "Name of the table the stream will monitor.\n",
"willReplaceOnChanges": true
},
"onView": {
"type": "string",
"description": "Name of the view the stream will monitor.\n",
"willReplaceOnChanges": true
},
"owner": {
"type": "string",
"description": "Name of the role that owns the stream.\n"
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ replace (
)

require (
github.com/Snowflake-Labs/terraform-provider-snowflake v0.37.1
github.com/Snowflake-Labs/terraform-provider-snowflake v0.40.0
github.com/pulumi/pulumi-terraform-bridge/v3 v3.24.1
github.com/pulumi/pulumi/sdk/v3 v3.33.1
)
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg=
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.37.1 h1:RFC36pnj6ByXInm5ImJyBYpMa0VKi+s1ZOUUcqOywzI=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.37.1/go.mod h1:WLrVPEldpgwFnb+iMHuR2hHgY3D8jlr8thz45Enw9fQ=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.40.0 h1:O0RkqYd8orc9dZJDfoG1lU9qNVmnnOCFR7rHDu38bMY=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.40.0/go.mod h1:WLrVPEldpgwFnb+iMHuR2hHgY3D8jlr8thz45Enw9fQ=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down
6 changes: 3 additions & 3 deletions sdk/dotnet/ExternalTableGrant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public partial class ExternalTableGrant : Pulumi.CustomResource
/// The name of the schema containing the current or future external tables on which to grant privileges.
/// </summary>
[Output("schemaName")]
public Output<string> SchemaName { get; private set; } = null!;
public Output<string?> SchemaName { get; private set; } = null!;

/// <summary>
/// Grants privilege to these shares (only valid if on_future is false).
Expand Down Expand Up @@ -206,8 +206,8 @@ public InputList<string> Roles
/// <summary>
/// The name of the schema containing the current or future external tables on which to grant privileges.
/// </summary>
[Input("schemaName", required: true)]
public Input<string> SchemaName { get; set; } = null!;
[Input("schemaName")]
public Input<string>? SchemaName { get; set; }

[Input("shares")]
private InputList<string>? _shares;
Expand Down
29 changes: 29 additions & 0 deletions sdk/dotnet/PipeGrant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@
namespace Pulumi.Snowflake
{
/// <summary>
/// ## Example Usage
///
/// ```csharp
/// using Pulumi;
/// using Snowflake = Pulumi.Snowflake;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// var grant = new Snowflake.PipeGrant("grant", new Snowflake.PipeGrantArgs
/// {
/// DatabaseName = "db",
/// OnFuture = false,
/// PipeName = "pipe",
/// Privilege = "operate",
/// Roles =
/// {
/// "role1",
/// "role2",
/// },
/// SchemaName = "schema",
/// WithGrantOption = false,
/// });
/// }
///
/// }
/// ```
///
/// ## Import
///
/// # format is database name | schema name | pipe name | privilege | true/false for with_grant_option
Expand Down
10 changes: 7 additions & 3 deletions sdk/dotnet/Share.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Pulumi.Snowflake
/// {
/// var test = new Snowflake.Share("test", new Snowflake.ShareArgs
/// {
/// Accounts = "organizationName.accountName",
/// Comment = "cool comment",
/// });
/// }
Expand All @@ -39,7 +40,8 @@ namespace Pulumi.Snowflake
public partial class Share : Pulumi.CustomResource
{
/// <summary>
/// A list of accounts to be added to the share.
/// A list of accounts to be added to the share. Values should not be the account locator, but in the form of
/// 'organization_name.account_name
/// </summary>
[Output("accounts")]
public Output<ImmutableArray<string>> Accounts { get; private set; } = null!;
Expand Down Expand Up @@ -106,7 +108,8 @@ public sealed class ShareArgs : Pulumi.ResourceArgs
private InputList<string>? _accounts;

/// <summary>
/// A list of accounts to be added to the share.
/// A list of accounts to be added to the share. Values should not be the account locator, but in the form of
/// 'organization_name.account_name
/// </summary>
public InputList<string> Accounts
{
Expand Down Expand Up @@ -137,7 +140,8 @@ public sealed class ShareState : Pulumi.ResourceArgs
private InputList<string>? _accounts;

/// <summary>
/// A list of accounts to be added to the share.
/// A list of accounts to be added to the share. Values should not be the account locator, but in the form of
/// 'organization_name.account_name
/// </summary>
public InputList<string> Accounts
{
Expand Down
Loading

0 comments on commit f10c345

Please sign in to comment.