Skip to content

Commit

Permalink
make build_sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
aq17 committed Mar 10, 2023
1 parent a7c0019 commit a2955fe
Show file tree
Hide file tree
Showing 34 changed files with 193 additions and 84 deletions.
2 changes: 1 addition & 1 deletion sdk/dotnet/Config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Set(T value)
}
}

private static readonly Pulumi.Config __config = new Pulumi.Config("postgresql");
private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("postgresql");

private static readonly __Value<bool?> _awsRdsIamAuth = new __Value<bool?>(() => __config.GetBoolean("awsRdsIamAuth"));
/// <summary>
Expand Down
18 changes: 16 additions & 2 deletions sdk/dotnet/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
AdditionalSecretOutputs =
{
"password",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down Expand Up @@ -162,11 +166,21 @@ public sealed class ProviderArgs : global::Pulumi.ResourceArgs
[Input("maxConnections", json: true)]
public Input<int>? MaxConnections { get; set; }

[Input("password")]
private Input<string>? _password;

/// <summary>
/// Password to be used if the PostgreSQL server demands password authentication
/// </summary>
[Input("password")]
public Input<string>? Password { get; set; }
public Input<string>? Password
{
get => _password;
set
{
var emptySecret = Output.CreateSecret(0);
_password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}

/// <summary>
/// The PostgreSQL port number to connect to at the server host, or socket file name extension for Unix-domain connections
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/Pulumi.PostgreSql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/pulumi/pulumi-postgresql</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon>

<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<UseSharedCompilation>false</UseSharedCompilation>
</PropertyGroup>
Expand Down
32 changes: 28 additions & 4 deletions sdk/dotnet/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
AdditionalSecretOutputs =
{
"password",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down Expand Up @@ -290,12 +294,22 @@ public sealed class RoleArgs : global::Pulumi.ResourceArgs
[Input("name")]
public Input<string>? Name { get; set; }

[Input("password")]
private Input<string>? _password;

/// <summary>
/// Sets the role's password. A password is only of use
/// for roles having the `login` attribute set to true.
/// </summary>
[Input("password")]
public Input<string>? Password { get; set; }
public Input<string>? Password
{
get => _password;
set
{
var emptySecret = Output.CreateSecret(0);
_password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}

/// <summary>
/// Defines whether a role is allowed to initiate
Expand Down Expand Up @@ -465,12 +479,22 @@ public sealed class RoleState : global::Pulumi.ResourceArgs
[Input("name")]
public Input<string>? Name { get; set; }

[Input("password")]
private Input<string>? _password;

/// <summary>
/// Sets the role's password. A password is only of use
/// for roles having the `login` attribute set to true.
/// </summary>
[Input("password")]
public Input<string>? Password { get; set; }
public Input<string>? Password
{
get => _password;
set
{
var emptySecret = Output.CreateSecret(0);
_password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}

/// <summary>
/// Defines whether a role is allowed to initiate
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/postgresql/defaultPrivileg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/postgresql/defaultPrivileges.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sdk/go/postgresql/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// A Pulumi package for creating and managing postgresql cloud resources.

package postgresql
17 changes: 4 additions & 13 deletions sdk/go/postgresql/function.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/postgresql/grant.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/postgresql/grantRole.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions sdk/go/postgresql/provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/postgresql/replicationSlot.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions sdk/go/postgresql/role.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions sdk/java/src/main/java/com/pulumi/postgresql/Provider.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.pulumi.postgresql.ProviderArgs;
import com.pulumi.postgresql.Utilities;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

Expand Down Expand Up @@ -197,6 +198,9 @@ public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.r
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.additionalSecretOutputs(List.of(
"password"
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
Expand Down
3 changes: 3 additions & 0 deletions sdk/java/src/main/java/com/pulumi/postgresql/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ private Role(String name, Output<String> id, @Nullable RoleState state, @Nullabl
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.additionalSecretOutputs(List.of(
"password"
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
Expand Down
3 changes: 2 additions & 1 deletion sdk/nodejs/config/vars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as utilities from "../utilities";

declare var exports: any;
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/defaultPrivileg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as utilities from "./utilities";
* import * as pulumi from "@pulumi/pulumi";
* import * as postgresql from "@pulumi/postgresql";
*
* const readOnlyTables = new postgresql.DefaultPrivileges("read_only_tables", {
* const readOnlyTables = new postgresql.DefaultPrivileges("readOnlyTables", {
* database: "test_db",
* objectType: "table",
* owner: "db_owner",
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/defaultPrivileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as utilities from "./utilities";
* import * as pulumi from "@pulumi/pulumi";
* import * as postgresql from "@pulumi/postgresql";
*
* const readOnlyTables = new postgresql.DefaultPrivileges("read_only_tables", {
* const readOnlyTables = new postgresql.DefaultPrivileges("readOnlyTables", {
* database: "test_db",
* objectType: "table",
* owner: "db_owner",
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import * as utilities from "./utilities";
* import * as pulumi from "@pulumi/pulumi";
* import * as postgresql from "@pulumi/postgresql";
*
* const myExtension = new postgresql.Extension("my_extension", {});
* const myExtension = new postgresql.Extension("myExtension", {});
* ```
*/
export class Extension extends pulumi.CustomResource {
Expand Down
4 changes: 3 additions & 1 deletion sdk/nodejs/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "./types";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";

/**
Expand All @@ -25,6 +26,7 @@ import * as utilities from "./utilities";
* RETURN i + 1;
* END;
* $ LANGUAGE plpgsql;
*
* `,
* returns: "integer",
* });
Expand Down
4 changes: 2 additions & 2 deletions sdk/nodejs/grant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as utilities from "./utilities";
* import * as pulumi from "@pulumi/pulumi";
* import * as postgresql from "@pulumi/postgresql";
*
* const readonlyTables = new postgresql.Grant("readonly_tables", {
* const readonlyTables = new postgresql.Grant("readonlyTables", {
* database: "test_db",
* objectType: "table",
* objects: [
Expand All @@ -38,7 +38,7 @@ import * as utilities from "./utilities";
* import * as pulumi from "@pulumi/pulumi";
* import * as postgresql from "@pulumi/postgresql";
*
* const revokePublic = new postgresql.Grant("revoke_public", {
* const revokePublic = new postgresql.Grant("revokePublic", {
* database: "test_db",
* objectType: "schema",
* privileges: [],
Expand Down
Loading

0 comments on commit a2955fe

Please sign in to comment.