Skip to content

Commit

Permalink
fix: Add missing getOrgs & defaultOidcSettings mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
vavsab committed Oct 11, 2023
1 parent cefc3d2 commit 679ba26
Show file tree
Hide file tree
Showing 18 changed files with 2,084 additions and 0 deletions.
184 changes: 184 additions & 0 deletions provider/cmd/pulumi-resource-zitadel/schema.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func Provider() tfbridge.ProviderInfo {
"zitadel_default_domain_policy": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "DefaultDomainPolicy")},
"zitadel_default_privacy_policy": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "DefaultPrivacyPolicy")},
"zitadel_default_password_complexity_policy": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "DefaultPasswordComplexityPolicy")},
"zitadel_default_oidc_settings": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "DefaultOidcSettings")},
"zitadel_sms_provider_twilio": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "SmsProviderTwilio")},
"zitadel_smtp_config": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "SmtpConfig")},
"zitadel_default_notification_policy": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "DefaultNotificationPolicy")},
Expand All @@ -147,6 +148,7 @@ func Provider() tfbridge.ProviderInfo {
},
DataSources: map[string]*tfbridge.DataSourceInfo{
"zitadel_org": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getOrg")},
"zitadel_orgs": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getOrgs")},
"zitadel_human_user": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getHumanUser")},
"zitadel_machine_user": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getMachineUser")},
"zitadel_project": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getProject")},
Expand All @@ -171,6 +173,7 @@ func Provider() tfbridge.ProviderInfo {
"zitadel_org_idp_google": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getOrgIdpGoogle")},
"zitadel_org_idp_azure_ad": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getOrgIdpAzureAd")},
"zitadel_org_idp_ldap": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getOrgIdpLdap")},
"zitadel_default_oidc_settings": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getDefaultOidcSettings")},
},
JavaScript: &tfbridge.JavaScriptInfo{
PackageName: "@pulumiverse/zitadel",
Expand Down
171 changes: 171 additions & 0 deletions sdk/dotnet/DefaultOidcSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
// *** 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;
using Pulumi;

namespace Pulumiverse.Zitadel
{
/// <summary>
/// Resource representing the default oidc settings.
///
/// ## Example Usage
///
/// ```csharp
/// using System.Collections.Generic;
/// using Pulumi;
/// using Zitadel = Pulumiverse.Zitadel;
///
/// return await Deployment.RunAsync(() =&gt;
/// {
/// var @default = new Zitadel.DefaultOidcSettings("default", new()
/// {
/// AccessTokenLifetime = "12h0m0s",
/// IdTokenLifetime = "12h0m0s",
/// RefreshTokenExpiration = "720h0m0s",
/// RefreshTokenIdleExpiration = "2160h0m0s",
/// });
///
/// });
/// ```
/// </summary>
[ZitadelResourceType("zitadel:index/defaultOidcSettings:DefaultOidcSettings")]
public partial class DefaultOidcSettings : global::Pulumi.CustomResource
{
/// <summary>
/// lifetime duration of access tokens
/// </summary>
[Output("accessTokenLifetime")]
public Output<string> AccessTokenLifetime { get; private set; } = null!;

/// <summary>
/// lifetime duration of id tokens
/// </summary>
[Output("idTokenLifetime")]
public Output<string> IdTokenLifetime { get; private set; } = null!;

/// <summary>
/// expiration duration of refresh tokens
/// </summary>
[Output("refreshTokenExpiration")]
public Output<string> RefreshTokenExpiration { get; private set; } = null!;

/// <summary>
/// expiration duration of idle refresh tokens
/// </summary>
[Output("refreshTokenIdleExpiration")]
public Output<string> RefreshTokenIdleExpiration { get; private set; } = null!;


/// <summary>
/// Create a DefaultOidcSettings 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 DefaultOidcSettings(string name, DefaultOidcSettingsArgs args, CustomResourceOptions? options = null)
: base("zitadel:index/defaultOidcSettings:DefaultOidcSettings", name, args ?? new DefaultOidcSettingsArgs(), MakeResourceOptions(options, ""))
{
}

private DefaultOidcSettings(string name, Input<string> id, DefaultOidcSettingsState? state = null, CustomResourceOptions? options = null)
: base("zitadel:index/defaultOidcSettings:DefaultOidcSettings", name, state, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/pulumiverse",
};
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 DefaultOidcSettings 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 DefaultOidcSettings Get(string name, Input<string> id, DefaultOidcSettingsState? state = null, CustomResourceOptions? options = null)
{
return new DefaultOidcSettings(name, id, state, options);
}
}

public sealed class DefaultOidcSettingsArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// lifetime duration of access tokens
/// </summary>
[Input("accessTokenLifetime", required: true)]
public Input<string> AccessTokenLifetime { get; set; } = null!;

/// <summary>
/// lifetime duration of id tokens
/// </summary>
[Input("idTokenLifetime", required: true)]
public Input<string> IdTokenLifetime { get; set; } = null!;

/// <summary>
/// expiration duration of refresh tokens
/// </summary>
[Input("refreshTokenExpiration", required: true)]
public Input<string> RefreshTokenExpiration { get; set; } = null!;

/// <summary>
/// expiration duration of idle refresh tokens
/// </summary>
[Input("refreshTokenIdleExpiration", required: true)]
public Input<string> RefreshTokenIdleExpiration { get; set; } = null!;

public DefaultOidcSettingsArgs()
{
}
public static new DefaultOidcSettingsArgs Empty => new DefaultOidcSettingsArgs();
}

public sealed class DefaultOidcSettingsState : global::Pulumi.ResourceArgs
{
/// <summary>
/// lifetime duration of access tokens
/// </summary>
[Input("accessTokenLifetime")]
public Input<string>? AccessTokenLifetime { get; set; }

/// <summary>
/// lifetime duration of id tokens
/// </summary>
[Input("idTokenLifetime")]
public Input<string>? IdTokenLifetime { get; set; }

/// <summary>
/// expiration duration of refresh tokens
/// </summary>
[Input("refreshTokenExpiration")]
public Input<string>? RefreshTokenExpiration { get; set; }

/// <summary>
/// expiration duration of idle refresh tokens
/// </summary>
[Input("refreshTokenIdleExpiration")]
public Input<string>? RefreshTokenIdleExpiration { get; set; }

public DefaultOidcSettingsState()
{
}
public static new DefaultOidcSettingsState Empty => new DefaultOidcSettingsState();
}
}
88 changes: 88 additions & 0 deletions sdk/dotnet/GetDefaultOidcSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// *** 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;
using Pulumi;

namespace Pulumiverse.Zitadel
{
public static class GetDefaultOidcSettings
{
/// <summary>
/// Datasource representing the default oidc settings.
///
/// {{% examples %}}
/// ## Example Usage
/// {{% example %}}
///
/// ```csharp
/// using System.Collections.Generic;
/// using Pulumi;
/// using Zitadel = Pulumi.Zitadel;
///
/// return await Deployment.RunAsync(() =&gt;
/// {
/// var @default = Zitadel.GetDefaultOidcSettings.Invoke();
///
/// return new Dictionary&lt;string, object?&gt;
/// {
/// ["oidcSettings"] = @default.Apply(getDefaultOidcSettingsResult =&gt; getDefaultOidcSettingsResult),
/// };
/// });
/// ```
/// {{% /example %}}
/// {{% /examples %}}
/// </summary>
public static Task<GetDefaultOidcSettingsResult> InvokeAsync(InvokeOptions? options = null)
=> Pulumi.Deployment.Instance.InvokeAsync<GetDefaultOidcSettingsResult>("zitadel:index/getDefaultOidcSettings:getDefaultOidcSettings", InvokeArgs.Empty, options.WithDefaults());
}


[OutputType]
public sealed class GetDefaultOidcSettingsResult
{
/// <summary>
/// lifetime duration of access tokens
/// </summary>
public readonly string AccessTokenLifetime;
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
/// <summary>
/// lifetime duration of id tokens
/// </summary>
public readonly string IdTokenLifetime;
/// <summary>
/// expiration duration of refresh tokens
/// </summary>
public readonly string RefreshTokenExpiration;
/// <summary>
/// expiration duration of idle refresh tokens
/// </summary>
public readonly string RefreshTokenIdleExpiration;

[OutputConstructor]
private GetDefaultOidcSettingsResult(
string accessTokenLifetime,

string id,

string idTokenLifetime,

string refreshTokenExpiration,

string refreshTokenIdleExpiration)
{
AccessTokenLifetime = accessTokenLifetime;
Id = id;
IdTokenLifetime = idTokenLifetime;
RefreshTokenExpiration = refreshTokenExpiration;
RefreshTokenIdleExpiration = refreshTokenIdleExpiration;
}
}
}
Loading

0 comments on commit 679ba26

Please sign in to comment.