Skip to content

Commit 697c18a

Browse files
authored
Merge pull request #65 from pulumi/stack72/v1.7.0
Upgrade to v1.7.0 of the Postgresql Terraform Provider
2 parents 24d9b30 + 00a6e09 commit 697c18a

File tree

16 files changed

+81
-71
lines changed

16 files changed

+81
-71
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## HEAD (Unreleased)
2-
_(none)_
2+
* Upgrade to v1.7.0 of the Postgresql Terraform Provider
33

44
---
55

provider/cmd/pulumi-resource-postgresql/schema.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
},
465465
"objectType": {
466466
"type": "string",
467-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence)\n"
467+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)\n"
468468
},
469469
"owner": {
470470
"type": "string",
@@ -501,7 +501,7 @@
501501
},
502502
"objectType": {
503503
"type": "string",
504-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence)\n"
504+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)\n"
505505
},
506506
"owner": {
507507
"type": "string",
@@ -540,7 +540,7 @@
540540
},
541541
"objectType": {
542542
"type": "string",
543-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence)\n"
543+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)\n"
544544
},
545545
"owner": {
546546
"type": "string",
@@ -575,7 +575,7 @@
575575
},
576576
"objectType": {
577577
"type": "string",
578-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence).\n"
578+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).\n"
579579
},
580580
"owner": {
581581
"type": "string",
@@ -612,7 +612,7 @@
612612
},
613613
"objectType": {
614614
"type": "string",
615-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence).\n"
615+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).\n"
616616
},
617617
"owner": {
618618
"type": "string",
@@ -651,7 +651,7 @@
651651
},
652652
"objectType": {
653653
"type": "string",
654-
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence).\n"
654+
"description": "The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).\n"
655655
},
656656
"owner": {
657657
"type": "string",
@@ -749,22 +749,22 @@
749749
}
750750
},
751751
"postgresql:index/grant:Grant": {
752-
"description": "The ``postgresql.Grant`` resource creates and manages privileges given to a user for a database schema.\n\n\u003e **Note:** This resource needs Postgresql version 9 or above.\n\n## Usage\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst readonlyTables = new postgresql.Grant(\"readonly_tables\", {\n database: \"test_db\",\n objectType: \"table\",\n privileges: [\"SELECT\"],\n role: \"test_role\",\n schema: \"public\",\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\nreadonly_tables = postgresql.Grant(\"readonlyTables\",\n database=\"test_db\",\n object_type=\"table\",\n privileges=[\"SELECT\"],\n role=\"test_role\",\n schema=\"public\")\n```\n```csharp\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var readonlyTables = new PostgreSql.Grant(\"readonlyTables\", new PostgreSql.GrantArgs\n {\n Database = \"test_db\",\n ObjectType = \"table\",\n Privileges = \n {\n \"SELECT\",\n },\n Role = \"test_role\",\n Schema = \"public\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v2/go/postgresql\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := postgresql.NewGrant(ctx, \"readonlyTables\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"table\"),\n\t\t\tPrivileges: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"SELECT\"),\n\t\t\t},\n\t\t\tRole: pulumi.String(\"test_role\"),\n\t\t\tSchema: pulumi.String(\"public\"),\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",
752+
"description": "The ``postgresql.Grant`` resource creates and manages privileges given to a user for a database schema.\n\nSee [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-grant.html)\n\n\u003e **Note:** This resource needs Postgresql version 9 or above.\n\n## Usage\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst readonlyTables = new postgresql.Grant(\"readonly_tables\", {\n database: \"test_db\",\n objectType: \"table\",\n privileges: [\"SELECT\"],\n role: \"test_role\",\n schema: \"public\",\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\nreadonly_tables = postgresql.Grant(\"readonlyTables\",\n database=\"test_db\",\n object_type=\"table\",\n privileges=[\"SELECT\"],\n role=\"test_role\",\n schema=\"public\")\n```\n```csharp\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var readonlyTables = new PostgreSql.Grant(\"readonlyTables\", new PostgreSql.GrantArgs\n {\n Database = \"test_db\",\n ObjectType = \"table\",\n Privileges = \n {\n \"SELECT\",\n },\n Role = \"test_role\",\n Schema = \"public\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v2/go/postgresql\"\n\t\"github.com/pulumi/pulumi/sdk/v2/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := postgresql.NewGrant(ctx, \"readonlyTables\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"table\"),\n\t\t\tPrivileges: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"SELECT\"),\n\t\t\t},\n\t\t\tRole: pulumi.String(\"test_role\"),\n\t\t\tSchema: pulumi.String(\"public\"),\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",
753753
"properties": {
754754
"database": {
755755
"type": "string",
756756
"description": "The database to grant privileges on for this role.\n"
757757
},
758758
"objectType": {
759759
"type": "string",
760-
"description": "The PostgreSQL object type to grant the privileges on (one of: table, sequence).\n"
760+
"description": "The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).\n"
761761
},
762762
"privileges": {
763763
"type": "array",
764764
"items": {
765765
"type": "string"
766766
},
767-
"description": "The list of privileges to grant.\n"
767+
"description": "The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.\n"
768768
},
769769
"role": {
770770
"type": "string",
@@ -792,14 +792,14 @@
792792
},
793793
"objectType": {
794794
"type": "string",
795-
"description": "The PostgreSQL object type to grant the privileges on (one of: table, sequence).\n"
795+
"description": "The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).\n"
796796
},
797797
"privileges": {
798798
"type": "array",
799799
"items": {
800800
"type": "string"
801801
},
802-
"description": "The list of privileges to grant.\n"
802+
"description": "The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.\n"
803803
},
804804
"role": {
805805
"type": "string",
@@ -829,14 +829,14 @@
829829
},
830830
"objectType": {
831831
"type": "string",
832-
"description": "The PostgreSQL object type to grant the privileges on (one of: table, sequence).\n"
832+
"description": "The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).\n"
833833
},
834834
"privileges": {
835835
"type": "array",
836836
"items": {
837837
"type": "string"
838838
},
839-
"description": "The list of privileges to grant.\n"
839+
"description": "The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.\n"
840840
},
841841
"role": {
842842
"type": "string",

provider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/hashicorp/terraform-plugin-sdk v1.7.0
77
github.com/pulumi/pulumi-terraform-bridge/v2 v2.5.2
88
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200630091945-bb358c4d2173
9-
github.com/terraform-providers/terraform-provider-postgresql v1.6.0
9+
github.com/terraform-providers/terraform-provider-postgresql v1.7.0
1010
)
1111

1212
replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.4.3+incompatible

provider/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ github.com/terraform-providers/terraform-provider-http v1.2.0 h1:pOP/SNlLjB18Cyd
523523
github.com/terraform-providers/terraform-provider-http v1.2.0/go.mod h1:2Iot921OkLVSZr8FbIkvRN84ZV3w+oFKb7RlmPTQQAQ=
524524
github.com/terraform-providers/terraform-provider-postgresql v1.6.0 h1:LToiRRbStXg2ub468ionUIn1u07YLQIgtYvVHxLHB5Y=
525525
github.com/terraform-providers/terraform-provider-postgresql v1.6.0/go.mod h1:YErEnZSfPs/A2awekouxN8/bpKftJz34M93NzteaP4M=
526+
github.com/terraform-providers/terraform-provider-postgresql v1.7.0 h1:lqVPOFz1l83qUsNVRgIk/lJnQXEWNtdBpstMTROQvXY=
527+
github.com/terraform-providers/terraform-provider-postgresql v1.7.0/go.mod h1:eBbxs4zKnCgnIanyoOzuD/ODwa7giezWDJqlUXQRHDM=
526528
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 h1:9VTskZOIRf2vKF3UL8TuWElry5pgUpV1tFSe/e/0m/E=
527529
github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
528530
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=

sdk/dotnet/DefaultPrivileg.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial class DefaultPrivileg : Pulumi.CustomResource
1919
public Output<string> Database { get; private set; } = null!;
2020

2121
/// <summary>
22-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence)
22+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)
2323
/// </summary>
2424
[Output("objectType")]
2525
public Output<string> ObjectType { get; private set; } = null!;
@@ -101,7 +101,7 @@ public sealed class DefaultPrivilegArgs : Pulumi.ResourceArgs
101101
public Input<string> Database { get; set; } = null!;
102102

103103
/// <summary>
104-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence)
104+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)
105105
/// </summary>
106106
[Input("objectType", required: true)]
107107
public Input<string> ObjectType { get; set; } = null!;
@@ -150,7 +150,7 @@ public sealed class DefaultPrivilegState : Pulumi.ResourceArgs
150150
public Input<string>? Database { get; set; }
151151

152152
/// <summary>
153-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence)
153+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type)
154154
/// </summary>
155155
[Input("objectType")]
156156
public Input<string>? ObjectType { get; set; }

sdk/dotnet/DefaultPrivileges.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public partial class DefaultPrivileges : Pulumi.CustomResource
5050
public Output<string> Database { get; private set; } = null!;
5151

5252
/// <summary>
53-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence).
53+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).
5454
/// </summary>
5555
[Output("objectType")]
5656
public Output<string> ObjectType { get; private set; } = null!;
@@ -136,7 +136,7 @@ public sealed class DefaultPrivilegesArgs : Pulumi.ResourceArgs
136136
public Input<string> Database { get; set; } = null!;
137137

138138
/// <summary>
139-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence).
139+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).
140140
/// </summary>
141141
[Input("objectType", required: true)]
142142
public Input<string> ObjectType { get; set; } = null!;
@@ -185,7 +185,7 @@ public sealed class DefaultPrivilegesState : Pulumi.ResourceArgs
185185
public Input<string>? Database { get; set; }
186186

187187
/// <summary>
188-
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence).
188+
/// The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type).
189189
/// </summary>
190190
[Input("objectType")]
191191
public Input<string>? ObjectType { get; set; }

sdk/dotnet/Grant.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace Pulumi.PostgreSql
1212
/// <summary>
1313
/// The ``postgresql.Grant`` resource creates and manages privileges given to a user for a database schema.
1414
///
15+
/// See [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-grant.html)
16+
///
1517
/// &gt; **Note:** This resource needs Postgresql version 9 or above.
1618
///
1719
/// ## Usage
@@ -49,13 +51,13 @@ public partial class Grant : Pulumi.CustomResource
4951
public Output<string> Database { get; private set; } = null!;
5052

5153
/// <summary>
52-
/// The PostgreSQL object type to grant the privileges on (one of: table, sequence).
54+
/// The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).
5355
/// </summary>
5456
[Output("objectType")]
5557
public Output<string> ObjectType { get; private set; } = null!;
5658

5759
/// <summary>
58-
/// The list of privileges to grant.
60+
/// The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.
5961
/// </summary>
6062
[Output("privileges")]
6163
public Output<ImmutableArray<string>> Privileges { get; private set; } = null!;
@@ -131,7 +133,7 @@ public sealed class GrantArgs : Pulumi.ResourceArgs
131133
public Input<string> Database { get; set; } = null!;
132134

133135
/// <summary>
134-
/// The PostgreSQL object type to grant the privileges on (one of: table, sequence).
136+
/// The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).
135137
/// </summary>
136138
[Input("objectType", required: true)]
137139
public Input<string> ObjectType { get; set; } = null!;
@@ -140,7 +142,7 @@ public sealed class GrantArgs : Pulumi.ResourceArgs
140142
private InputList<string>? _privileges;
141143

142144
/// <summary>
143-
/// The list of privileges to grant.
145+
/// The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.
144146
/// </summary>
145147
public InputList<string> Privileges
146148
{
@@ -180,7 +182,7 @@ public sealed class GrantState : Pulumi.ResourceArgs
180182
public Input<string>? Database { get; set; }
181183

182184
/// <summary>
183-
/// The PostgreSQL object type to grant the privileges on (one of: table, sequence).
185+
/// The PostgreSQL object type to grant the privileges on (one of: database, table, sequence,function).
184186
/// </summary>
185187
[Input("objectType")]
186188
public Input<string>? ObjectType { get; set; }
@@ -189,7 +191,7 @@ public sealed class GrantState : Pulumi.ResourceArgs
189191
private InputList<string>? _privileges;
190192

191193
/// <summary>
192-
/// The list of privileges to grant.
194+
/// The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.
193195
/// </summary>
194196
public InputList<string> Privileges
195197
{

0 commit comments

Comments
 (0)