Skip to content

Commit

Permalink
Upgrade terraform-provider-snowflake to v0.66.1 (#261)
Browse files Browse the repository at this point in the history
* make tfgen

* make build_sdks

---------

Co-authored-by: pulumi-bot <runner@fv-az791-396.q5xd3r0til1upljjm2nptte5db.jx.internal.cloudapp.net>
  • Loading branch information
pulumi-bot and pulumi-bot authored Jun 5, 2023
1 parent 8013f02 commit ed7f59e
Show file tree
Hide file tree
Showing 30 changed files with 897 additions and 1,110 deletions.
6 changes: 4 additions & 2 deletions provider/cmd/pulumi-resource-snowflake/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,7 @@
"fromReplica": "from_replica",
"fromShare": "from_share",
"isTransient": "is_transient",
"replicationConfiguration": "replication_configuration",
"tags": "tag"
"replicationConfiguration": "replication_configuration"
},
"snowflake:index/databaseGrant:DatabaseGrant": {
"databaseName": "database_name",
Expand Down Expand Up @@ -1145,6 +1144,9 @@
"snowflake:index/getDatabaseRoles:getDatabaseRoles": {
"databaseRoles": "database_roles"
},
"snowflake:index/getDatabases:getDatabases": {
"startsWith": "starts_with"
},
"snowflake:index/getDatabasesDatabase:getDatabasesDatabase": {
"createdOn": "created_on",
"isCurrent": "is_current",
Expand Down
89 changes: 39 additions & 50 deletions provider/cmd/pulumi-resource-snowflake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,31 +285,6 @@
"accounts"
]
},
"snowflake:index/DatabaseTag:DatabaseTag": {
"properties": {
"database": {
"type": "string",
"description": "Name of the database that the tag was created in.\n"
},
"name": {
"type": "string",
"description": "Tag name, e.g. department.\n"
},
"schema": {
"type": "string",
"description": "Name of the schema that the tag was created in.\n"
},
"value": {
"type": "string",
"description": "Tag value, e.g. marketing_info.\n"
}
},
"type": "object",
"required": [
"name",
"value"
]
},
"snowflake:index/ExternalFunctionArg:ExternalFunctionArg": {
"properties": {
"name": {
Expand Down Expand Up @@ -3103,14 +3078,6 @@
"replicationConfiguration": {
"$ref": "#/types/snowflake:index/DatabaseReplicationConfiguration:DatabaseReplicationConfiguration",
"description": "When set, specifies the configurations for database replication.\n"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/types/snowflake:index/DatabaseTag:DatabaseTag"
},
"description": "Definitions of a tag to associate with the resource.\n",
"deprecationMessage": "Use the 'snowflake_tag_association' resource instead."
}
},
"required": [
Expand Down Expand Up @@ -3153,14 +3120,6 @@
"replicationConfiguration": {
"$ref": "#/types/snowflake:index/DatabaseReplicationConfiguration:DatabaseReplicationConfiguration",
"description": "When set, specifies the configurations for database replication.\n"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/types/snowflake:index/DatabaseTag:DatabaseTag"
},
"description": "Definitions of a tag to associate with the resource.\n",
"deprecationMessage": "Use the 'snowflake_tag_association' resource instead."
}
},
"stateInputs": {
Expand Down Expand Up @@ -3202,14 +3161,6 @@
"replicationConfiguration": {
"$ref": "#/types/snowflake:index/DatabaseReplicationConfiguration:DatabaseReplicationConfiguration",
"description": "When set, specifies the configurations for database replication.\n"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/types/snowflake:index/DatabaseTag:DatabaseTag"
},
"description": "Definitions of a tag to associate with the resource.\n",
"deprecationMessage": "Use the 'snowflake_tag_association' resource instead."
}
},
"type": "object"
Expand Down Expand Up @@ -13981,7 +13932,29 @@
}
},
"snowflake:index/getDatabases:getDatabases": {
"description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst this = snowflake.getDatabases({});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\nthis = snowflake.get_databases()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @this = Snowflake.GetDatabases.Invoke();\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.GetDatabases(ctx, nil, nil)\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.SnowflakeFunctions;\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 final var this = SnowflakeFunctions.getDatabases();\n\n }\n}\n```\n```yaml\nvariables:\n this:\n fn::invoke:\n Function: snowflake:getDatabases\n Arguments: {}\n```\n{{% /example %}}\n{{% /examples %}}",
"description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst this = snowflake.getDatabases({});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\nthis = snowflake.get_databases()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @this = Snowflake.GetDatabases.Invoke();\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.GetDatabases(ctx, nil, nil)\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.SnowflakeFunctions;\nimport com.pulumi.snowflake.inputs.GetDatabasesArgs;\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 final var this = SnowflakeFunctions.getDatabases();\n\n }\n}\n```\n```yaml\nvariables:\n this:\n fn::invoke:\n Function: snowflake:getDatabases\n Arguments: {}\n```\n{{% /example %}}\n{{% /examples %}}",
"inputs": {
"description": "A collection of arguments for invoking getDatabases.\n",
"properties": {
"history": {
"type": "boolean",
"description": "Optionally includes dropped databases that have not yet been purged The output also includes an additional `dropped_on` column\n"
},
"pattern": {
"type": "string",
"description": "Optionally filters the databases by a pattern\n"
},
"startsWith": {
"type": "string",
"description": "Optionally filters the databases by a pattern\n"
},
"terse": {
"type": "boolean",
"description": "Optionally returns only the columns `created_on` and `name` in the results\n"
}
},
"type": "object"
},
"outputs": {
"description": "A collection of values returned by getDatabases.\n",
"properties": {
Expand All @@ -13992,9 +13965,25 @@
},
"description": "Snowflake databases\n"
},
"history": {
"type": "boolean",
"description": "Optionally includes dropped databases that have not yet been purged The output also includes an additional `dropped_on` column\n"
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
},
"pattern": {
"type": "string",
"description": "Optionally filters the databases by a pattern\n"
},
"startsWith": {
"type": "string",
"description": "Optionally filters the databases by a pattern\n"
},
"terse": {
"type": "boolean",
"description": "Optionally returns only the columns `created_on` and `name` in the results\n"
}
},
"type": "object",
Expand Down
6 changes: 3 additions & 3 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ replace (
)

require (
github.com/Snowflake-Labs/terraform-provider-snowflake v0.65.0
github.com/Snowflake-Labs/terraform-provider-snowflake v0.66.1
github.com/pulumi/pulumi-terraform-bridge/v3 v3.48.0
github.com/pulumi/pulumi/sdk/v3 v3.68.0
github.com/pulumi/pulumi/sdk/v3 v3.69.0
)

require (
Expand Down Expand Up @@ -201,7 +201,7 @@ require (
github.com/pulumi/pulumi-java/pkg v0.9.2 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect
github.com/pulumi/pulumi-yaml v1.1.1 // indirect
github.com/pulumi/pulumi/pkg/v3 v3.68.0 // indirect
github.com/pulumi/pulumi/pkg/v3 v3.69.0 // indirect
github.com/pulumi/schema-tools v0.1.2 // indirect
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.65.0 h1:GWpeUF7gEIZ6g+prPc2QPcdZuoauB2qjjZSLl+SmaXY=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.65.0/go.mod h1:pw4HVjN5dl2/u5K3Rb8K9FJjXL/tcsh+XXgqL3GelZo=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.66.1 h1:yPNJTAvlZAj/cCnGg749PVpC9D51b1t8eKcY3Gt0Gp8=
github.com/Snowflake-Labs/terraform-provider-snowflake v0.66.1/go.mod h1:pw4HVjN5dl2/u5K3Rb8K9FJjXL/tcsh+XXgqL3GelZo=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
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=
Expand Down
32 changes: 0 additions & 32 deletions sdk/dotnet/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ public partial class Database : global::Pulumi.CustomResource
[Output("replicationConfiguration")]
public Output<Outputs.DatabaseReplicationConfiguration?> ReplicationConfiguration { get; private set; } = null!;

/// <summary>
/// Definitions of a tag to associate with the resource.
/// </summary>
[Output("tags")]
public Output<ImmutableArray<Outputs.DatabaseTag>> Tags { get; private set; } = null!;


/// <summary>
/// Create a Database resource with the given unique name, arguments, and options.
Expand Down Expand Up @@ -211,19 +205,6 @@ public InputMap<string> FromShare
[Input("replicationConfiguration")]
public Input<Inputs.DatabaseReplicationConfigurationArgs>? ReplicationConfiguration { get; set; }

[Input("tags")]
private InputList<Inputs.DatabaseTagArgs>? _tags;

/// <summary>
/// Definitions of a tag to associate with the resource.
/// </summary>
[Obsolete(@"Use the 'snowflake_tag_association' resource instead.")]
public InputList<Inputs.DatabaseTagArgs> Tags
{
get => _tags ?? (_tags = new InputList<Inputs.DatabaseTagArgs>());
set => _tags = value;
}

public DatabaseArgs()
{
}
Expand Down Expand Up @@ -280,19 +261,6 @@ public InputMap<string> FromShare
[Input("replicationConfiguration")]
public Input<Inputs.DatabaseReplicationConfigurationGetArgs>? ReplicationConfiguration { get; set; }

[Input("tags")]
private InputList<Inputs.DatabaseTagGetArgs>? _tags;

/// <summary>
/// Definitions of a tag to associate with the resource.
/// </summary>
[Obsolete(@"Use the 'snowflake_tag_association' resource instead.")]
public InputList<Inputs.DatabaseTagGetArgs> Tags
{
get => _tags ?? (_tags = new InputList<Inputs.DatabaseTagGetArgs>());
set => _tags = value;
}

public DatabaseState()
{
}
Expand Down
122 changes: 119 additions & 3 deletions sdk/dotnet/GetDatabases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,96 @@ public static class GetDatabases
/// {{% /example %}}
/// {{% /examples %}}
/// </summary>
public static Task<GetDatabasesResult> InvokeAsync(InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetDatabasesResult>("snowflake:index/getDatabases:getDatabases", InvokeArgs.Empty, options.WithDefaults());
public static Task<GetDatabasesResult> InvokeAsync(GetDatabasesArgs? args = null, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetDatabasesResult>("snowflake:index/getDatabases:getDatabases", args ?? new GetDatabasesArgs(), options.WithDefaults());

/// <summary>
/// {{% examples %}}
/// ## Example Usage
/// {{% example %}}
///
/// ```csharp
/// using System.Collections.Generic;
/// using System.Linq;
/// using Pulumi;
/// using Snowflake = Pulumi.Snowflake;
///
/// return await Deployment.RunAsync(() =&gt;
/// {
/// var @this = Snowflake.GetDatabases.Invoke();
///
/// });
/// ```
/// {{% /example %}}
/// {{% /examples %}}
/// </summary>
public static Output<GetDatabasesResult> Invoke(GetDatabasesInvokeArgs? args = null, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke<GetDatabasesResult>("snowflake:index/getDatabases:getDatabases", args ?? new GetDatabasesInvokeArgs(), options.WithDefaults());
}


public sealed class GetDatabasesArgs : global::Pulumi.InvokeArgs
{
/// <summary>
/// Optionally includes dropped databases that have not yet been purged The output also includes an additional `dropped_on` column
/// </summary>
[Input("history")]
public bool? History { get; set; }

/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
[Input("pattern")]
public string? Pattern { get; set; }

/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
[Input("startsWith")]
public string? StartsWith { get; set; }

/// <summary>
/// Optionally returns only the columns `created_on` and `name` in the results
/// </summary>
[Input("terse")]
public bool? Terse { get; set; }

public GetDatabasesArgs()
{
}
public static new GetDatabasesArgs Empty => new GetDatabasesArgs();
}

public sealed class GetDatabasesInvokeArgs : global::Pulumi.InvokeArgs
{
/// <summary>
/// Optionally includes dropped databases that have not yet been purged The output also includes an additional `dropped_on` column
/// </summary>
[Input("history")]
public Input<bool>? History { get; set; }

/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
[Input("pattern")]
public Input<string>? Pattern { get; set; }

/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
[Input("startsWith")]
public Input<string>? StartsWith { get; set; }

/// <summary>
/// Optionally returns only the columns `created_on` and `name` in the results
/// </summary>
[Input("terse")]
public Input<bool>? Terse { get; set; }

public GetDatabasesInvokeArgs()
{
}
public static new GetDatabasesInvokeArgs Empty => new GetDatabasesInvokeArgs();
}


Expand All @@ -44,18 +132,46 @@ public sealed class GetDatabasesResult
/// </summary>
public readonly ImmutableArray<Outputs.GetDatabasesDatabaseResult> Databases;
/// <summary>
/// Optionally includes dropped databases that have not yet been purged The output also includes an additional `dropped_on` column
/// </summary>
public readonly bool? History;
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
public readonly string? Pattern;
/// <summary>
/// Optionally filters the databases by a pattern
/// </summary>
public readonly string? StartsWith;
/// <summary>
/// Optionally returns only the columns `created_on` and `name` in the results
/// </summary>
public readonly bool? Terse;

[OutputConstructor]
private GetDatabasesResult(
ImmutableArray<Outputs.GetDatabasesDatabaseResult> databases,

string id)
bool? history,

string id,

string? pattern,

string? startsWith,

bool? terse)
{
Databases = databases;
History = history;
Id = id;
Pattern = pattern;
StartsWith = startsWith;
Terse = terse;
}
}
}
Loading

0 comments on commit ed7f59e

Please sign in to comment.