Skip to content

Commit 17d369c

Browse files
authored
Merge pull request #128 from pulumi/jkodroff/v3.3.0
2 parents 8a3b528 + 3efb2a0 commit 17d369c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1975
-1356
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
**/obj/
77
Pulumi.*.yaml
88
**/node_modules/
9+
.DS_Store
910

1011
**/command-output/
1112

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## HEAD (Unreleased)
2-
_(none)_
2+
* Upgrade to terraform-bridge 3.11.0
3+
* Upgrade to pulumi 3.17.0
34

45
---
56

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WORKING_DIR := $(shell pwd)
1616

1717
.PHONY: development provider build_sdks build_nodejs build_dotnet build_go build_python cleanup
1818

19-
development:: install_plugins provider lint_provider build_sdks install_sdks cleanup # Build the provider & SDKs for a development environment
19+
development:: install_plugins provider lint_provider build_sdks install_sdks # Build the provider & SDKs for a development environment
2020

2121
# Required for the codegen action that runs in pulumi/pulumi and pulumi/pulumi-terraform-bridge
2222
build:: install_plugins provider build_sdks install_sdks
@@ -48,7 +48,7 @@ build_python:: install_plugins tfgen # build the python sdk
4848
cp ../../README.md . && \
4949
python3 setup.py clean --all 2>/dev/null && \
5050
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
51-
sed -i.bak -e "s/\$${VERSION}/$(PYPI_VERSION)/g" -e "s/\$${PLUGIN_VERSION}/$(VERSION)/g" ./bin/setup.py && \
51+
sed -i.bak -e 's/^VERSION = .*/VERSION = "$(PYPI_VERSION)"/g' -e 's/^PLUGIN_VERSION = .*/PLUGIN_VERSION = "$(VERSION)"/g' ./bin/setup.py && \
5252
rm ./bin/setup.py.bak && \
5353
cd ./bin && python3 setup.py build sdist
5454

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To use from Python, install using `pip`:
3535

3636
To use from Go, use `go get` to grab the latest version of the library
3737

38-
$ go get github.com/pulumi/pulumi-postgresql/sdk/v3/go/...
38+
$ go get github.com/pulumi/pulumi-postgresql/sdk/v3
3939

4040
### .NET
4141

examples/go.mod

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@ module github.com/pulumi/pulumi-postgresql/examples/v3
22

33
go 1.16
44

5-
require (
6-
github.com/onsi/ginkgo v1.12.0 // indirect
7-
github.com/onsi/gomega v1.9.0 // indirect
8-
github.com/pulumi/pulumi/pkg/v3 v3.0.0
9-
github.com/pulumi/pulumi/sdk/v3 v3.0.0 // indirect
10-
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
11-
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
12-
)
5+
require github.com/pulumi/pulumi/pkg/v3 v3.17.0

examples/go.sum

Lines changed: 289 additions & 464 deletions
Large diffs are not rendered by default.

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

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,67 @@
190190
},
191191
"provider": {
192192
"description": "The provider type for the postgresql package. By default, resources use package-wide configuration\nsettings, however an explicit `Provider` instance may be created and passed during resource\nconstruction to achieve fine-grained programmatic control over provider settings. See the\n[documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.\n",
193+
"properties": {
194+
"clientcert": {
195+
"$ref": "#/types/postgresql:index/ProviderClientcert:ProviderClientcert",
196+
"description": "SSL client certificate if required by the database.\n"
197+
},
198+
"connectTimeout": {
199+
"type": "integer",
200+
"description": "Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.\n"
201+
},
202+
"database": {
203+
"type": "string",
204+
"description": "The name of the database to connect to in order to conenct to (defaults to `postgres`).\n"
205+
},
206+
"databaseUsername": {
207+
"type": "string",
208+
"description": "Database username associated to the connected user (for user name maps)\n"
209+
},
210+
"expectedVersion": {
211+
"type": "string",
212+
"description": "Specify the expected version of PostgreSQL.\n"
213+
},
214+
"host": {
215+
"type": "string",
216+
"description": "Name of PostgreSQL server address to connect to\n"
217+
},
218+
"maxConnections": {
219+
"type": "integer",
220+
"description": "Maximum number of connections to establish to the database. Zero means unlimited.\n"
221+
},
222+
"password": {
223+
"type": "string",
224+
"description": "Password to be used if the PostgreSQL server demands password authentication\n"
225+
},
226+
"port": {
227+
"type": "integer",
228+
"description": "The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections\n"
229+
},
230+
"scheme": {
231+
"type": "string"
232+
},
233+
"sslMode": {
234+
"type": "string",
235+
"deprecationMessage": "Rename PostgreSQL provider `ssl_mode` attribute to `sslmode`"
236+
},
237+
"sslmode": {
238+
"type": "string",
239+
"description": "This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the\nPostgreSQL server\n"
240+
},
241+
"sslrootcert": {
242+
"type": "string",
243+
"description": "The SSL server root certificate file path. The file must contain PEM encoded data.\n"
244+
},
245+
"superuser": {
246+
"type": "boolean",
247+
"description": "Specify if the user to connect as is a Postgres superuser or not.If not, some feature might be disabled (e.g.:\nRefreshing state password from Postgres)\n"
248+
},
249+
"username": {
250+
"type": "string",
251+
"description": "PostgreSQL user name to connect as\n"
252+
}
253+
},
193254
"inputProperties": {
194255
"clientcert": {
195256
"$ref": "#/types/postgresql:index/ProviderClientcert:ProviderClientcert",
@@ -743,7 +804,7 @@
743804
}
744805
},
745806
"postgresql:index/grant:Grant": {
746-
"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 objects: [\n \"table1\",\n \"table2\",\n ],\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 objects=[\n \"table1\",\n \"table2\",\n ],\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 Objects = \n {\n \"table1\",\n \"table2\",\n },\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/v3/go/postgresql\"\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 := postgresql.NewGrant(ctx, \"readonlyTables\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"table\"),\n\t\t\tObjects: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"table1\"),\n\t\t\t\tpulumi.String(\"table2\"),\n\t\t\t},\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\n## Examples\n\nRevoke default accesses for public schema:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst revokePublic = new postgresql.Grant(\"revoke_public\", {\n database: \"test_db\",\n objectType: \"schema\",\n privileges: [],\n role: \"public\",\n schema: \"public\",\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\nrevoke_public = postgresql.Grant(\"revokePublic\",\n database=\"test_db\",\n object_type=\"schema\",\n privileges=[],\n role=\"public\",\n schema=\"public\")\n```\n```csharp\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var revokePublic = new PostgreSql.Grant(\"revokePublic\", new PostgreSql.GrantArgs\n {\n Database = \"test_db\",\n ObjectType = \"schema\",\n Privileges = {},\n Role = \"public\",\n Schema = \"public\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql\"\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 := postgresql.NewGrant(ctx, \"revokePublic\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"schema\"),\n\t\t\tPrivileges: []interface{}{},\n\t\t\tRole: pulumi.String(\"public\"),\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",
807+
"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 objects: [\n \"table1\",\n \"table2\",\n ],\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 objects=[\n \"table1\",\n \"table2\",\n ],\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 Objects = \n {\n \"table1\",\n \"table2\",\n },\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/v3/go/postgresql\"\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 := postgresql.NewGrant(ctx, \"readonlyTables\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"table\"),\n\t\t\tObjects: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"table1\"),\n\t\t\t\tpulumi.String(\"table2\"),\n\t\t\t},\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\n## Examples\n\nRevoke default accesses for public schema:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst revokePublic = new postgresql.Grant(\"revoke_public\", {\n database: \"test_db\",\n objectType: \"schema\",\n privileges: [],\n role: \"public\",\n schema: \"public\",\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\nrevoke_public = postgresql.Grant(\"revokePublic\",\n database=\"test_db\",\n object_type=\"schema\",\n privileges=[],\n role=\"public\",\n schema=\"public\")\n```\n```csharp\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var revokePublic = new PostgreSql.Grant(\"revokePublic\", new PostgreSql.GrantArgs\n {\n Database = \"test_db\",\n ObjectType = \"schema\",\n Privileges = {},\n Role = \"public\",\n Schema = \"public\",\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql\"\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 := postgresql.NewGrant(ctx, \"revokePublic\", \u0026postgresql.GrantArgs{\n\t\t\tDatabase: pulumi.String(\"test_db\"),\n\t\t\tObjectType: pulumi.String(\"schema\"),\n\t\t\tPrivileges: pulumi.StringArray{},\n\t\t\tRole: pulumi.String(\"public\"),\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",
747808
"properties": {
748809
"database": {
749810
"type": "string",

provider/go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ go 1.16
55
require (
66
github.com/cyrilgdn/terraform-provider-postgresql v0.0.0
77
github.com/hashicorp/terraform-plugin-sdk v1.7.0
8-
github.com/pulumi/pulumi-terraform-bridge/v3 v3.0.0
9-
github.com/pulumi/pulumi/pkg/v3 v3.0.0
10-
github.com/pulumi/pulumi/sdk/v3 v3.0.0
8+
github.com/pulumi/pulumi-terraform-bridge/v3 v3.11.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.17.0
1110
)
1211

1312
replace github.com/cyrilgdn/terraform-provider-postgresql => github.com/pulumi/terraform-provider-postgresql v1.12.1-0.20210901153353-a48f7e688aca

0 commit comments

Comments
 (0)