Skip to content

Commit

Permalink
make tfgen
Browse files Browse the repository at this point in the history
  • Loading branch information
guineveresaenger committed Sep 20, 2023
1 parent 4672dc4 commit b913619
Show file tree
Hide file tree
Showing 109 changed files with 2,880 additions and 1,083 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TFGEN := pulumi-tfgen-$(PACK)
PROVIDER := pulumi-resource-$(PACK)
VERSION := $(shell pulumictl get version)
JAVA_GEN := pulumi-java-gen
JAVA_GEN_VERSION := v0.5.4
JAVA_GEN_VERSION := v0.9.5
TESTPARALLELISM := 10
WORKING_DIR := $(shell pwd)

Expand Down
73 changes: 49 additions & 24 deletions sdk/dotnet/Certificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,29 @@ namespace Pulumi.Kong
/// ## Example Usage
///
/// ```csharp
/// using System.Collections.Generic;
/// using System.Linq;
/// using Pulumi;
/// using Kong = Pulumi.Kong;
///
/// class MyStack : Stack
/// return await Deployment.RunAsync(() =>
/// {
/// public MyStack()
/// var certificate = new Kong.Certificate("certificate", new()
/// {
/// var certificate = new Kong.Certificate("certificate", new Kong.CertificateArgs
/// Cert = "public key --- 123 ----",
/// PrivateKey = "private key --- 456 ----",
/// Snis = new[]
/// {
/// Certificate = "public key --- 123 ----",
/// PrivateKey = "private key --- 456 ----",
/// Snis =
/// {
/// "foo.com",
/// "bar.com",
/// },
/// Tags =
/// {
/// "myTag",
/// },
/// });
/// }
/// "foo.com",
/// "bar.com",
/// },
/// Tags = new[]
/// {
/// "myTag",
/// },
/// });
///
/// }
/// });
/// ```
///
/// ## Import
Expand All @@ -52,7 +51,7 @@ namespace Pulumi.Kong
/// ```
/// </summary>
[KongResourceType("kong:index/certificate:Certificate")]
public partial class Certificate : Pulumi.CustomResource
public partial class Certificate : global::Pulumi.CustomResource
{
/// <summary>
/// should be the public key of your certificate it is mapped to the `Cert` parameter on the Kong API.
Expand Down Expand Up @@ -98,6 +97,10 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
AdditionalSecretOutputs =
{
"privateKey",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand All @@ -119,19 +122,29 @@ public static Certificate Get(string name, Input<string> id, CertificateState? s
}
}

public sealed class CertificateArgs : Pulumi.ResourceArgs
public sealed class CertificateArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// should be the public key of your certificate it is mapped to the `Cert` parameter on the Kong API.
/// </summary>
[Input("certificate", required: true)]
public Input<string> Cert { get; set; } = null!;

[Input("privateKey")]
private Input<string>? _privateKey;

/// <summary>
/// should be the private key of your certificate it is mapped to the `Key` parameter on the Kong API.
/// </summary>
[Input("privateKey")]
public Input<string>? PrivateKey { get; set; }
public Input<string>? PrivateKey
{
get => _privateKey;
set
{
var emptySecret = Output.CreateSecret(0);
_privateKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}

[Input("snis")]
private InputList<string>? _snis;
Expand All @@ -156,21 +169,32 @@ public InputList<string> Tags
public CertificateArgs()
{
}
public static new CertificateArgs Empty => new CertificateArgs();
}

public sealed class CertificateState : Pulumi.ResourceArgs
public sealed class CertificateState : global::Pulumi.ResourceArgs
{
/// <summary>
/// should be the public key of your certificate it is mapped to the `Cert` parameter on the Kong API.
/// </summary>
[Input("certificate")]
public Input<string>? Cert { get; set; }

[Input("privateKey")]
private Input<string>? _privateKey;

/// <summary>
/// should be the private key of your certificate it is mapped to the `Key` parameter on the Kong API.
/// </summary>
[Input("privateKey")]
public Input<string>? PrivateKey { get; set; }
public Input<string>? PrivateKey
{
get => _privateKey;
set
{
var emptySecret = Output.CreateSecret(0);
_privateKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
}
}

[Input("snis")]
private InputList<string>? _snis;
Expand All @@ -195,5 +219,6 @@ public InputList<string> Tags
public CertificateState()
{
}
public static new CertificateState Empty => new CertificateState();
}
}
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("kong");
private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("kong");

private static readonly __Value<string?> _kongAdminPassword = new __Value<string?>(() => __config.Get("kongAdminPassword"));
/// <summary>
Expand Down
31 changes: 16 additions & 15 deletions sdk/dotnet/Consumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,24 @@ namespace Pulumi.Kong
/// ## Example Usage
///
/// ```csharp
/// using System.Collections.Generic;
/// using System.Linq;
/// using Pulumi;
/// using Kong = Pulumi.Kong;
///
/// class MyStack : Stack
/// return await Deployment.RunAsync(() =&gt;
/// {
/// public MyStack()
/// var consumer = new Kong.Consumer("consumer", new()
/// {
/// var consumer = new Kong.Consumer("consumer", new Kong.ConsumerArgs
/// CustomId = "123",
/// Tags = new[]
/// {
/// CustomId = "123",
/// Tags =
/// {
/// "mySuperTag",
/// },
/// Username = "User1",
/// });
/// }
/// "mySuperTag",
/// },
/// Username = "User1",
/// });
///
/// }
/// });
/// ```
///
/// ## Import
Expand All @@ -47,7 +46,7 @@ namespace Pulumi.Kong
/// ```
/// </summary>
[KongResourceType("kong:index/consumer:Consumer")]
public partial class Consumer : Pulumi.CustomResource
public partial class Consumer : global::Pulumi.CustomResource
{
/// <summary>
/// A custom id for the consumer, you must set either the username or custom_id
Expand Down Expand Up @@ -111,7 +110,7 @@ public static Consumer Get(string name, Input<string> id, ConsumerState? state =
}
}

public sealed class ConsumerArgs : Pulumi.ResourceArgs
public sealed class ConsumerArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// A custom id for the consumer, you must set either the username or custom_id
Expand Down Expand Up @@ -140,9 +139,10 @@ public InputList<string> Tags
public ConsumerArgs()
{
}
public static new ConsumerArgs Empty => new ConsumerArgs();
}

public sealed class ConsumerState : Pulumi.ResourceArgs
public sealed class ConsumerState : global::Pulumi.ResourceArgs
{
/// <summary>
/// A custom id for the consumer, you must set either the username or custom_id
Expand Down Expand Up @@ -171,5 +171,6 @@ public InputList<string> Tags
public ConsumerState()
{
}
public static new ConsumerState Empty => new ConsumerState();
}
}
53 changes: 28 additions & 25 deletions sdk/dotnet/ConsumerAcl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,44 @@ namespace Pulumi.Kong
/// ## Example Usage
///
/// ```csharp
/// using System.Collections.Generic;
/// using System.Linq;
/// using Pulumi;
/// using Kong = Pulumi.Kong;
///
/// class MyStack : Stack
/// return await Deployment.RunAsync(() =&gt;
/// {
/// public MyStack()
/// var myConsumer = new Kong.Consumer("myConsumer", new()
/// {
/// var myConsumer = new Kong.Consumer("myConsumer", new Kong.ConsumerArgs
/// {
/// CustomId = "123",
/// Username = "User1",
/// });
/// var aclPlugin = new Kong.Plugin("aclPlugin", new Kong.PluginArgs
/// {
/// ConfigJson = @" {
/// CustomId = "123",
/// Username = "User1",
/// });
///
/// var aclPlugin = new Kong.Plugin("aclPlugin", new()
/// {
/// ConfigJson = @" {
/// ""allow"": [""group1"", ""group2""]
/// }
///
/// ",
/// });
/// var consumerAcl = new Kong.ConsumerAcl("consumerAcl", new Kong.ConsumerAclArgs
/// });
///
/// var consumerAcl = new Kong.ConsumerAcl("consumerAcl", new()
/// {
/// ConsumerId = myConsumer.Id,
/// Group = "group2",
/// Tags = new[]
/// {
/// ConsumerId = myConsumer.Id,
/// Group = "group2",
/// Tags =
/// {
/// "myTag",
/// "otherTag",
/// },
/// });
/// }
/// "myTag",
/// "otherTag",
/// },
/// });
///
/// }
/// });
/// ```
/// </summary>
[KongResourceType("kong:index/consumerAcl:ConsumerAcl")]
public partial class ConsumerAcl : Pulumi.CustomResource
public partial class ConsumerAcl : global::Pulumi.CustomResource
{
/// <summary>
/// the id of the consumer to be configured
Expand Down Expand Up @@ -117,7 +118,7 @@ public static ConsumerAcl Get(string name, Input<string> id, ConsumerAclState? s
}
}

public sealed class ConsumerAclArgs : Pulumi.ResourceArgs
public sealed class ConsumerAclArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// the id of the consumer to be configured
Expand Down Expand Up @@ -146,9 +147,10 @@ public InputList<string> Tags
public ConsumerAclArgs()
{
}
public static new ConsumerAclArgs Empty => new ConsumerAclArgs();
}

public sealed class ConsumerAclState : Pulumi.ResourceArgs
public sealed class ConsumerAclState : global::Pulumi.ResourceArgs
{
/// <summary>
/// the id of the consumer to be configured
Expand Down Expand Up @@ -177,5 +179,6 @@ public InputList<string> Tags
public ConsumerAclState()
{
}
public static new ConsumerAclState Empty => new ConsumerAclState();
}
}
Loading

0 comments on commit b913619

Please sign in to comment.