Skip to content

Commit

Permalink
Upgrade terraform-provider-kong to v6.5.0 (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkodroff committed Mar 29, 2022
1 parent efde12c commit ca3e044
Show file tree
Hide file tree
Showing 12 changed files with 1,515 additions and 43 deletions.
124 changes: 124 additions & 0 deletions provider/cmd/pulumi-resource-kong/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/pulumi/pulumi-kong/provider/v4
go 1.16

require (
github.com/kevholditch/terraform-provider-kong v1.9.2-0.20220208144503-ca93cf0d1a10
github.com/kevholditch/terraform-provider-kong v1.9.2-0.20220328204855-9e50bd93437f
github.com/pulumi/pulumi-terraform-bridge/v3 v3.19.1
github.com/pulumi/pulumi/sdk/v3 v3.25.0
)
Expand Down
110 changes: 68 additions & 42 deletions provider/go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func Provider() tfbridge.ProviderInfo {
"kong_consumer_basic_auth": {Tok: makeResource(mainMod, "ConsumerBasicAuth")},
"kong_consumer_jwt_auth": {Tok: makeResource(mainMod, "ConsumerJwtAuth")},
"kong_consumer_key_auth": {Tok: makeResource(mainMod, "ConsumerKeyAuth")},
"kong_consumer_oauth2": {Tok: makeResource(mainMod, "ConsumerOauth2")},
},
JavaScript: &tfbridge.JavaScriptInfo{
Dependencies: map[string]string{
Expand Down
274 changes: 274 additions & 0 deletions sdk/dotnet/ConsumerOauth2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Kong
{
/// <summary>
/// ## # kong.ConsumerOauth2
///
/// Resource that allows you to configure the OAuth2 plugin credentials for a consumer.
///
/// ## Example Usage
///
/// ```csharp
/// using Pulumi;
/// using Kong = Pulumi.Kong;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// var myConsumer = new Kong.Consumer("myConsumer", new Kong.ConsumerArgs
/// {
/// CustomId = "123",
/// Username = "User1",
/// });
/// var oauth2Plugin = new Kong.Plugin("oauth2Plugin", new Kong.PluginArgs
/// {
/// ConfigJson = @" {
/// ""global_credentials"": true,
/// ""enable_password_grant"": true,
/// ""token_expiration"": 180,
/// ""refresh_token_ttl"": 180,
/// ""provision_key"": ""testprovisionkey""
/// }
///
/// ",
/// });
/// var consumerOauth2 = new Kong.ConsumerOauth2("consumerOauth2", new Kong.ConsumerOauth2Args
/// {
/// ClientId = "client_id",
/// ClientSecret = "client_secret",
/// ConsumerId = myConsumer.Id,
/// RedirectUris =
/// {
/// "https://asdf.com/callback",
/// "https://test.cl/callback",
/// },
/// Tags =
/// {
/// "myTag",
/// },
/// });
/// }
///
/// }
/// ```
/// </summary>
[KongResourceType("kong:index/consumerOauth2:ConsumerOauth2")]
public partial class ConsumerOauth2 : Pulumi.CustomResource
{
/// <summary>
/// Unique oauth2 client id. If not set, the oauth2 plugin will generate one
/// </summary>
[Output("clientId")]
public Output<string?> ClientId { get; private set; } = null!;

/// <summary>
/// Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
/// </summary>
[Output("clientSecret")]
public Output<string?> ClientSecret { get; private set; } = null!;

/// <summary>
/// The id of the consumer to be configured with oauth2.
/// </summary>
[Output("consumerId")]
public Output<string> ConsumerId { get; private set; } = null!;

/// <summary>
/// A boolean flag that indicates whether the client_secret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
/// </summary>
[Output("hashSecret")]
public Output<bool?> HashSecret { get; private set; } = null!;

/// <summary>
/// The name associated with the credential.
/// </summary>
[Output("name")]
public Output<string> Name { get; private set; } = null!;

/// <summary>
/// An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
/// </summary>
[Output("redirectUris")]
public Output<ImmutableArray<string>> RedirectUris { get; private set; } = null!;

/// <summary>
/// A list of strings associated with the consumer for grouping and filtering.
/// </summary>
[Output("tags")]
public Output<ImmutableArray<string>> Tags { get; private set; } = null!;


/// <summary>
/// Create a ConsumerOauth2 resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public ConsumerOauth2(string name, ConsumerOauth2Args args, CustomResourceOptions? options = null)
: base("kong:index/consumerOauth2:ConsumerOauth2", name, args ?? new ConsumerOauth2Args(), MakeResourceOptions(options, ""))
{
}

private ConsumerOauth2(string name, Input<string> id, ConsumerOauth2State? state = null, CustomResourceOptions? options = null)
: base("kong:index/consumerOauth2:ConsumerOauth2", name, state, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing ConsumerOauth2 resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="state">Any extra arguments used during the lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static ConsumerOauth2 Get(string name, Input<string> id, ConsumerOauth2State? state = null, CustomResourceOptions? options = null)
{
return new ConsumerOauth2(name, id, state, options);
}
}

public sealed class ConsumerOauth2Args : Pulumi.ResourceArgs
{
/// <summary>
/// Unique oauth2 client id. If not set, the oauth2 plugin will generate one
/// </summary>
[Input("clientId")]
public Input<string>? ClientId { get; set; }

/// <summary>
/// Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
/// </summary>
[Input("clientSecret")]
public Input<string>? ClientSecret { get; set; }

/// <summary>
/// The id of the consumer to be configured with oauth2.
/// </summary>
[Input("consumerId", required: true)]
public Input<string> ConsumerId { get; set; } = null!;

/// <summary>
/// A boolean flag that indicates whether the client_secret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
/// </summary>
[Input("hashSecret")]
public Input<bool>? HashSecret { get; set; }

/// <summary>
/// The name associated with the credential.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }

[Input("redirectUris", required: true)]
private InputList<string>? _redirectUris;

/// <summary>
/// An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
/// </summary>
public InputList<string> RedirectUris
{
get => _redirectUris ?? (_redirectUris = new InputList<string>());
set => _redirectUris = value;
}

[Input("tags")]
private InputList<string>? _tags;

/// <summary>
/// A list of strings associated with the consumer for grouping and filtering.
/// </summary>
public InputList<string> Tags
{
get => _tags ?? (_tags = new InputList<string>());
set => _tags = value;
}

public ConsumerOauth2Args()
{
}
}

public sealed class ConsumerOauth2State : Pulumi.ResourceArgs
{
/// <summary>
/// Unique oauth2 client id. If not set, the oauth2 plugin will generate one
/// </summary>
[Input("clientId")]
public Input<string>? ClientId { get; set; }

/// <summary>
/// Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
/// </summary>
[Input("clientSecret")]
public Input<string>? ClientSecret { get; set; }

/// <summary>
/// The id of the consumer to be configured with oauth2.
/// </summary>
[Input("consumerId")]
public Input<string>? ConsumerId { get; set; }

/// <summary>
/// A boolean flag that indicates whether the client_secret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
/// </summary>
[Input("hashSecret")]
public Input<bool>? HashSecret { get; set; }

/// <summary>
/// The name associated with the credential.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }

[Input("redirectUris")]
private InputList<string>? _redirectUris;

/// <summary>
/// An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
/// </summary>
public InputList<string> RedirectUris
{
get => _redirectUris ?? (_redirectUris = new InputList<string>());
set => _redirectUris = value;
}

[Input("tags")]
private InputList<string>? _tags;

/// <summary>
/// A list of strings associated with the consumer for grouping and filtering.
/// </summary>
public InputList<string> Tags
{
get => _tags ?? (_tags = new InputList<string>());
set => _tags = value;
}

public ConsumerOauth2State()
{
}
}
}
Loading

0 comments on commit ca3e044

Please sign in to comment.