Skip to content

Commit c99f0bf

Browse files
authored
Merge pull request #198 from pulumi/upgrade-terraform-provider-postgresql-to-v1.19.0
Upgrade terraform-provider-postgresql to v1.19.0
2 parents 1a5e897 + 09bdf9e commit c99f0bf

Some content is hidden

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

48 files changed

+6715
-160
lines changed

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

Lines changed: 452 additions & 16 deletions
Large diffs are not rendered by default.

sdk/dotnet/Function.cs

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ namespace Pulumi.PostgreSql
3232
/// Type = "integer",
3333
/// },
3434
/// },
35-
/// Body = @" AS $
36-
/// BEGIN
35+
/// Body = @" BEGIN
3736
/// RETURN i + 1;
3837
/// END;
39-
/// $ LANGUAGE plpgsql;
4038
///
4139
/// ",
40+
/// Language = "plpgsql",
4241
/// Returns = "integer",
4342
/// });
4443
///
@@ -56,7 +55,7 @@ public partial class Function : global::Pulumi.CustomResource
5655

5756
/// <summary>
5857
/// Function body.
59-
/// This should be everything after the return type in the function definition.
58+
/// This should be the body content withing the `AS $$` and the final `$$`. It will also accept the `AS $$` and `$$` if added.
6059
/// </summary>
6160
[Output("body")]
6261
public Output<string> Body { get; private set; } = null!;
@@ -75,17 +74,23 @@ public partial class Function : global::Pulumi.CustomResource
7574
[Output("dropCascade")]
7675
public Output<bool?> DropCascade { get; private set; } = null!;
7776

77+
/// <summary>
78+
/// The function programming language. Can be one of internal, sql, c, plpgsql. Default is plpgsql.
79+
/// </summary>
80+
[Output("language")]
81+
public Output<string?> Language { get; private set; } = null!;
82+
7883
/// <summary>
7984
/// The name of the argument.
8085
/// </summary>
8186
[Output("name")]
8287
public Output<string> Name { get; private set; } = null!;
8388

8489
/// <summary>
85-
/// Type that the function returns.
90+
/// Type that the function returns. It can be computed from the OUT arguments. Default is void.
8691
/// </summary>
8792
[Output("returns")]
88-
public Output<string?> Returns { get; private set; } = null!;
93+
public Output<string> Returns { get; private set; } = null!;
8994

9095
/// <summary>
9196
/// The schema where the function is located.
@@ -154,7 +159,7 @@ public InputList<Inputs.FunctionArgArgs> Args
154159

155160
/// <summary>
156161
/// Function body.
157-
/// This should be everything after the return type in the function definition.
162+
/// This should be the body content withing the `AS $$` and the final `$$`. It will also accept the `AS $$` and `$$` if added.
158163
/// </summary>
159164
[Input("body", required: true)]
160165
public Input<string> Body { get; set; } = null!;
@@ -173,14 +178,20 @@ public InputList<Inputs.FunctionArgArgs> Args
173178
[Input("dropCascade")]
174179
public Input<bool>? DropCascade { get; set; }
175180

181+
/// <summary>
182+
/// The function programming language. Can be one of internal, sql, c, plpgsql. Default is plpgsql.
183+
/// </summary>
184+
[Input("language")]
185+
public Input<string>? Language { get; set; }
186+
176187
/// <summary>
177188
/// The name of the argument.
178189
/// </summary>
179190
[Input("name")]
180191
public Input<string>? Name { get; set; }
181192

182193
/// <summary>
183-
/// Type that the function returns.
194+
/// Type that the function returns. It can be computed from the OUT arguments. Default is void.
184195
/// </summary>
185196
[Input("returns")]
186197
public Input<string>? Returns { get; set; }
@@ -214,7 +225,7 @@ public InputList<Inputs.FunctionArgGetArgs> Args
214225

215226
/// <summary>
216227
/// Function body.
217-
/// This should be everything after the return type in the function definition.
228+
/// This should be the body content withing the `AS $$` and the final `$$`. It will also accept the `AS $$` and `$$` if added.
218229
/// </summary>
219230
[Input("body")]
220231
public Input<string>? Body { get; set; }
@@ -233,14 +244,20 @@ public InputList<Inputs.FunctionArgGetArgs> Args
233244
[Input("dropCascade")]
234245
public Input<bool>? DropCascade { get; set; }
235246

247+
/// <summary>
248+
/// The function programming language. Can be one of internal, sql, c, plpgsql. Default is plpgsql.
249+
/// </summary>
250+
[Input("language")]
251+
public Input<string>? Language { get; set; }
252+
236253
/// <summary>
237254
/// The name of the argument.
238255
/// </summary>
239256
[Input("name")]
240257
public Input<string>? Name { get; set; }
241258

242259
/// <summary>
243-
/// Type that the function returns.
260+
/// Type that the function returns. It can be computed from the OUT arguments. Default is void.
244261
/// </summary>
245262
[Input("returns")]
246263
public Input<string>? Returns { get; set; }

sdk/dotnet/GetSchemas.cs

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Collections.Immutable;
7+
using System.Threading.Tasks;
8+
using Pulumi.Serialization;
9+
10+
namespace Pulumi.PostgreSql
11+
{
12+
public static class GetSchemas
13+
{
14+
/// <summary>
15+
/// The ``postgresql.getSchemas`` data source retrieves a list of schema names from a specified PostgreSQL database.
16+
///
17+
///
18+
/// ## Usage
19+
///
20+
/// ```csharp
21+
/// using System.Collections.Generic;
22+
/// using Pulumi;
23+
/// using PostgreSql = Pulumi.PostgreSql;
24+
///
25+
/// return await Deployment.RunAsync(() =&gt;
26+
/// {
27+
/// var mySchemas = PostgreSql.GetSchemas.Invoke(new()
28+
/// {
29+
/// Database = "my_database",
30+
/// });
31+
///
32+
/// });
33+
/// ```
34+
/// </summary>
35+
public static Task<GetSchemasResult> InvokeAsync(GetSchemasArgs args, InvokeOptions? options = null)
36+
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetSchemasResult>("postgresql:index/getSchemas:getSchemas", args ?? new GetSchemasArgs(), options.WithDefaults());
37+
38+
/// <summary>
39+
/// The ``postgresql.getSchemas`` data source retrieves a list of schema names from a specified PostgreSQL database.
40+
///
41+
///
42+
/// ## Usage
43+
///
44+
/// ```csharp
45+
/// using System.Collections.Generic;
46+
/// using Pulumi;
47+
/// using PostgreSql = Pulumi.PostgreSql;
48+
///
49+
/// return await Deployment.RunAsync(() =&gt;
50+
/// {
51+
/// var mySchemas = PostgreSql.GetSchemas.Invoke(new()
52+
/// {
53+
/// Database = "my_database",
54+
/// });
55+
///
56+
/// });
57+
/// ```
58+
/// </summary>
59+
public static Output<GetSchemasResult> Invoke(GetSchemasInvokeArgs args, InvokeOptions? options = null)
60+
=> global::Pulumi.Deployment.Instance.Invoke<GetSchemasResult>("postgresql:index/getSchemas:getSchemas", args ?? new GetSchemasInvokeArgs(), options.WithDefaults());
61+
}
62+
63+
64+
public sealed class GetSchemasArgs : global::Pulumi.InvokeArgs
65+
{
66+
/// <summary>
67+
/// The PostgreSQL database which will be queried for schema names.
68+
/// </summary>
69+
[Input("database", required: true)]
70+
public string Database { get; set; } = null!;
71+
72+
/// <summary>
73+
/// Determines whether to include system schemas (pg_ prefix and information_schema). 'public' will always be included. Defaults to ``false``.
74+
/// </summary>
75+
[Input("includeSystemSchemas")]
76+
public bool? IncludeSystemSchemas { get; set; }
77+
78+
[Input("likeAllPatterns")]
79+
private List<string>? _likeAllPatterns;
80+
81+
/// <summary>
82+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``LIKE ALL`` operators.
83+
/// </summary>
84+
public List<string> LikeAllPatterns
85+
{
86+
get => _likeAllPatterns ?? (_likeAllPatterns = new List<string>());
87+
set => _likeAllPatterns = value;
88+
}
89+
90+
[Input("likeAnyPatterns")]
91+
private List<string>? _likeAnyPatterns;
92+
93+
/// <summary>
94+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``LIKE ANY`` operators.
95+
/// </summary>
96+
public List<string> LikeAnyPatterns
97+
{
98+
get => _likeAnyPatterns ?? (_likeAnyPatterns = new List<string>());
99+
set => _likeAnyPatterns = value;
100+
}
101+
102+
[Input("notLikeAllPatterns")]
103+
private List<string>? _notLikeAllPatterns;
104+
105+
/// <summary>
106+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``NOT LIKE ALL`` operators.
107+
/// </summary>
108+
public List<string> NotLikeAllPatterns
109+
{
110+
get => _notLikeAllPatterns ?? (_notLikeAllPatterns = new List<string>());
111+
set => _notLikeAllPatterns = value;
112+
}
113+
114+
/// <summary>
115+
/// Expression which will be pattern matched in the query using the PostgreSQL ``~`` (regular expression match) operator.
116+
/// </summary>
117+
[Input("regexPattern")]
118+
public string? RegexPattern { get; set; }
119+
120+
public GetSchemasArgs()
121+
{
122+
}
123+
public static new GetSchemasArgs Empty => new GetSchemasArgs();
124+
}
125+
126+
public sealed class GetSchemasInvokeArgs : global::Pulumi.InvokeArgs
127+
{
128+
/// <summary>
129+
/// The PostgreSQL database which will be queried for schema names.
130+
/// </summary>
131+
[Input("database", required: true)]
132+
public Input<string> Database { get; set; } = null!;
133+
134+
/// <summary>
135+
/// Determines whether to include system schemas (pg_ prefix and information_schema). 'public' will always be included. Defaults to ``false``.
136+
/// </summary>
137+
[Input("includeSystemSchemas")]
138+
public Input<bool>? IncludeSystemSchemas { get; set; }
139+
140+
[Input("likeAllPatterns")]
141+
private InputList<string>? _likeAllPatterns;
142+
143+
/// <summary>
144+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``LIKE ALL`` operators.
145+
/// </summary>
146+
public InputList<string> LikeAllPatterns
147+
{
148+
get => _likeAllPatterns ?? (_likeAllPatterns = new InputList<string>());
149+
set => _likeAllPatterns = value;
150+
}
151+
152+
[Input("likeAnyPatterns")]
153+
private InputList<string>? _likeAnyPatterns;
154+
155+
/// <summary>
156+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``LIKE ANY`` operators.
157+
/// </summary>
158+
public InputList<string> LikeAnyPatterns
159+
{
160+
get => _likeAnyPatterns ?? (_likeAnyPatterns = new InputList<string>());
161+
set => _likeAnyPatterns = value;
162+
}
163+
164+
[Input("notLikeAllPatterns")]
165+
private InputList<string>? _notLikeAllPatterns;
166+
167+
/// <summary>
168+
/// List of expressions which will be pattern matched in the query using the PostgreSQL ``NOT LIKE ALL`` operators.
169+
/// </summary>
170+
public InputList<string> NotLikeAllPatterns
171+
{
172+
get => _notLikeAllPatterns ?? (_notLikeAllPatterns = new InputList<string>());
173+
set => _notLikeAllPatterns = value;
174+
}
175+
176+
/// <summary>
177+
/// Expression which will be pattern matched in the query using the PostgreSQL ``~`` (regular expression match) operator.
178+
/// </summary>
179+
[Input("regexPattern")]
180+
public Input<string>? RegexPattern { get; set; }
181+
182+
public GetSchemasInvokeArgs()
183+
{
184+
}
185+
public static new GetSchemasInvokeArgs Empty => new GetSchemasInvokeArgs();
186+
}
187+
188+
189+
[OutputType]
190+
public sealed class GetSchemasResult
191+
{
192+
public readonly string Database;
193+
/// <summary>
194+
/// The provider-assigned unique ID for this managed resource.
195+
/// </summary>
196+
public readonly string Id;
197+
public readonly bool? IncludeSystemSchemas;
198+
public readonly ImmutableArray<string> LikeAllPatterns;
199+
public readonly ImmutableArray<string> LikeAnyPatterns;
200+
public readonly ImmutableArray<string> NotLikeAllPatterns;
201+
public readonly string? RegexPattern;
202+
/// <summary>
203+
/// A list of full names of found schemas.
204+
/// </summary>
205+
public readonly ImmutableArray<string> Schemas;
206+
207+
[OutputConstructor]
208+
private GetSchemasResult(
209+
string database,
210+
211+
string id,
212+
213+
bool? includeSystemSchemas,
214+
215+
ImmutableArray<string> likeAllPatterns,
216+
217+
ImmutableArray<string> likeAnyPatterns,
218+
219+
ImmutableArray<string> notLikeAllPatterns,
220+
221+
string? regexPattern,
222+
223+
ImmutableArray<string> schemas)
224+
{
225+
Database = database;
226+
Id = id;
227+
IncludeSystemSchemas = includeSystemSchemas;
228+
LikeAllPatterns = likeAllPatterns;
229+
LikeAnyPatterns = likeAnyPatterns;
230+
NotLikeAllPatterns = notLikeAllPatterns;
231+
RegexPattern = regexPattern;
232+
Schemas = schemas;
233+
}
234+
}
235+
}

0 commit comments

Comments
 (0)