Skip to content

Commit 24d9b30

Browse files
authored
Update to latest codegen for Go examples and remove plugin install (#62)
1 parent cb80a66 commit 24d9b30

38 files changed

+159
-403
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ TFGEN := pulumi-tfgen-${PACK}
1111
PROVIDER := pulumi-resource-${PACK}
1212
VERSION := $(shell scripts/get-version)
1313
PYPI_VERSION := $(shell cd scripts && ./get-py-version)
14-
LATEST_RESOURCE_PROVIDER_VERSION := $(shell curl --silent "https://api.github.com/repos/pulumi/pulumi-${PACK}/tags" | jq ".[0]".name -r)
15-
PROVIDER_VERSION := ${LATEST_RESOURCE_PROVIDER_VERSION:v%=%}
1614

1715
DOTNET_PREFIX := $(firstword $(subst -, ,${VERSION:v%=%})) # e.g. 1.5.0
1816
DOTNET_SUFFIX := $(word 2,$(subst -, ,${VERSION:v%=%})) # e.g. alpha.1
@@ -60,7 +58,6 @@ provider:: generate_schema
6058

6159
install_plugins::
6260
[ -x $(shell which pulumi) ] || curl -fsSL https://get.pulumi.com | sh
63-
pulumi plugin install resource $(PACK) $(PROVIDER_VERSION)
6461

6562
lint::
6663
#golangci-lint run

Makefile.github

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ TFGEN := pulumi-tfgen-${PACK}
1010
PROVIDER := pulumi-resource-${PACK}
1111
VERSION := $(shell pulumictl get version)
1212

13-
LATEST_RESOURCE_PROVIDER_VERSION := $(shell pulumictl get latest-plugin pulumi-${PACK})
14-
PROVIDER_VERSION := ${LATEST_RESOURCE_PROVIDER_VERSION:v%=%}
15-
1613
WORKING_DIR := $(shell pwd)
1714

1815
.PHONY: development provider build_sdks build_nodejs build_dotnet build_go build_python cleanup
@@ -80,7 +77,6 @@ clean::
8077

8178
install_plugins::
8279
[ -x $(shell which pulumi) ] || curl -fsSL https://get.pulumi.com | sh
83-
pulumi plugin install resource $(PACK) $(PROVIDER_VERSION)
8480

8581
install_dotnet_sdk::
8682
mkdir -p $(WORKING_DIR)/nuget

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

Lines changed: 4 additions & 6 deletions
Large diffs are not rendered by default.

provider/go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ go 1.14
44

55
require (
66
github.com/hashicorp/terraform-plugin-sdk v1.7.0
7-
github.com/pulumi/pulumi-terraform-bridge/v2 v2.4.1-0.20200608011815-6feeb51f2d39
8-
github.com/pulumi/pulumi/sdk/v2 v2.3.1-0.20200607162109-9754465b04db
9-
github.com/pulumi/tf2pulumi v0.8.1-0.20200528170746-c1234defe2b5 // indirect
7+
github.com/pulumi/pulumi-terraform-bridge/v2 v2.5.2
8+
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200630091945-bb358c4d2173
109
github.com/terraform-providers/terraform-provider-postgresql v1.6.0
1110
)
1211

provider/go.sum

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt
419419
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
420420
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
421421
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
422+
github.com/pgavlin/goldmark v1.1.33-0.20200616210433-b5eb04559386 h1:LoCV5cscNVWyK5ChN/uCoIFJz8jZD63VQiGJIRgr6uo=
423+
github.com/pgavlin/goldmark v1.1.33-0.20200616210433-b5eb04559386/go.mod h1:MRxHTJrf9FhdfNQ8Hdeh9gmHevC9RJE/fu8M3JIGjoE=
422424
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
423425
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
424426
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -442,19 +444,30 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T
442444
github.com/pulumi/pulumi-terraform-bridge/v2 v2.0.0/go.mod h1:CShKXRvffj8fOwzDfBM8qxEpqfMpLLbEAb6QCtcGeUw=
443445
github.com/pulumi/pulumi-terraform-bridge/v2 v2.4.1-0.20200608011815-6feeb51f2d39 h1:8Y0+ZfJpafOyPsxXf+TFLjCEMudDlsl/uv3o1Pg7qWM=
444446
github.com/pulumi/pulumi-terraform-bridge/v2 v2.4.1-0.20200608011815-6feeb51f2d39/go.mod h1:GI/1DagEgBD0PJUCt5wmaPLI8cx66IMzLRpy0oeucoo=
447+
github.com/pulumi/pulumi-terraform-bridge/v2 v2.5.2 h1:2fZdQQ1uO1D7J1O8D5ytsaPwze3jsxOlfb0OUxJZpMI=
448+
github.com/pulumi/pulumi-terraform-bridge/v2 v2.5.2/go.mod h1:lxWrXLYAMbse0AJeY570Iy2KYI3uUwNg6JOUZ6U7M+Q=
445449
github.com/pulumi/pulumi/pkg/v2 v2.0.0/go.mod h1:kNG9MBTdKP9AzMgkETumR3fmX9gUYB+HpQL767K6jXc=
446450
github.com/pulumi/pulumi/pkg/v2 v2.2.2-0.20200519081838-f66100ce28b0/go.mod h1:GV88eCIrqfFcBWd5QUdN3qMsR0h+x+iRIBnBhhvB78A=
447451
github.com/pulumi/pulumi/pkg/v2 v2.3.1-0.20200607162109-9754465b04db h1:5HrO1GNA53QEp+yN1UCX7BUsJD2I5/k1u2KLO4hOxOA=
448452
github.com/pulumi/pulumi/pkg/v2 v2.3.1-0.20200607162109-9754465b04db/go.mod h1:aqo0wBboEEdy+T5EYKUB6YnzbL80VPjgJPwjttuHqT0=
453+
github.com/pulumi/pulumi/pkg/v2 v2.3.1-0.20200610172153-45a901d3e77c/go.mod h1:aqo0wBboEEdy+T5EYKUB6YnzbL80VPjgJPwjttuHqT0=
454+
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200630091945-bb358c4d2173 h1:7nc8B91aEP2MTlty6MMzVLS/IGyX12k/UJ9loeCHcqE=
455+
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200630091945-bb358c4d2173/go.mod h1:zfUm4/GH2dVRlHZ3Yeb9bRweCQM7icVBdplu6MUDRrQ=
449456
github.com/pulumi/pulumi/sdk/v2 v2.0.0 h1:3VMXbEo3bqeaU+YDt8ufVBLD0WhLYE3tG3t/nIZ3Iac=
450457
github.com/pulumi/pulumi/sdk/v2 v2.0.0/go.mod h1:W7k1UDYerc5o97mHnlHHp5iQZKEby+oQrQefWt+2RF4=
451458
github.com/pulumi/pulumi/sdk/v2 v2.2.2-0.20200519081838-f66100ce28b0/go.mod h1:QNbWpL4gvf3X0lUFT7TXA2Jo1ff/Ti2l97AyFGYwvW4=
452459
github.com/pulumi/pulumi/sdk/v2 v2.3.1-0.20200607162109-9754465b04db h1:Q1/Azshl983zTcWXMqkbEcFt1UN88unn9tdMv5ouQ80=
453460
github.com/pulumi/pulumi/sdk/v2 v2.3.1-0.20200607162109-9754465b04db/go.mod h1:llk6tmXss8kJrt3vEXAkwiwgZOuINEFmKIfMveVIwO8=
461+
github.com/pulumi/pulumi/sdk/v2 v2.3.1-0.20200610172153-45a901d3e77c/go.mod h1:llk6tmXss8kJrt3vEXAkwiwgZOuINEFmKIfMveVIwO8=
462+
github.com/pulumi/pulumi/sdk/v2 v2.5.0/go.mod h1:llk6tmXss8kJrt3vEXAkwiwgZOuINEFmKIfMveVIwO8=
463+
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200630091945-bb358c4d2173 h1:tKAYUvIWlr6PTeC7OHL2aEMW92x+XqEPsy+NwOcY4R4=
464+
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200630091945-bb358c4d2173/go.mod h1:llk6tmXss8kJrt3vEXAkwiwgZOuINEFmKIfMveVIwO8=
454465
github.com/pulumi/tf2pulumi v0.8.1-0.20200519092335-cb56a4dfa88d h1:1JtzB9Gx0YX2UgKKkqJwTgBXxfg2cbLUEqTJKwKBK7s=
455466
github.com/pulumi/tf2pulumi v0.8.1-0.20200519092335-cb56a4dfa88d/go.mod h1:yv9XozKsue9ZELHQbrBGgIaFtE3OX3Q4m7koTzTqgpE=
456467
github.com/pulumi/tf2pulumi v0.8.1-0.20200528170746-c1234defe2b5 h1:h+pUwgEser1Ole6TMCc66njRPcw7SEVXpeoClG+ihEM=
457468
github.com/pulumi/tf2pulumi v0.8.1-0.20200528170746-c1234defe2b5/go.mod h1:WuOTC7l/5TV0+/v8Djbgz/zPxqwiCYCxf9zoffDFGuM=
469+
github.com/pulumi/tf2pulumi v0.8.1-0.20200630203740-1846524be4ec h1:C0l29EHsfhH+reeRSmqr0sIzJipQpXssof3YZurRrVo=
470+
github.com/pulumi/tf2pulumi v0.8.1-0.20200630203740-1846524be4ec/go.mod h1:lE39suxXfTqjNHg8PxtPUdek3wnTTdnoYXVpQdFGmEo=
458471
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
459472
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
460473
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
@@ -503,6 +516,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
503516
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
504517
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
505518
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
519+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
506520
github.com/terraform-providers/terraform-provider-archive v1.3.0 h1:8WzDXMwTdTd4Z7KAUjnYwopk1DgGJ/DLH0xowJ8h+/8=
507521
github.com/terraform-providers/terraform-provider-archive v1.3.0/go.mod h1:7oAwNW55F65KauS++/XmAnrXhLfQRTYt549eYs4zU0w=
508522
github.com/terraform-providers/terraform-provider-http v1.2.0 h1:pOP/SNlLjB18CydtTJJwzkZGkHYX3LWzIoQpYQuBdyw=
@@ -781,6 +795,7 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
781795
google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
782796
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
783797
gopkg.in/AlecAivazis/survey.v1 v1.8.8/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo=
798+
gopkg.in/AlecAivazis/survey.v1 v1.8.9-0.20200217094205-6773bdf39b7f/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo=
784799
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
785800
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
786801
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
@@ -811,6 +826,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
811826
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
812827
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
813828
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
829+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
814830
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
815831
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
816832
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

sdk/dotnet/Database.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,6 @@
99

1010
namespace Pulumi.PostgreSql
1111
{
12-
/// <summary>
13-
/// The ``postgresql..Database`` resource creates and manages [database
14-
/// objects](https://www.postgresql.org/docs/current/static/managing-databases.html)
15-
/// within a PostgreSQL server instance.
16-
///
17-
///
18-
/// ## Usage
19-
///
20-
/// ```csharp
21-
/// using Pulumi;
22-
/// using PostgreSql = Pulumi.PostgreSql;
23-
///
24-
/// class MyStack : Stack
25-
/// {
26-
/// public MyStack()
27-
/// {
28-
/// var myDb = new PostgreSql.Database("myDb", new PostgreSql.DatabaseArgs
29-
/// {
30-
/// AllowConnections = true,
31-
/// ConnectionLimit = -1,
32-
/// LcCollate = "C",
33-
/// Owner = "my_role",
34-
/// Template = "template0",
35-
/// });
36-
/// }
37-
///
38-
/// }
39-
/// ```
40-
/// </summary>
4112
public partial class Database : Pulumi.CustomResource
4213
{
4314
/// <summary>

sdk/dotnet/DefaultPrivileges.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Pulumi.PostgreSql
1111
{
1212
/// <summary>
13-
/// The ``postgresql..DefaultPrivileges`` resource creates and manages default privileges given to a user for a database schema.
13+
/// The ``postgresql.DefaultPrivileges`` resource creates and manages default privileges given to a user for a database schema.
1414
///
1515
/// &gt; **Note:** This resource needs Postgresql version 9 or above.
1616
///

sdk/dotnet/Extension.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
namespace Pulumi.PostgreSql
1111
{
1212
/// <summary>
13-
/// The ``postgresql..Extension`` resource creates and manages an extension on a PostgreSQL
13+
/// The ``postgresql.Extension`` resource creates and manages an extension on a PostgreSQL
1414
/// server.
1515
///
16-
///
1716
/// ## Usage
1817
///
1918
/// ```csharp

sdk/dotnet/Grant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Pulumi.PostgreSql
1111
{
1212
/// <summary>
13-
/// The ``postgresql..Grant`` resource creates and manages privileges given to a user for a database schema.
13+
/// The ``postgresql.Grant`` resource creates and manages privileges given to a user for a database schema.
1414
///
1515
/// &gt; **Note:** This resource needs Postgresql version 9 or above.
1616
///

sdk/dotnet/Role.cs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,6 @@
99

1010
namespace Pulumi.PostgreSql
1111
{
12-
/// <summary>
13-
/// The ``postgresql..Role`` resource creates and manages a role on a PostgreSQL
14-
/// server.
15-
///
16-
/// When a ``postgresql..Role`` resource is removed, the PostgreSQL ROLE will
17-
/// automatically run a [`REASSIGN
18-
/// OWNED`](https://www.postgresql.org/docs/current/static/sql-reassign-owned.html)
19-
/// and [`DROP
20-
/// OWNED`](https://www.postgresql.org/docs/current/static/sql-drop-owned.html) to
21-
/// the `CURRENT_USER` (normally the connected user for the provider). If the
22-
/// specified PostgreSQL ROLE owns objects in multiple PostgreSQL databases in the
23-
/// same PostgreSQL Cluster, one PostgreSQL provider per database must be created
24-
/// and all but the final ``postgresql..Role`` must specify a `skip_drop_role`.
25-
///
26-
/// &gt; **Note:** All arguments including role name and password will be stored in the raw state as plain-text.
27-
/// [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).
28-
///
29-
/// ## Usage
30-
///
31-
/// ```csharp
32-
/// using Pulumi;
33-
/// using PostgreSql = Pulumi.PostgreSql;
34-
///
35-
/// class MyStack : Stack
36-
/// {
37-
/// public MyStack()
38-
/// {
39-
/// var myRole = new PostgreSql.Role("myRole", new PostgreSql.RoleArgs
40-
/// {
41-
/// Login = true,
42-
/// Password = "mypass",
43-
/// });
44-
/// var myReplicationRole = new PostgreSql.Role("myReplicationRole", new PostgreSql.RoleArgs
45-
/// {
46-
/// ConnectionLimit = 5,
47-
/// Login = true,
48-
/// Password = "md5c98cbfeb6a347a47eb8e96cfb4c4b890",
49-
/// Replication = true,
50-
/// });
51-
/// }
52-
///
53-
/// }
54-
/// ```
55-
/// </summary>
5612
public partial class Role : Pulumi.CustomResource
5713
{
5814
/// <summary>

0 commit comments

Comments
 (0)