diff --git a/Makefile b/Makefile index 4b30264..59a2476 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,6 @@ build_nodejs:: install_plugins tfgen # build the node sdk cd sdk/nodejs/ && \ yarn install && \ yarn run tsc && \ - cp -R scripts/ bin/ && \ cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \ sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json diff --git a/sdk/dotnet/GetTwingateUser.cs b/sdk/dotnet/GetTwingateUser.cs index 0772d2a..9ace274 100644 --- a/sdk/dotnet/GetTwingateUser.cs +++ b/sdk/dotnet/GetTwingateUser.cs @@ -52,6 +52,7 @@ public sealed class GetTwingateUserResult public readonly bool IsAdmin; public readonly string LastName; public readonly string Role; + public readonly string Type; [OutputConstructor] private GetTwingateUserResult( @@ -65,7 +66,9 @@ private GetTwingateUserResult( string lastName, - string role) + string role, + + string type) { Email = email; FirstName = firstName; @@ -73,6 +76,7 @@ private GetTwingateUserResult( IsAdmin = isAdmin; LastName = lastName; Role = role; + Type = type; } } } diff --git a/sdk/dotnet/Inputs/GetTwingateUsersUser.cs b/sdk/dotnet/Inputs/GetTwingateUsersUser.cs index b34d8a3..6784bb4 100644 --- a/sdk/dotnet/Inputs/GetTwingateUsersUser.cs +++ b/sdk/dotnet/Inputs/GetTwingateUsersUser.cs @@ -31,6 +31,9 @@ public sealed class GetTwingateUsersUserArgs : global::Pulumi.InvokeArgs [Input("role", required: true)] public string Role { get; set; } = null!; + [Input("type", required: true)] + public string Type { get; set; } = null!; + public GetTwingateUsersUserArgs() { } diff --git a/sdk/dotnet/Inputs/GetTwingateUsersUserArgs.cs b/sdk/dotnet/Inputs/GetTwingateUsersUserArgs.cs index 86fb5ca..bc0835b 100644 --- a/sdk/dotnet/Inputs/GetTwingateUsersUserArgs.cs +++ b/sdk/dotnet/Inputs/GetTwingateUsersUserArgs.cs @@ -31,6 +31,9 @@ public sealed class GetTwingateUsersUserInputArgs : global::Pulumi.ResourceArgs [Input("role", required: true)] public Input Role { get; set; } = null!; + [Input("type", required: true)] + public Input Type { get; set; } = null!; + public GetTwingateUsersUserInputArgs() { } diff --git a/sdk/dotnet/Outputs/GetTwingateUsersUserResult.cs b/sdk/dotnet/Outputs/GetTwingateUsersUserResult.cs index 39b686c..c7dca37 100644 --- a/sdk/dotnet/Outputs/GetTwingateUsersUserResult.cs +++ b/sdk/dotnet/Outputs/GetTwingateUsersUserResult.cs @@ -20,6 +20,7 @@ public sealed class GetTwingateUsersUserResult public readonly bool IsAdmin; public readonly string LastName; public readonly string Role; + public readonly string Type; [OutputConstructor] private GetTwingateUsersUserResult( @@ -33,7 +34,9 @@ private GetTwingateUsersUserResult( string lastName, - string role) + string role, + + string type) { Email = email; FirstName = firstName; @@ -41,6 +44,7 @@ private GetTwingateUsersUserResult( IsAdmin = isAdmin; LastName = lastName; Role = role; + Type = type; } } } diff --git a/sdk/dotnet/TwingateLabs.Twingate.csproj b/sdk/dotnet/TwingateLabs.Twingate.csproj index ff29530..757c89e 100644 --- a/sdk/dotnet/TwingateLabs.Twingate.csproj +++ b/sdk/dotnet/TwingateLabs.Twingate.csproj @@ -12,7 +12,6 @@ net6.0 enable - false diff --git a/sdk/dotnet/TwingateUser.cs b/sdk/dotnet/TwingateUser.cs new file mode 100644 index 0000000..8bde9fb --- /dev/null +++ b/sdk/dotnet/TwingateUser.cs @@ -0,0 +1,196 @@ +// *** 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 TwingateLabs.Twingate +{ + [TwingateResourceType("twingate:index/twingateUser:TwingateUser")] + public partial class TwingateUser : global::Pulumi.CustomResource + { + /// + /// The User's email address + /// + [Output("email")] + public Output Email { get; private set; } = null!; + + /// + /// The User's first name + /// + [Output("firstName")] + public Output FirstName { get; private set; } = null!; + + /// + /// Determines whether the User is active or not. Inactive users will be not able to sign in. + /// + [Output("isActive")] + public Output IsActive { get; private set; } = null!; + + /// + /// The User's last name + /// + [Output("lastName")] + public Output LastName { get; private set; } = null!; + + /// + /// Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + /// + [Output("role")] + public Output Role { get; private set; } = null!; + + /// + /// Determines whether to send an email invitation to the User. True by default. + /// + [Output("sendInvite")] + public Output SendInvite { get; private set; } = null!; + + /// + /// Indicates the User's type. Either MANUAL or SYNCED. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a TwingateUser resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public TwingateUser(string name, TwingateUserArgs args, CustomResourceOptions? options = null) + : base("twingate:index/twingateUser:TwingateUser", name, args ?? new TwingateUserArgs(), MakeResourceOptions(options, "")) + { + } + + private TwingateUser(string name, Input id, TwingateUserState? state = null, CustomResourceOptions? options = null) + : base("twingate:index/twingateUser:TwingateUser", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + PluginDownloadURL = "github://api.github.com/twingate-labs", + }; + 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; + } + /// + /// Get an existing TwingateUser resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static TwingateUser Get(string name, Input id, TwingateUserState? state = null, CustomResourceOptions? options = null) + { + return new TwingateUser(name, id, state, options); + } + } + + public sealed class TwingateUserArgs : global::Pulumi.ResourceArgs + { + /// + /// The User's email address + /// + [Input("email", required: true)] + public Input Email { get; set; } = null!; + + /// + /// The User's first name + /// + [Input("firstName")] + public Input? FirstName { get; set; } + + /// + /// Determines whether the User is active or not. Inactive users will be not able to sign in. + /// + [Input("isActive")] + public Input? IsActive { get; set; } + + /// + /// The User's last name + /// + [Input("lastName")] + public Input? LastName { get; set; } + + /// + /// Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + /// + [Input("role")] + public Input? Role { get; set; } + + /// + /// Determines whether to send an email invitation to the User. True by default. + /// + [Input("sendInvite")] + public Input? SendInvite { get; set; } + + public TwingateUserArgs() + { + } + public static new TwingateUserArgs Empty => new TwingateUserArgs(); + } + + public sealed class TwingateUserState : global::Pulumi.ResourceArgs + { + /// + /// The User's email address + /// + [Input("email")] + public Input? Email { get; set; } + + /// + /// The User's first name + /// + [Input("firstName")] + public Input? FirstName { get; set; } + + /// + /// Determines whether the User is active or not. Inactive users will be not able to sign in. + /// + [Input("isActive")] + public Input? IsActive { get; set; } + + /// + /// The User's last name + /// + [Input("lastName")] + public Input? LastName { get; set; } + + /// + /// Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + /// + [Input("role")] + public Input? Role { get; set; } + + /// + /// Determines whether to send an email invitation to the User. True by default. + /// + [Input("sendInvite")] + public Input? SendInvite { get; set; } + + /// + /// Indicates the User's type. Either MANUAL or SYNCED. + /// + [Input("type")] + public Input? Type { get; set; } + + public TwingateUserState() + { + } + public static new TwingateUserState Empty => new TwingateUserState(); + } +} diff --git a/sdk/go/twingate/config/config.go b/sdk/go/twingate/config/config.go index 406dffc..adc6521 100644 --- a/sdk/go/twingate/config/config.go +++ b/sdk/go/twingate/config/config.go @@ -4,10 +4,13 @@ package config import ( + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) +var _ = internal.GetEnvOrDefault + // The access key for API operations. You can retrieve this from the Twingate Admin Console // ([documentation](https://docs.twingate.com/docs/api-overview)). Alternatively, this can be specified using the // TWINGATE_API_TOKEN environment variable. @@ -22,7 +25,9 @@ func GetHttpMaxRetry(ctx *pulumi.Context) int { if err == nil { return v } - return 5 + var value int + value = 5 + return value } // Specifies a time limit in seconds for the http requests made. The default value is 10 seconds. Alternatively, this can @@ -32,7 +37,9 @@ func GetHttpTimeout(ctx *pulumi.Context) int { if err == nil { return v } - return 10 + var value int + value = 10 + return value } // Your Twingate network ID for API operations. You can find it in the Admin Console URL, for example: diff --git a/sdk/go/twingate/getTwingateConnector.go b/sdk/go/twingate/getTwingateConnector.go index 9cbc7c6..1e60e50 100644 --- a/sdk/go/twingate/getTwingateConnector.go +++ b/sdk/go/twingate/getTwingateConnector.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func LookupTwingateConnector(ctx *pulumi.Context, args *LookupTwingateConnectorArgs, opts ...pulumi.InvokeOption) (*LookupTwingateConnectorResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTwingateConnectorResult err := ctx.Invoke("twingate:index/getTwingateConnector:getTwingateConnector", args, &rv, opts...) if err != nil { @@ -70,6 +72,12 @@ func (o LookupTwingateConnectorResultOutput) ToLookupTwingateConnectorResultOutp return o } +func (o LookupTwingateConnectorResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupTwingateConnectorResult] { + return pulumix.Output[LookupTwingateConnectorResult]{ + OutputState: o.OutputState, + } +} + func (o LookupTwingateConnectorResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTwingateConnectorResult) string { return v.Id }).(pulumi.StringOutput) } diff --git a/sdk/go/twingate/getTwingateConnectors.go b/sdk/go/twingate/getTwingateConnectors.go index cac6438..20e7a80 100644 --- a/sdk/go/twingate/getTwingateConnectors.go +++ b/sdk/go/twingate/getTwingateConnectors.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateConnectors(ctx *pulumi.Context, args *GetTwingateConnectorsArgs, opts ...pulumi.InvokeOption) (*GetTwingateConnectorsResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateConnectorsResult err := ctx.Invoke("twingate:index/getTwingateConnectors:getTwingateConnectors", args, &rv, opts...) if err != nil { @@ -69,6 +71,12 @@ func (o GetTwingateConnectorsResultOutput) ToGetTwingateConnectorsResultOutputWi return o } +func (o GetTwingateConnectorsResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateConnectorsResult] { + return pulumix.Output[GetTwingateConnectorsResult]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateConnectorsResultOutput) Connectors() GetTwingateConnectorsConnectorArrayOutput { return o.ApplyT(func(v GetTwingateConnectorsResult) []GetTwingateConnectorsConnector { return v.Connectors }).(GetTwingateConnectorsConnectorArrayOutput) } diff --git a/sdk/go/twingate/getTwingateGroup.go b/sdk/go/twingate/getTwingateGroup.go index 201a741..6e5497f 100644 --- a/sdk/go/twingate/getTwingateGroup.go +++ b/sdk/go/twingate/getTwingateGroup.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func LookupTwingateGroup(ctx *pulumi.Context, args *LookupTwingateGroupArgs, opts ...pulumi.InvokeOption) (*LookupTwingateGroupResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTwingateGroupResult err := ctx.Invoke("twingate:index/getTwingateGroup:getTwingateGroup", args, &rv, opts...) if err != nil { @@ -71,6 +73,12 @@ func (o LookupTwingateGroupResultOutput) ToLookupTwingateGroupResultOutputWithCo return o } +func (o LookupTwingateGroupResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupTwingateGroupResult] { + return pulumix.Output[LookupTwingateGroupResult]{ + OutputState: o.OutputState, + } +} + func (o LookupTwingateGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTwingateGroupResult) string { return v.Id }).(pulumi.StringOutput) } diff --git a/sdk/go/twingate/getTwingateGroups.go b/sdk/go/twingate/getTwingateGroups.go index fa90aaa..a82108e 100644 --- a/sdk/go/twingate/getTwingateGroups.go +++ b/sdk/go/twingate/getTwingateGroups.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateGroups(ctx *pulumi.Context, args *GetTwingateGroupsArgs, opts ...pulumi.InvokeOption) (*GetTwingateGroupsResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateGroupsResult err := ctx.Invoke("twingate:index/getTwingateGroups:getTwingateGroups", args, &rv, opts...) if err != nil { @@ -78,6 +80,12 @@ func (o GetTwingateGroupsResultOutput) ToGetTwingateGroupsResultOutputWithContex return o } +func (o GetTwingateGroupsResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateGroupsResult] { + return pulumix.Output[GetTwingateGroupsResult]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateGroupsResultOutput) Groups() GetTwingateGroupsGroupArrayOutput { return o.ApplyT(func(v GetTwingateGroupsResult) []GetTwingateGroupsGroup { return v.Groups }).(GetTwingateGroupsGroupArrayOutput) } diff --git a/sdk/go/twingate/getTwingateRemoteNetwork.go b/sdk/go/twingate/getTwingateRemoteNetwork.go index b98711f..b33ff9f 100644 --- a/sdk/go/twingate/getTwingateRemoteNetwork.go +++ b/sdk/go/twingate/getTwingateRemoteNetwork.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func LookupTwingateRemoteNetwork(ctx *pulumi.Context, args *LookupTwingateRemoteNetworkArgs, opts ...pulumi.InvokeOption) (*LookupTwingateRemoteNetworkResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTwingateRemoteNetworkResult err := ctx.Invoke("twingate:index/getTwingateRemoteNetwork:getTwingateRemoteNetwork", args, &rv, opts...) if err != nil { @@ -71,6 +73,12 @@ func (o LookupTwingateRemoteNetworkResultOutput) ToLookupTwingateRemoteNetworkRe return o } +func (o LookupTwingateRemoteNetworkResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupTwingateRemoteNetworkResult] { + return pulumix.Output[LookupTwingateRemoteNetworkResult]{ + OutputState: o.OutputState, + } +} + func (o LookupTwingateRemoteNetworkResultOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupTwingateRemoteNetworkResult) *string { return v.Id }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/twingate/getTwingateRemoteNetworks.go b/sdk/go/twingate/getTwingateRemoteNetworks.go index b742432..89a62c1 100644 --- a/sdk/go/twingate/getTwingateRemoteNetworks.go +++ b/sdk/go/twingate/getTwingateRemoteNetworks.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateRemoteNetworks(ctx *pulumi.Context, args *GetTwingateRemoteNetworksArgs, opts ...pulumi.InvokeOption) (*GetTwingateRemoteNetworksResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateRemoteNetworksResult err := ctx.Invoke("twingate:index/getTwingateRemoteNetworks:getTwingateRemoteNetworks", args, &rv, opts...) if err != nil { @@ -69,6 +71,12 @@ func (o GetTwingateRemoteNetworksResultOutput) ToGetTwingateRemoteNetworksResult return o } +func (o GetTwingateRemoteNetworksResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateRemoteNetworksResult] { + return pulumix.Output[GetTwingateRemoteNetworksResult]{ + OutputState: o.OutputState, + } +} + // The provider-assigned unique ID for this managed resource. func (o GetTwingateRemoteNetworksResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateRemoteNetworksResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/twingate/getTwingateResource.go b/sdk/go/twingate/getTwingateResource.go index b81a89a..aa66cfb 100644 --- a/sdk/go/twingate/getTwingateResource.go +++ b/sdk/go/twingate/getTwingateResource.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func LookupTwingateResource(ctx *pulumi.Context, args *LookupTwingateResourceArgs, opts ...pulumi.InvokeOption) (*LookupTwingateResourceResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTwingateResourceResult err := ctx.Invoke("twingate:index/getTwingateResource:getTwingateResource", args, &rv, opts...) if err != nil { @@ -73,6 +75,12 @@ func (o LookupTwingateResourceResultOutput) ToLookupTwingateResourceResultOutput return o } +func (o LookupTwingateResourceResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupTwingateResourceResult] { + return pulumix.Output[LookupTwingateResourceResult]{ + OutputState: o.OutputState, + } +} + func (o LookupTwingateResourceResultOutput) Address() pulumi.StringOutput { return o.ApplyT(func(v LookupTwingateResourceResult) string { return v.Address }).(pulumi.StringOutput) } diff --git a/sdk/go/twingate/getTwingateResources.go b/sdk/go/twingate/getTwingateResources.go index 1db835b..4591f6a 100644 --- a/sdk/go/twingate/getTwingateResources.go +++ b/sdk/go/twingate/getTwingateResources.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateResources(ctx *pulumi.Context, args *GetTwingateResourcesArgs, opts ...pulumi.InvokeOption) (*GetTwingateResourcesResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateResourcesResult err := ctx.Invoke("twingate:index/getTwingateResources:getTwingateResources", args, &rv, opts...) if err != nil { @@ -72,6 +74,12 @@ func (o GetTwingateResourcesResultOutput) ToGetTwingateResourcesResultOutputWith return o } +func (o GetTwingateResourcesResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResult] { + return pulumix.Output[GetTwingateResourcesResult]{ + OutputState: o.OutputState, + } +} + // The provider-assigned unique ID for this managed resource. func (o GetTwingateResourcesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourcesResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/twingate/getTwingateSecurityPolicies.go b/sdk/go/twingate/getTwingateSecurityPolicies.go index b56a81f..4b599ab 100644 --- a/sdk/go/twingate/getTwingateSecurityPolicies.go +++ b/sdk/go/twingate/getTwingateSecurityPolicies.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateSecurityPolicies(ctx *pulumi.Context, args *GetTwingateSecurityPoliciesArgs, opts ...pulumi.InvokeOption) (*GetTwingateSecurityPoliciesResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateSecurityPoliciesResult err := ctx.Invoke("twingate:index/getTwingateSecurityPolicies:getTwingateSecurityPolicies", args, &rv, opts...) if err != nil { @@ -69,6 +71,12 @@ func (o GetTwingateSecurityPoliciesResultOutput) ToGetTwingateSecurityPoliciesRe return o } +func (o GetTwingateSecurityPoliciesResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateSecurityPoliciesResult] { + return pulumix.Output[GetTwingateSecurityPoliciesResult]{ + OutputState: o.OutputState, + } +} + // The provider-assigned unique ID for this managed resource. func (o GetTwingateSecurityPoliciesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateSecurityPoliciesResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/twingate/getTwingateSecurityPolicy.go b/sdk/go/twingate/getTwingateSecurityPolicy.go index 9eed2ac..d70855a 100644 --- a/sdk/go/twingate/getTwingateSecurityPolicy.go +++ b/sdk/go/twingate/getTwingateSecurityPolicy.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateSecurityPolicy(ctx *pulumi.Context, args *GetTwingateSecurityPolicyArgs, opts ...pulumi.InvokeOption) (*GetTwingateSecurityPolicyResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateSecurityPolicyResult err := ctx.Invoke("twingate:index/getTwingateSecurityPolicy:getTwingateSecurityPolicy", args, &rv, opts...) if err != nil { @@ -70,6 +72,12 @@ func (o GetTwingateSecurityPolicyResultOutput) ToGetTwingateSecurityPolicyResult return o } +func (o GetTwingateSecurityPolicyResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateSecurityPolicyResult] { + return pulumix.Output[GetTwingateSecurityPolicyResult]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateSecurityPolicyResultOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v GetTwingateSecurityPolicyResult) *string { return v.Id }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/twingate/getTwingateServiceAccounts.go b/sdk/go/twingate/getTwingateServiceAccounts.go index 7ddeb9d..3ac7c84 100644 --- a/sdk/go/twingate/getTwingateServiceAccounts.go +++ b/sdk/go/twingate/getTwingateServiceAccounts.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateServiceAccounts(ctx *pulumi.Context, args *GetTwingateServiceAccountsArgs, opts ...pulumi.InvokeOption) (*GetTwingateServiceAccountsResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateServiceAccountsResult err := ctx.Invoke("twingate:index/getTwingateServiceAccounts:getTwingateServiceAccounts", args, &rv, opts...) if err != nil { @@ -72,6 +74,12 @@ func (o GetTwingateServiceAccountsResultOutput) ToGetTwingateServiceAccountsResu return o } +func (o GetTwingateServiceAccountsResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateServiceAccountsResult] { + return pulumix.Output[GetTwingateServiceAccountsResult]{ + OutputState: o.OutputState, + } +} + // The provider-assigned unique ID for this managed resource. func (o GetTwingateServiceAccountsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateServiceAccountsResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/twingate/getTwingateUser.go b/sdk/go/twingate/getTwingateUser.go index 0819775..b277087 100644 --- a/sdk/go/twingate/getTwingateUser.go +++ b/sdk/go/twingate/getTwingateUser.go @@ -7,12 +7,14 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) -func GetTwingateUser(ctx *pulumi.Context, args *GetTwingateUserArgs, opts ...pulumi.InvokeOption) (*GetTwingateUserResult, error) { - opts = pkgInvokeDefaultOpts(opts) - var rv GetTwingateUserResult +func LookupTwingateUser(ctx *pulumi.Context, args *LookupTwingateUserArgs, opts ...pulumi.InvokeOption) (*LookupTwingateUserResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupTwingateUserResult err := ctx.Invoke("twingate:index/getTwingateUser:getTwingateUser", args, &rv, opts...) if err != nil { return nil, err @@ -21,81 +23,94 @@ func GetTwingateUser(ctx *pulumi.Context, args *GetTwingateUserArgs, opts ...pul } // A collection of arguments for invoking getTwingateUser. -type GetTwingateUserArgs struct { +type LookupTwingateUserArgs struct { Id string `pulumi:"id"` } // A collection of values returned by getTwingateUser. -type GetTwingateUserResult struct { +type LookupTwingateUserResult struct { Email string `pulumi:"email"` FirstName string `pulumi:"firstName"` Id string `pulumi:"id"` - IsAdmin bool `pulumi:"isAdmin"` - LastName string `pulumi:"lastName"` - Role string `pulumi:"role"` + // Deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead. + IsAdmin bool `pulumi:"isAdmin"` + LastName string `pulumi:"lastName"` + Role string `pulumi:"role"` + Type string `pulumi:"type"` } -func GetTwingateUserOutput(ctx *pulumi.Context, args GetTwingateUserOutputArgs, opts ...pulumi.InvokeOption) GetTwingateUserResultOutput { +func LookupTwingateUserOutput(ctx *pulumi.Context, args LookupTwingateUserOutputArgs, opts ...pulumi.InvokeOption) LookupTwingateUserResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). - ApplyT(func(v interface{}) (GetTwingateUserResult, error) { - args := v.(GetTwingateUserArgs) - r, err := GetTwingateUser(ctx, &args, opts...) - var s GetTwingateUserResult + ApplyT(func(v interface{}) (LookupTwingateUserResult, error) { + args := v.(LookupTwingateUserArgs) + r, err := LookupTwingateUser(ctx, &args, opts...) + var s LookupTwingateUserResult if r != nil { s = *r } return s, err - }).(GetTwingateUserResultOutput) + }).(LookupTwingateUserResultOutput) } // A collection of arguments for invoking getTwingateUser. -type GetTwingateUserOutputArgs struct { +type LookupTwingateUserOutputArgs struct { Id pulumi.StringInput `pulumi:"id"` } -func (GetTwingateUserOutputArgs) ElementType() reflect.Type { - return reflect.TypeOf((*GetTwingateUserArgs)(nil)).Elem() +func (LookupTwingateUserOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupTwingateUserArgs)(nil)).Elem() } // A collection of values returned by getTwingateUser. -type GetTwingateUserResultOutput struct{ *pulumi.OutputState } +type LookupTwingateUserResultOutput struct{ *pulumi.OutputState } -func (GetTwingateUserResultOutput) ElementType() reflect.Type { - return reflect.TypeOf((*GetTwingateUserResult)(nil)).Elem() +func (LookupTwingateUserResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupTwingateUserResult)(nil)).Elem() } -func (o GetTwingateUserResultOutput) ToGetTwingateUserResultOutput() GetTwingateUserResultOutput { +func (o LookupTwingateUserResultOutput) ToLookupTwingateUserResultOutput() LookupTwingateUserResultOutput { return o } -func (o GetTwingateUserResultOutput) ToGetTwingateUserResultOutputWithContext(ctx context.Context) GetTwingateUserResultOutput { +func (o LookupTwingateUserResultOutput) ToLookupTwingateUserResultOutputWithContext(ctx context.Context) LookupTwingateUserResultOutput { return o } -func (o GetTwingateUserResultOutput) Email() pulumi.StringOutput { - return o.ApplyT(func(v GetTwingateUserResult) string { return v.Email }).(pulumi.StringOutput) +func (o LookupTwingateUserResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupTwingateUserResult] { + return pulumix.Output[LookupTwingateUserResult]{ + OutputState: o.OutputState, + } +} + +func (o LookupTwingateUserResultOutput) Email() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.Email }).(pulumi.StringOutput) +} + +func (o LookupTwingateUserResultOutput) FirstName() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.FirstName }).(pulumi.StringOutput) } -func (o GetTwingateUserResultOutput) FirstName() pulumi.StringOutput { - return o.ApplyT(func(v GetTwingateUserResult) string { return v.FirstName }).(pulumi.StringOutput) +func (o LookupTwingateUserResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.Id }).(pulumi.StringOutput) } -func (o GetTwingateUserResultOutput) Id() pulumi.StringOutput { - return o.ApplyT(func(v GetTwingateUserResult) string { return v.Id }).(pulumi.StringOutput) +// Deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead. +func (o LookupTwingateUserResultOutput) IsAdmin() pulumi.BoolOutput { + return o.ApplyT(func(v LookupTwingateUserResult) bool { return v.IsAdmin }).(pulumi.BoolOutput) } -func (o GetTwingateUserResultOutput) IsAdmin() pulumi.BoolOutput { - return o.ApplyT(func(v GetTwingateUserResult) bool { return v.IsAdmin }).(pulumi.BoolOutput) +func (o LookupTwingateUserResultOutput) LastName() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.LastName }).(pulumi.StringOutput) } -func (o GetTwingateUserResultOutput) LastName() pulumi.StringOutput { - return o.ApplyT(func(v GetTwingateUserResult) string { return v.LastName }).(pulumi.StringOutput) +func (o LookupTwingateUserResultOutput) Role() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.Role }).(pulumi.StringOutput) } -func (o GetTwingateUserResultOutput) Role() pulumi.StringOutput { - return o.ApplyT(func(v GetTwingateUserResult) string { return v.Role }).(pulumi.StringOutput) +func (o LookupTwingateUserResultOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v LookupTwingateUserResult) string { return v.Type }).(pulumi.StringOutput) } func init() { - pulumi.RegisterOutputType(GetTwingateUserResultOutput{}) + pulumi.RegisterOutputType(LookupTwingateUserResultOutput{}) } diff --git a/sdk/go/twingate/getTwingateUsers.go b/sdk/go/twingate/getTwingateUsers.go index f1ecefa..8ec319c 100644 --- a/sdk/go/twingate/getTwingateUsers.go +++ b/sdk/go/twingate/getTwingateUsers.go @@ -7,11 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) func GetTwingateUsers(ctx *pulumi.Context, args *GetTwingateUsersArgs, opts ...pulumi.InvokeOption) (*GetTwingateUsersResult, error) { - opts = pkgInvokeDefaultOpts(opts) + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTwingateUsersResult err := ctx.Invoke("twingate:index/getTwingateUsers:getTwingateUsers", args, &rv, opts...) if err != nil { @@ -69,6 +71,12 @@ func (o GetTwingateUsersResultOutput) ToGetTwingateUsersResultOutputWithContext( return o } +func (o GetTwingateUsersResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateUsersResult] { + return pulumix.Output[GetTwingateUsersResult]{ + OutputState: o.OutputState, + } +} + // The provider-assigned unique ID for this managed resource. func (o GetTwingateUsersResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateUsersResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/twingate/init.go b/sdk/go/twingate/init.go index f350874..041c57f 100644 --- a/sdk/go/twingate/init.go +++ b/sdk/go/twingate/init.go @@ -6,6 +6,7 @@ package twingate import ( "fmt" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/blang/semver" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -34,6 +35,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &TwingateServiceAccount{} case "twingate:index/twingateServiceAccountKey:TwingateServiceAccountKey": r = &TwingateServiceAccountKey{} + case "twingate:index/twingateUser:TwingateUser": + r = &TwingateUser{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } @@ -61,7 +64,10 @@ func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pul } func init() { - version, _ := PkgVersion() + version, err := internal.PkgVersion() + if err != nil { + version = semver.Version{Major: 1} + } pulumi.RegisterResourceModule( "twingate", "index/twingateConnector", @@ -97,6 +103,11 @@ func init() { "index/twingateServiceAccountKey", &module{version}, ) + pulumi.RegisterResourceModule( + "twingate", + "index/twingateUser", + &module{version}, + ) pulumi.RegisterResourcePackage( "twingate", &pkg{version}, diff --git a/sdk/go/twingate/pulumiUtilities.go b/sdk/go/twingate/internal/pulumiUtilities.go similarity index 60% rename from sdk/go/twingate/pulumiUtilities.go rename to sdk/go/twingate/internal/pulumiUtilities.go index 17601de..1fd8445 100644 --- a/sdk/go/twingate/pulumiUtilities.go +++ b/sdk/go/twingate/internal/pulumiUtilities.go @@ -1,7 +1,7 @@ // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** -package twingate +package internal import ( "fmt" @@ -17,7 +17,7 @@ import ( type envParser func(v string) interface{} -func parseEnvBool(v string) interface{} { +func ParseEnvBool(v string) interface{} { b, err := strconv.ParseBool(v) if err != nil { return nil @@ -25,7 +25,7 @@ func parseEnvBool(v string) interface{} { return b } -func parseEnvInt(v string) interface{} { +func ParseEnvInt(v string) interface{} { i, err := strconv.ParseInt(v, 0, 0) if err != nil { return nil @@ -33,7 +33,7 @@ func parseEnvInt(v string) interface{} { return int(i) } -func parseEnvFloat(v string) interface{} { +func ParseEnvFloat(v string) interface{} { f, err := strconv.ParseFloat(v, 64) if err != nil { return nil @@ -41,7 +41,7 @@ func parseEnvFloat(v string) interface{} { return f } -func parseEnvStringArray(v string) interface{} { +func ParseEnvStringArray(v string) interface{} { var result pulumi.StringArray for _, item := range strings.Split(v, ";") { result = append(result, pulumi.String(item)) @@ -49,9 +49,9 @@ func parseEnvStringArray(v string) interface{} { return result } -func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { +func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { for _, v := range vars { - if value := os.Getenv(v); value != "" { + if value, ok := os.LookupEnv(v); ok { if parser != nil { return parser(value) } @@ -65,6 +65,10 @@ func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interfac // If a version cannot be determined, v1 will be assumed. The second return // value is always nil. func PkgVersion() (semver.Version, error) { + // emptyVersion defaults to v0.0.0 + if !SdkVersion.Equals(semver.Version{}) { + return SdkVersion, nil + } type sentinal struct{} pkgPath := reflect.TypeOf(sentinal{}).PkgPath() re := regexp.MustCompile("^.*/pulumi-twingate/sdk(/v\\d+)?") @@ -79,23 +83,31 @@ func PkgVersion() (semver.Version, error) { } // isZero is a null safe check for if a value is it's types zero value. -func isZero(v interface{}) bool { +func IsZero(v interface{}) bool { if v == nil { return true } return reflect.ValueOf(v).IsZero() } -// pkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. -func pkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { - defaults := []pulumi.ResourceOption{pulumi.PluginDownloadURL("github://api.github.com/twingate-labs")} - +// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. +func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { + defaults := []pulumi.ResourceOption{} + defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/twingate-labs")) + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } return append(defaults, opts...) } -// pkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. -func pkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { - defaults := []pulumi.InvokeOption{pulumi.PluginDownloadURL("github://api.github.com/twingate-labs")} - +// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. +func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { + defaults := []pulumi.InvokeOption{} + defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/twingate-labs")) + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } return append(defaults, opts...) } diff --git a/sdk/go/twingate/internal/pulumiVersion.go b/sdk/go/twingate/internal/pulumiVersion.go new file mode 100644 index 0000000..d591687 --- /dev/null +++ b/sdk/go/twingate/internal/pulumiVersion.go @@ -0,0 +1,11 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package internal + +import ( + "github.com/blang/semver" +) + +var SdkVersion semver.Version = semver.Version{} +var pluginDownloadURL string = "" diff --git a/sdk/go/twingate/provider.go b/sdk/go/twingate/provider.go index 1771aca..3181069 100644 --- a/sdk/go/twingate/provider.go +++ b/sdk/go/twingate/provider.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // The provider type for the twingate package. By default, resources use package-wide configuration @@ -49,7 +51,7 @@ func NewProvider(ctx *pulumi.Context, "apiToken", }) opts = append(opts, secrets) - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource Provider err := ctx.RegisterResource("pulumi:providers:twingate", name, args, &resource, opts...) if err != nil { @@ -120,6 +122,12 @@ func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutp return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) } +func (i *Provider) ToOutput(ctx context.Context) pulumix.Output[*Provider] { + return pulumix.Output[*Provider]{ + OutputState: i.ToProviderOutputWithContext(ctx).OutputState, + } +} + type ProviderOutput struct{ *pulumi.OutputState } func (ProviderOutput) ElementType() reflect.Type { @@ -134,6 +142,12 @@ func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) Provide return o } +func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[*Provider] { + return pulumix.Output[*Provider]{ + OutputState: o.OutputState, + } +} + // The access key for API operations. You can retrieve this from the Twingate Admin Console // ([documentation](https://docs.twingate.com/docs/api-overview)). Alternatively, this can be specified using the // TWINGATE_API_TOKEN environment variable. diff --git a/sdk/go/twingate/pulumiTypes.go b/sdk/go/twingate/pulumiTypes.go index 3971860..ef03cfc 100644 --- a/sdk/go/twingate/pulumiTypes.go +++ b/sdk/go/twingate/pulumiTypes.go @@ -7,9 +7,13 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) +var _ = internal.GetEnvOrDefault + type TwingateResourceAccess struct { GroupIds []string `pulumi:"groupIds"` ServiceAccountIds []string `pulumi:"serviceAccountIds"` @@ -43,6 +47,12 @@ func (i TwingateResourceAccessArgs) ToTwingateResourceAccessOutputWithContext(ct return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceAccessOutput) } +func (i TwingateResourceAccessArgs) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceAccess] { + return pulumix.Output[TwingateResourceAccess]{ + OutputState: i.ToTwingateResourceAccessOutputWithContext(ctx).OutputState, + } +} + func (i TwingateResourceAccessArgs) ToTwingateResourceAccessPtrOutput() TwingateResourceAccessPtrOutput { return i.ToTwingateResourceAccessPtrOutputWithContext(context.Background()) } @@ -84,6 +94,12 @@ func (i *twingateResourceAccessPtrType) ToTwingateResourceAccessPtrOutputWithCon return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceAccessPtrOutput) } +func (i *twingateResourceAccessPtrType) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceAccess] { + return pulumix.Output[*TwingateResourceAccess]{ + OutputState: i.ToTwingateResourceAccessPtrOutputWithContext(ctx).OutputState, + } +} + type TwingateResourceAccessOutput struct{ *pulumi.OutputState } func (TwingateResourceAccessOutput) ElementType() reflect.Type { @@ -108,6 +124,12 @@ func (o TwingateResourceAccessOutput) ToTwingateResourceAccessPtrOutputWithConte }).(TwingateResourceAccessPtrOutput) } +func (o TwingateResourceAccessOutput) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceAccess] { + return pulumix.Output[TwingateResourceAccess]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceAccessOutput) GroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v TwingateResourceAccess) []string { return v.GroupIds }).(pulumi.StringArrayOutput) } @@ -130,6 +152,12 @@ func (o TwingateResourceAccessPtrOutput) ToTwingateResourceAccessPtrOutputWithCo return o } +func (o TwingateResourceAccessPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceAccess] { + return pulumix.Output[*TwingateResourceAccess]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceAccessPtrOutput) Elem() TwingateResourceAccessOutput { return o.ApplyT(func(v *TwingateResourceAccess) TwingateResourceAccess { if v != nil { @@ -193,6 +221,12 @@ func (i TwingateResourceProtocolsArgs) ToTwingateResourceProtocolsOutputWithCont return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsOutput) } +func (i TwingateResourceProtocolsArgs) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocols] { + return pulumix.Output[TwingateResourceProtocols]{ + OutputState: i.ToTwingateResourceProtocolsOutputWithContext(ctx).OutputState, + } +} + func (i TwingateResourceProtocolsArgs) ToTwingateResourceProtocolsPtrOutput() TwingateResourceProtocolsPtrOutput { return i.ToTwingateResourceProtocolsPtrOutputWithContext(context.Background()) } @@ -234,6 +268,12 @@ func (i *twingateResourceProtocolsPtrType) ToTwingateResourceProtocolsPtrOutputW return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsPtrOutput) } +func (i *twingateResourceProtocolsPtrType) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocols] { + return pulumix.Output[*TwingateResourceProtocols]{ + OutputState: i.ToTwingateResourceProtocolsPtrOutputWithContext(ctx).OutputState, + } +} + type TwingateResourceProtocolsOutput struct{ *pulumi.OutputState } func (TwingateResourceProtocolsOutput) ElementType() reflect.Type { @@ -258,6 +298,12 @@ func (o TwingateResourceProtocolsOutput) ToTwingateResourceProtocolsPtrOutputWit }).(TwingateResourceProtocolsPtrOutput) } +func (o TwingateResourceProtocolsOutput) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocols] { + return pulumix.Output[TwingateResourceProtocols]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsOutput) AllowIcmp() pulumi.BoolPtrOutput { return o.ApplyT(func(v TwingateResourceProtocols) *bool { return v.AllowIcmp }).(pulumi.BoolPtrOutput) } @@ -284,6 +330,12 @@ func (o TwingateResourceProtocolsPtrOutput) ToTwingateResourceProtocolsPtrOutput return o } +func (o TwingateResourceProtocolsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocols] { + return pulumix.Output[*TwingateResourceProtocols]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsPtrOutput) Elem() TwingateResourceProtocolsOutput { return o.ApplyT(func(v *TwingateResourceProtocols) TwingateResourceProtocols { if v != nil { @@ -354,6 +406,12 @@ func (i TwingateResourceProtocolsTcpArgs) ToTwingateResourceProtocolsTcpOutputWi return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsTcpOutput) } +func (i TwingateResourceProtocolsTcpArgs) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocolsTcp] { + return pulumix.Output[TwingateResourceProtocolsTcp]{ + OutputState: i.ToTwingateResourceProtocolsTcpOutputWithContext(ctx).OutputState, + } +} + func (i TwingateResourceProtocolsTcpArgs) ToTwingateResourceProtocolsTcpPtrOutput() TwingateResourceProtocolsTcpPtrOutput { return i.ToTwingateResourceProtocolsTcpPtrOutputWithContext(context.Background()) } @@ -395,6 +453,12 @@ func (i *twingateResourceProtocolsTcpPtrType) ToTwingateResourceProtocolsTcpPtrO return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsTcpPtrOutput) } +func (i *twingateResourceProtocolsTcpPtrType) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocolsTcp] { + return pulumix.Output[*TwingateResourceProtocolsTcp]{ + OutputState: i.ToTwingateResourceProtocolsTcpPtrOutputWithContext(ctx).OutputState, + } +} + type TwingateResourceProtocolsTcpOutput struct{ *pulumi.OutputState } func (TwingateResourceProtocolsTcpOutput) ElementType() reflect.Type { @@ -419,6 +483,12 @@ func (o TwingateResourceProtocolsTcpOutput) ToTwingateResourceProtocolsTcpPtrOut }).(TwingateResourceProtocolsTcpPtrOutput) } +func (o TwingateResourceProtocolsTcpOutput) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocolsTcp] { + return pulumix.Output[TwingateResourceProtocolsTcp]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsTcpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v TwingateResourceProtocolsTcp) string { return v.Policy }).(pulumi.StringOutput) } @@ -441,6 +511,12 @@ func (o TwingateResourceProtocolsTcpPtrOutput) ToTwingateResourceProtocolsTcpPtr return o } +func (o TwingateResourceProtocolsTcpPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocolsTcp] { + return pulumix.Output[*TwingateResourceProtocolsTcp]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsTcpPtrOutput) Elem() TwingateResourceProtocolsTcpOutput { return o.ApplyT(func(v *TwingateResourceProtocolsTcp) TwingateResourceProtocolsTcp { if v != nil { @@ -502,6 +578,12 @@ func (i TwingateResourceProtocolsUdpArgs) ToTwingateResourceProtocolsUdpOutputWi return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsUdpOutput) } +func (i TwingateResourceProtocolsUdpArgs) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocolsUdp] { + return pulumix.Output[TwingateResourceProtocolsUdp]{ + OutputState: i.ToTwingateResourceProtocolsUdpOutputWithContext(ctx).OutputState, + } +} + func (i TwingateResourceProtocolsUdpArgs) ToTwingateResourceProtocolsUdpPtrOutput() TwingateResourceProtocolsUdpPtrOutput { return i.ToTwingateResourceProtocolsUdpPtrOutputWithContext(context.Background()) } @@ -543,6 +625,12 @@ func (i *twingateResourceProtocolsUdpPtrType) ToTwingateResourceProtocolsUdpPtrO return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceProtocolsUdpPtrOutput) } +func (i *twingateResourceProtocolsUdpPtrType) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocolsUdp] { + return pulumix.Output[*TwingateResourceProtocolsUdp]{ + OutputState: i.ToTwingateResourceProtocolsUdpPtrOutputWithContext(ctx).OutputState, + } +} + type TwingateResourceProtocolsUdpOutput struct{ *pulumi.OutputState } func (TwingateResourceProtocolsUdpOutput) ElementType() reflect.Type { @@ -567,6 +655,12 @@ func (o TwingateResourceProtocolsUdpOutput) ToTwingateResourceProtocolsUdpPtrOut }).(TwingateResourceProtocolsUdpPtrOutput) } +func (o TwingateResourceProtocolsUdpOutput) ToOutput(ctx context.Context) pulumix.Output[TwingateResourceProtocolsUdp] { + return pulumix.Output[TwingateResourceProtocolsUdp]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsUdpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v TwingateResourceProtocolsUdp) string { return v.Policy }).(pulumi.StringOutput) } @@ -589,6 +683,12 @@ func (o TwingateResourceProtocolsUdpPtrOutput) ToTwingateResourceProtocolsUdpPtr return o } +func (o TwingateResourceProtocolsUdpPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateResourceProtocolsUdp] { + return pulumix.Output[*TwingateResourceProtocolsUdp]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceProtocolsUdpPtrOutput) Elem() TwingateResourceProtocolsUdpOutput { return o.ApplyT(func(v *TwingateResourceProtocolsUdp) TwingateResourceProtocolsUdp { if v != nil { @@ -654,6 +754,12 @@ func (i GetTwingateConnectorsConnectorArgs) ToGetTwingateConnectorsConnectorOutp return pulumi.ToOutputWithContext(ctx, i).(GetTwingateConnectorsConnectorOutput) } +func (i GetTwingateConnectorsConnectorArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateConnectorsConnector] { + return pulumix.Output[GetTwingateConnectorsConnector]{ + OutputState: i.ToGetTwingateConnectorsConnectorOutputWithContext(ctx).OutputState, + } +} + // GetTwingateConnectorsConnectorArrayInput is an input type that accepts GetTwingateConnectorsConnectorArray and GetTwingateConnectorsConnectorArrayOutput values. // You can construct a concrete instance of `GetTwingateConnectorsConnectorArrayInput` via: // @@ -679,6 +785,12 @@ func (i GetTwingateConnectorsConnectorArray) ToGetTwingateConnectorsConnectorArr return pulumi.ToOutputWithContext(ctx, i).(GetTwingateConnectorsConnectorArrayOutput) } +func (i GetTwingateConnectorsConnectorArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateConnectorsConnector] { + return pulumix.Output[[]GetTwingateConnectorsConnector]{ + OutputState: i.ToGetTwingateConnectorsConnectorArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateConnectorsConnectorOutput struct{ *pulumi.OutputState } func (GetTwingateConnectorsConnectorOutput) ElementType() reflect.Type { @@ -693,6 +805,12 @@ func (o GetTwingateConnectorsConnectorOutput) ToGetTwingateConnectorsConnectorOu return o } +func (o GetTwingateConnectorsConnectorOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateConnectorsConnector] { + return pulumix.Output[GetTwingateConnectorsConnector]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateConnectorsConnectorOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateConnectorsConnector) string { return v.Id }).(pulumi.StringOutput) } @@ -723,6 +841,12 @@ func (o GetTwingateConnectorsConnectorArrayOutput) ToGetTwingateConnectorsConnec return o } +func (o GetTwingateConnectorsConnectorArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateConnectorsConnector] { + return pulumix.Output[[]GetTwingateConnectorsConnector]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateConnectorsConnectorArrayOutput) Index(i pulumi.IntInput) GetTwingateConnectorsConnectorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateConnectorsConnector { return vs[0].([]GetTwingateConnectorsConnector)[vs[1].(int)] @@ -768,6 +892,12 @@ func (i GetTwingateGroupsGroupArgs) ToGetTwingateGroupsGroupOutputWithContext(ct return pulumi.ToOutputWithContext(ctx, i).(GetTwingateGroupsGroupOutput) } +func (i GetTwingateGroupsGroupArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateGroupsGroup] { + return pulumix.Output[GetTwingateGroupsGroup]{ + OutputState: i.ToGetTwingateGroupsGroupOutputWithContext(ctx).OutputState, + } +} + // GetTwingateGroupsGroupArrayInput is an input type that accepts GetTwingateGroupsGroupArray and GetTwingateGroupsGroupArrayOutput values. // You can construct a concrete instance of `GetTwingateGroupsGroupArrayInput` via: // @@ -793,6 +923,12 @@ func (i GetTwingateGroupsGroupArray) ToGetTwingateGroupsGroupArrayOutputWithCont return pulumi.ToOutputWithContext(ctx, i).(GetTwingateGroupsGroupArrayOutput) } +func (i GetTwingateGroupsGroupArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateGroupsGroup] { + return pulumix.Output[[]GetTwingateGroupsGroup]{ + OutputState: i.ToGetTwingateGroupsGroupArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateGroupsGroupOutput struct{ *pulumi.OutputState } func (GetTwingateGroupsGroupOutput) ElementType() reflect.Type { @@ -807,6 +943,12 @@ func (o GetTwingateGroupsGroupOutput) ToGetTwingateGroupsGroupOutputWithContext( return o } +func (o GetTwingateGroupsGroupOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateGroupsGroup] { + return pulumix.Output[GetTwingateGroupsGroup]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateGroupsGroupOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateGroupsGroup) string { return v.Id }).(pulumi.StringOutput) } @@ -841,6 +983,12 @@ func (o GetTwingateGroupsGroupArrayOutput) ToGetTwingateGroupsGroupArrayOutputWi return o } +func (o GetTwingateGroupsGroupArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateGroupsGroup] { + return pulumix.Output[[]GetTwingateGroupsGroup]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateGroupsGroupArrayOutput) Index(i pulumi.IntInput) GetTwingateGroupsGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateGroupsGroup { return vs[0].([]GetTwingateGroupsGroup)[vs[1].(int)] @@ -882,6 +1030,12 @@ func (i GetTwingateRemoteNetworksRemoteNetworkArgs) ToGetTwingateRemoteNetworksR return pulumi.ToOutputWithContext(ctx, i).(GetTwingateRemoteNetworksRemoteNetworkOutput) } +func (i GetTwingateRemoteNetworksRemoteNetworkArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateRemoteNetworksRemoteNetwork] { + return pulumix.Output[GetTwingateRemoteNetworksRemoteNetwork]{ + OutputState: i.ToGetTwingateRemoteNetworksRemoteNetworkOutputWithContext(ctx).OutputState, + } +} + // GetTwingateRemoteNetworksRemoteNetworkArrayInput is an input type that accepts GetTwingateRemoteNetworksRemoteNetworkArray and GetTwingateRemoteNetworksRemoteNetworkArrayOutput values. // You can construct a concrete instance of `GetTwingateRemoteNetworksRemoteNetworkArrayInput` via: // @@ -907,6 +1061,12 @@ func (i GetTwingateRemoteNetworksRemoteNetworkArray) ToGetTwingateRemoteNetworks return pulumi.ToOutputWithContext(ctx, i).(GetTwingateRemoteNetworksRemoteNetworkArrayOutput) } +func (i GetTwingateRemoteNetworksRemoteNetworkArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateRemoteNetworksRemoteNetwork] { + return pulumix.Output[[]GetTwingateRemoteNetworksRemoteNetwork]{ + OutputState: i.ToGetTwingateRemoteNetworksRemoteNetworkArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateRemoteNetworksRemoteNetworkOutput struct{ *pulumi.OutputState } func (GetTwingateRemoteNetworksRemoteNetworkOutput) ElementType() reflect.Type { @@ -921,6 +1081,12 @@ func (o GetTwingateRemoteNetworksRemoteNetworkOutput) ToGetTwingateRemoteNetwork return o } +func (o GetTwingateRemoteNetworksRemoteNetworkOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateRemoteNetworksRemoteNetwork] { + return pulumix.Output[GetTwingateRemoteNetworksRemoteNetwork]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateRemoteNetworksRemoteNetworkOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateRemoteNetworksRemoteNetwork) string { return v.Id }).(pulumi.StringOutput) } @@ -947,6 +1113,12 @@ func (o GetTwingateRemoteNetworksRemoteNetworkArrayOutput) ToGetTwingateRemoteNe return o } +func (o GetTwingateRemoteNetworksRemoteNetworkArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateRemoteNetworksRemoteNetwork] { + return pulumix.Output[[]GetTwingateRemoteNetworksRemoteNetwork]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateRemoteNetworksRemoteNetworkArrayOutput) Index(i pulumi.IntInput) GetTwingateRemoteNetworksRemoteNetworkOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateRemoteNetworksRemoteNetwork { return vs[0].([]GetTwingateRemoteNetworksRemoteNetwork)[vs[1].(int)] @@ -988,6 +1160,12 @@ func (i GetTwingateResourceProtocolArgs) ToGetTwingateResourceProtocolOutputWith return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolOutput) } +func (i GetTwingateResourceProtocolArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocol] { + return pulumix.Output[GetTwingateResourceProtocol]{ + OutputState: i.ToGetTwingateResourceProtocolOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourceProtocolArrayInput is an input type that accepts GetTwingateResourceProtocolArray and GetTwingateResourceProtocolArrayOutput values. // You can construct a concrete instance of `GetTwingateResourceProtocolArrayInput` via: // @@ -1013,6 +1191,12 @@ func (i GetTwingateResourceProtocolArray) ToGetTwingateResourceProtocolArrayOutp return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolArrayOutput) } +func (i GetTwingateResourceProtocolArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocol] { + return pulumix.Output[[]GetTwingateResourceProtocol]{ + OutputState: i.ToGetTwingateResourceProtocolArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourceProtocolOutput struct{ *pulumi.OutputState } func (GetTwingateResourceProtocolOutput) ElementType() reflect.Type { @@ -1027,6 +1211,12 @@ func (o GetTwingateResourceProtocolOutput) ToGetTwingateResourceProtocolOutputWi return o } +func (o GetTwingateResourceProtocolOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocol] { + return pulumix.Output[GetTwingateResourceProtocol]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolOutput) AllowIcmp() pulumi.BoolOutput { return o.ApplyT(func(v GetTwingateResourceProtocol) bool { return v.AllowIcmp }).(pulumi.BoolOutput) } @@ -1053,6 +1243,12 @@ func (o GetTwingateResourceProtocolArrayOutput) ToGetTwingateResourceProtocolArr return o } +func (o GetTwingateResourceProtocolArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocol] { + return pulumix.Output[[]GetTwingateResourceProtocol]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolArrayOutput) Index(i pulumi.IntInput) GetTwingateResourceProtocolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourceProtocol { return vs[0].([]GetTwingateResourceProtocol)[vs[1].(int)] @@ -1092,6 +1288,12 @@ func (i GetTwingateResourceProtocolTcpArgs) ToGetTwingateResourceProtocolTcpOutp return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolTcpOutput) } +func (i GetTwingateResourceProtocolTcpArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocolTcp] { + return pulumix.Output[GetTwingateResourceProtocolTcp]{ + OutputState: i.ToGetTwingateResourceProtocolTcpOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourceProtocolTcpArrayInput is an input type that accepts GetTwingateResourceProtocolTcpArray and GetTwingateResourceProtocolTcpArrayOutput values. // You can construct a concrete instance of `GetTwingateResourceProtocolTcpArrayInput` via: // @@ -1117,6 +1319,12 @@ func (i GetTwingateResourceProtocolTcpArray) ToGetTwingateResourceProtocolTcpArr return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolTcpArrayOutput) } +func (i GetTwingateResourceProtocolTcpArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocolTcp] { + return pulumix.Output[[]GetTwingateResourceProtocolTcp]{ + OutputState: i.ToGetTwingateResourceProtocolTcpArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourceProtocolTcpOutput struct{ *pulumi.OutputState } func (GetTwingateResourceProtocolTcpOutput) ElementType() reflect.Type { @@ -1131,6 +1339,12 @@ func (o GetTwingateResourceProtocolTcpOutput) ToGetTwingateResourceProtocolTcpOu return o } +func (o GetTwingateResourceProtocolTcpOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocolTcp] { + return pulumix.Output[GetTwingateResourceProtocolTcp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolTcpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourceProtocolTcp) string { return v.Policy }).(pulumi.StringOutput) } @@ -1153,6 +1367,12 @@ func (o GetTwingateResourceProtocolTcpArrayOutput) ToGetTwingateResourceProtocol return o } +func (o GetTwingateResourceProtocolTcpArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocolTcp] { + return pulumix.Output[[]GetTwingateResourceProtocolTcp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolTcpArrayOutput) Index(i pulumi.IntInput) GetTwingateResourceProtocolTcpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourceProtocolTcp { return vs[0].([]GetTwingateResourceProtocolTcp)[vs[1].(int)] @@ -1192,6 +1412,12 @@ func (i GetTwingateResourceProtocolUdpArgs) ToGetTwingateResourceProtocolUdpOutp return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolUdpOutput) } +func (i GetTwingateResourceProtocolUdpArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocolUdp] { + return pulumix.Output[GetTwingateResourceProtocolUdp]{ + OutputState: i.ToGetTwingateResourceProtocolUdpOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourceProtocolUdpArrayInput is an input type that accepts GetTwingateResourceProtocolUdpArray and GetTwingateResourceProtocolUdpArrayOutput values. // You can construct a concrete instance of `GetTwingateResourceProtocolUdpArrayInput` via: // @@ -1217,6 +1443,12 @@ func (i GetTwingateResourceProtocolUdpArray) ToGetTwingateResourceProtocolUdpArr return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourceProtocolUdpArrayOutput) } +func (i GetTwingateResourceProtocolUdpArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocolUdp] { + return pulumix.Output[[]GetTwingateResourceProtocolUdp]{ + OutputState: i.ToGetTwingateResourceProtocolUdpArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourceProtocolUdpOutput struct{ *pulumi.OutputState } func (GetTwingateResourceProtocolUdpOutput) ElementType() reflect.Type { @@ -1231,6 +1463,12 @@ func (o GetTwingateResourceProtocolUdpOutput) ToGetTwingateResourceProtocolUdpOu return o } +func (o GetTwingateResourceProtocolUdpOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourceProtocolUdp] { + return pulumix.Output[GetTwingateResourceProtocolUdp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolUdpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourceProtocolUdp) string { return v.Policy }).(pulumi.StringOutput) } @@ -1253,6 +1491,12 @@ func (o GetTwingateResourceProtocolUdpArrayOutput) ToGetTwingateResourceProtocol return o } +func (o GetTwingateResourceProtocolUdpArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourceProtocolUdp] { + return pulumix.Output[[]GetTwingateResourceProtocolUdp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourceProtocolUdpArrayOutput) Index(i pulumi.IntInput) GetTwingateResourceProtocolUdpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourceProtocolUdp { return vs[0].([]GetTwingateResourceProtocolUdp)[vs[1].(int)] @@ -1298,6 +1542,12 @@ func (i GetTwingateResourcesResourceArgs) ToGetTwingateResourcesResourceOutputWi return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceOutput) } +func (i GetTwingateResourcesResourceArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResource] { + return pulumix.Output[GetTwingateResourcesResource]{ + OutputState: i.ToGetTwingateResourcesResourceOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourcesResourceArrayInput is an input type that accepts GetTwingateResourcesResourceArray and GetTwingateResourcesResourceArrayOutput values. // You can construct a concrete instance of `GetTwingateResourcesResourceArrayInput` via: // @@ -1323,6 +1573,12 @@ func (i GetTwingateResourcesResourceArray) ToGetTwingateResourcesResourceArrayOu return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceArrayOutput) } +func (i GetTwingateResourcesResourceArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResource] { + return pulumix.Output[[]GetTwingateResourcesResource]{ + OutputState: i.ToGetTwingateResourcesResourceArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourcesResourceOutput struct{ *pulumi.OutputState } func (GetTwingateResourcesResourceOutput) ElementType() reflect.Type { @@ -1337,6 +1593,12 @@ func (o GetTwingateResourcesResourceOutput) ToGetTwingateResourcesResourceOutput return o } +func (o GetTwingateResourcesResourceOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResource] { + return pulumix.Output[GetTwingateResourcesResource]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceOutput) Address() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourcesResource) string { return v.Address }).(pulumi.StringOutput) } @@ -1371,6 +1633,12 @@ func (o GetTwingateResourcesResourceArrayOutput) ToGetTwingateResourcesResourceA return o } +func (o GetTwingateResourcesResourceArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResource] { + return pulumix.Output[[]GetTwingateResourcesResource]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceArrayOutput) Index(i pulumi.IntInput) GetTwingateResourcesResourceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourcesResource { return vs[0].([]GetTwingateResourcesResource)[vs[1].(int)] @@ -1412,6 +1680,12 @@ func (i GetTwingateResourcesResourceProtocolArgs) ToGetTwingateResourcesResource return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolOutput) } +func (i GetTwingateResourcesResourceProtocolArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocol] { + return pulumix.Output[GetTwingateResourcesResourceProtocol]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourcesResourceProtocolArrayInput is an input type that accepts GetTwingateResourcesResourceProtocolArray and GetTwingateResourcesResourceProtocolArrayOutput values. // You can construct a concrete instance of `GetTwingateResourcesResourceProtocolArrayInput` via: // @@ -1437,6 +1711,12 @@ func (i GetTwingateResourcesResourceProtocolArray) ToGetTwingateResourcesResourc return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolArrayOutput) } +func (i GetTwingateResourcesResourceProtocolArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocol] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocol]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourcesResourceProtocolOutput struct{ *pulumi.OutputState } func (GetTwingateResourcesResourceProtocolOutput) ElementType() reflect.Type { @@ -1451,6 +1731,12 @@ func (o GetTwingateResourcesResourceProtocolOutput) ToGetTwingateResourcesResour return o } +func (o GetTwingateResourcesResourceProtocolOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocol] { + return pulumix.Output[GetTwingateResourcesResourceProtocol]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolOutput) AllowIcmp() pulumi.BoolOutput { return o.ApplyT(func(v GetTwingateResourcesResourceProtocol) bool { return v.AllowIcmp }).(pulumi.BoolOutput) } @@ -1477,6 +1763,12 @@ func (o GetTwingateResourcesResourceProtocolArrayOutput) ToGetTwingateResourcesR return o } +func (o GetTwingateResourcesResourceProtocolArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocol] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocol]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolArrayOutput) Index(i pulumi.IntInput) GetTwingateResourcesResourceProtocolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourcesResourceProtocol { return vs[0].([]GetTwingateResourcesResourceProtocol)[vs[1].(int)] @@ -1516,6 +1808,12 @@ func (i GetTwingateResourcesResourceProtocolTcpArgs) ToGetTwingateResourcesResou return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolTcpOutput) } +func (i GetTwingateResourcesResourceProtocolTcpArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocolTcp] { + return pulumix.Output[GetTwingateResourcesResourceProtocolTcp]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolTcpOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourcesResourceProtocolTcpArrayInput is an input type that accepts GetTwingateResourcesResourceProtocolTcpArray and GetTwingateResourcesResourceProtocolTcpArrayOutput values. // You can construct a concrete instance of `GetTwingateResourcesResourceProtocolTcpArrayInput` via: // @@ -1541,6 +1839,12 @@ func (i GetTwingateResourcesResourceProtocolTcpArray) ToGetTwingateResourcesReso return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolTcpArrayOutput) } +func (i GetTwingateResourcesResourceProtocolTcpArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocolTcp] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocolTcp]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolTcpArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourcesResourceProtocolTcpOutput struct{ *pulumi.OutputState } func (GetTwingateResourcesResourceProtocolTcpOutput) ElementType() reflect.Type { @@ -1555,6 +1859,12 @@ func (o GetTwingateResourcesResourceProtocolTcpOutput) ToGetTwingateResourcesRes return o } +func (o GetTwingateResourcesResourceProtocolTcpOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocolTcp] { + return pulumix.Output[GetTwingateResourcesResourceProtocolTcp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolTcpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourcesResourceProtocolTcp) string { return v.Policy }).(pulumi.StringOutput) } @@ -1577,6 +1887,12 @@ func (o GetTwingateResourcesResourceProtocolTcpArrayOutput) ToGetTwingateResourc return o } +func (o GetTwingateResourcesResourceProtocolTcpArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocolTcp] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocolTcp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolTcpArrayOutput) Index(i pulumi.IntInput) GetTwingateResourcesResourceProtocolTcpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourcesResourceProtocolTcp { return vs[0].([]GetTwingateResourcesResourceProtocolTcp)[vs[1].(int)] @@ -1616,6 +1932,12 @@ func (i GetTwingateResourcesResourceProtocolUdpArgs) ToGetTwingateResourcesResou return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolUdpOutput) } +func (i GetTwingateResourcesResourceProtocolUdpArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocolUdp] { + return pulumix.Output[GetTwingateResourcesResourceProtocolUdp]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolUdpOutputWithContext(ctx).OutputState, + } +} + // GetTwingateResourcesResourceProtocolUdpArrayInput is an input type that accepts GetTwingateResourcesResourceProtocolUdpArray and GetTwingateResourcesResourceProtocolUdpArrayOutput values. // You can construct a concrete instance of `GetTwingateResourcesResourceProtocolUdpArrayInput` via: // @@ -1641,6 +1963,12 @@ func (i GetTwingateResourcesResourceProtocolUdpArray) ToGetTwingateResourcesReso return pulumi.ToOutputWithContext(ctx, i).(GetTwingateResourcesResourceProtocolUdpArrayOutput) } +func (i GetTwingateResourcesResourceProtocolUdpArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocolUdp] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocolUdp]{ + OutputState: i.ToGetTwingateResourcesResourceProtocolUdpArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateResourcesResourceProtocolUdpOutput struct{ *pulumi.OutputState } func (GetTwingateResourcesResourceProtocolUdpOutput) ElementType() reflect.Type { @@ -1655,6 +1983,12 @@ func (o GetTwingateResourcesResourceProtocolUdpOutput) ToGetTwingateResourcesRes return o } +func (o GetTwingateResourcesResourceProtocolUdpOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateResourcesResourceProtocolUdp] { + return pulumix.Output[GetTwingateResourcesResourceProtocolUdp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolUdpOutput) Policy() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateResourcesResourceProtocolUdp) string { return v.Policy }).(pulumi.StringOutput) } @@ -1677,6 +2011,12 @@ func (o GetTwingateResourcesResourceProtocolUdpArrayOutput) ToGetTwingateResourc return o } +func (o GetTwingateResourcesResourceProtocolUdpArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateResourcesResourceProtocolUdp] { + return pulumix.Output[[]GetTwingateResourcesResourceProtocolUdp]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateResourcesResourceProtocolUdpArrayOutput) Index(i pulumi.IntInput) GetTwingateResourcesResourceProtocolUdpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateResourcesResourceProtocolUdp { return vs[0].([]GetTwingateResourcesResourceProtocolUdp)[vs[1].(int)] @@ -1716,6 +2056,12 @@ func (i GetTwingateSecurityPoliciesSecurityPolicyArgs) ToGetTwingateSecurityPoli return pulumi.ToOutputWithContext(ctx, i).(GetTwingateSecurityPoliciesSecurityPolicyOutput) } +func (i GetTwingateSecurityPoliciesSecurityPolicyArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateSecurityPoliciesSecurityPolicy] { + return pulumix.Output[GetTwingateSecurityPoliciesSecurityPolicy]{ + OutputState: i.ToGetTwingateSecurityPoliciesSecurityPolicyOutputWithContext(ctx).OutputState, + } +} + // GetTwingateSecurityPoliciesSecurityPolicyArrayInput is an input type that accepts GetTwingateSecurityPoliciesSecurityPolicyArray and GetTwingateSecurityPoliciesSecurityPolicyArrayOutput values. // You can construct a concrete instance of `GetTwingateSecurityPoliciesSecurityPolicyArrayInput` via: // @@ -1741,6 +2087,12 @@ func (i GetTwingateSecurityPoliciesSecurityPolicyArray) ToGetTwingateSecurityPol return pulumi.ToOutputWithContext(ctx, i).(GetTwingateSecurityPoliciesSecurityPolicyArrayOutput) } +func (i GetTwingateSecurityPoliciesSecurityPolicyArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateSecurityPoliciesSecurityPolicy] { + return pulumix.Output[[]GetTwingateSecurityPoliciesSecurityPolicy]{ + OutputState: i.ToGetTwingateSecurityPoliciesSecurityPolicyArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateSecurityPoliciesSecurityPolicyOutput struct{ *pulumi.OutputState } func (GetTwingateSecurityPoliciesSecurityPolicyOutput) ElementType() reflect.Type { @@ -1755,6 +2107,12 @@ func (o GetTwingateSecurityPoliciesSecurityPolicyOutput) ToGetTwingateSecurityPo return o } +func (o GetTwingateSecurityPoliciesSecurityPolicyOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateSecurityPoliciesSecurityPolicy] { + return pulumix.Output[GetTwingateSecurityPoliciesSecurityPolicy]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateSecurityPoliciesSecurityPolicyOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateSecurityPoliciesSecurityPolicy) string { return v.Id }).(pulumi.StringOutput) } @@ -1777,6 +2135,12 @@ func (o GetTwingateSecurityPoliciesSecurityPolicyArrayOutput) ToGetTwingateSecur return o } +func (o GetTwingateSecurityPoliciesSecurityPolicyArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateSecurityPoliciesSecurityPolicy] { + return pulumix.Output[[]GetTwingateSecurityPoliciesSecurityPolicy]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateSecurityPoliciesSecurityPolicyArrayOutput) Index(i pulumi.IntInput) GetTwingateSecurityPoliciesSecurityPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateSecurityPoliciesSecurityPolicy { return vs[0].([]GetTwingateSecurityPoliciesSecurityPolicy)[vs[1].(int)] @@ -1820,6 +2184,12 @@ func (i GetTwingateServiceAccountsServiceAccountArgs) ToGetTwingateServiceAccoun return pulumi.ToOutputWithContext(ctx, i).(GetTwingateServiceAccountsServiceAccountOutput) } +func (i GetTwingateServiceAccountsServiceAccountArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateServiceAccountsServiceAccount] { + return pulumix.Output[GetTwingateServiceAccountsServiceAccount]{ + OutputState: i.ToGetTwingateServiceAccountsServiceAccountOutputWithContext(ctx).OutputState, + } +} + // GetTwingateServiceAccountsServiceAccountArrayInput is an input type that accepts GetTwingateServiceAccountsServiceAccountArray and GetTwingateServiceAccountsServiceAccountArrayOutput values. // You can construct a concrete instance of `GetTwingateServiceAccountsServiceAccountArrayInput` via: // @@ -1845,6 +2215,12 @@ func (i GetTwingateServiceAccountsServiceAccountArray) ToGetTwingateServiceAccou return pulumi.ToOutputWithContext(ctx, i).(GetTwingateServiceAccountsServiceAccountArrayOutput) } +func (i GetTwingateServiceAccountsServiceAccountArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateServiceAccountsServiceAccount] { + return pulumix.Output[[]GetTwingateServiceAccountsServiceAccount]{ + OutputState: i.ToGetTwingateServiceAccountsServiceAccountArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateServiceAccountsServiceAccountOutput struct{ *pulumi.OutputState } func (GetTwingateServiceAccountsServiceAccountOutput) ElementType() reflect.Type { @@ -1859,6 +2235,12 @@ func (o GetTwingateServiceAccountsServiceAccountOutput) ToGetTwingateServiceAcco return o } +func (o GetTwingateServiceAccountsServiceAccountOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateServiceAccountsServiceAccount] { + return pulumix.Output[GetTwingateServiceAccountsServiceAccount]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateServiceAccountsServiceAccountOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateServiceAccountsServiceAccount) string { return v.Id }).(pulumi.StringOutput) } @@ -1889,6 +2271,12 @@ func (o GetTwingateServiceAccountsServiceAccountArrayOutput) ToGetTwingateServic return o } +func (o GetTwingateServiceAccountsServiceAccountArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateServiceAccountsServiceAccount] { + return pulumix.Output[[]GetTwingateServiceAccountsServiceAccount]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateServiceAccountsServiceAccountArrayOutput) Index(i pulumi.IntInput) GetTwingateServiceAccountsServiceAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateServiceAccountsServiceAccount { return vs[0].([]GetTwingateServiceAccountsServiceAccount)[vs[1].(int)] @@ -1899,9 +2287,11 @@ type GetTwingateUsersUser struct { Email string `pulumi:"email"` FirstName string `pulumi:"firstName"` Id string `pulumi:"id"` - IsAdmin bool `pulumi:"isAdmin"` - LastName string `pulumi:"lastName"` - Role string `pulumi:"role"` + // Deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead. + IsAdmin bool `pulumi:"isAdmin"` + LastName string `pulumi:"lastName"` + Role string `pulumi:"role"` + Type string `pulumi:"type"` } // GetTwingateUsersUserInput is an input type that accepts GetTwingateUsersUserArgs and GetTwingateUsersUserOutput values. @@ -1919,9 +2309,11 @@ type GetTwingateUsersUserArgs struct { Email pulumi.StringInput `pulumi:"email"` FirstName pulumi.StringInput `pulumi:"firstName"` Id pulumi.StringInput `pulumi:"id"` - IsAdmin pulumi.BoolInput `pulumi:"isAdmin"` - LastName pulumi.StringInput `pulumi:"lastName"` - Role pulumi.StringInput `pulumi:"role"` + // Deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead. + IsAdmin pulumi.BoolInput `pulumi:"isAdmin"` + LastName pulumi.StringInput `pulumi:"lastName"` + Role pulumi.StringInput `pulumi:"role"` + Type pulumi.StringInput `pulumi:"type"` } func (GetTwingateUsersUserArgs) ElementType() reflect.Type { @@ -1936,6 +2328,12 @@ func (i GetTwingateUsersUserArgs) ToGetTwingateUsersUserOutputWithContext(ctx co return pulumi.ToOutputWithContext(ctx, i).(GetTwingateUsersUserOutput) } +func (i GetTwingateUsersUserArgs) ToOutput(ctx context.Context) pulumix.Output[GetTwingateUsersUser] { + return pulumix.Output[GetTwingateUsersUser]{ + OutputState: i.ToGetTwingateUsersUserOutputWithContext(ctx).OutputState, + } +} + // GetTwingateUsersUserArrayInput is an input type that accepts GetTwingateUsersUserArray and GetTwingateUsersUserArrayOutput values. // You can construct a concrete instance of `GetTwingateUsersUserArrayInput` via: // @@ -1961,6 +2359,12 @@ func (i GetTwingateUsersUserArray) ToGetTwingateUsersUserArrayOutputWithContext( return pulumi.ToOutputWithContext(ctx, i).(GetTwingateUsersUserArrayOutput) } +func (i GetTwingateUsersUserArray) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateUsersUser] { + return pulumix.Output[[]GetTwingateUsersUser]{ + OutputState: i.ToGetTwingateUsersUserArrayOutputWithContext(ctx).OutputState, + } +} + type GetTwingateUsersUserOutput struct{ *pulumi.OutputState } func (GetTwingateUsersUserOutput) ElementType() reflect.Type { @@ -1975,6 +2379,12 @@ func (o GetTwingateUsersUserOutput) ToGetTwingateUsersUserOutputWithContext(ctx return o } +func (o GetTwingateUsersUserOutput) ToOutput(ctx context.Context) pulumix.Output[GetTwingateUsersUser] { + return pulumix.Output[GetTwingateUsersUser]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateUsersUserOutput) Email() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateUsersUser) string { return v.Email }).(pulumi.StringOutput) } @@ -1987,6 +2397,7 @@ func (o GetTwingateUsersUserOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateUsersUser) string { return v.Id }).(pulumi.StringOutput) } +// Deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead. func (o GetTwingateUsersUserOutput) IsAdmin() pulumi.BoolOutput { return o.ApplyT(func(v GetTwingateUsersUser) bool { return v.IsAdmin }).(pulumi.BoolOutput) } @@ -1999,6 +2410,10 @@ func (o GetTwingateUsersUserOutput) Role() pulumi.StringOutput { return o.ApplyT(func(v GetTwingateUsersUser) string { return v.Role }).(pulumi.StringOutput) } +func (o GetTwingateUsersUserOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v GetTwingateUsersUser) string { return v.Type }).(pulumi.StringOutput) +} + type GetTwingateUsersUserArrayOutput struct{ *pulumi.OutputState } func (GetTwingateUsersUserArrayOutput) ElementType() reflect.Type { @@ -2013,6 +2428,12 @@ func (o GetTwingateUsersUserArrayOutput) ToGetTwingateUsersUserArrayOutputWithCo return o } +func (o GetTwingateUsersUserArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]GetTwingateUsersUser] { + return pulumix.Output[[]GetTwingateUsersUser]{ + OutputState: o.OutputState, + } +} + func (o GetTwingateUsersUserArrayOutput) Index(i pulumi.IntInput) GetTwingateUsersUserOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTwingateUsersUser { return vs[0].([]GetTwingateUsersUser)[vs[1].(int)] diff --git a/sdk/go/twingate/twingateConnector.go b/sdk/go/twingate/twingateConnector.go index e42b2ec..d2cfc66 100644 --- a/sdk/go/twingate/twingateConnector.go +++ b/sdk/go/twingate/twingateConnector.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateConnector struct { @@ -32,7 +34,7 @@ func NewTwingateConnector(ctx *pulumi.Context, if args.RemoteNetworkId == nil { return nil, errors.New("invalid value for required argument 'RemoteNetworkId'") } - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateConnector err := ctx.RegisterResource("twingate:index/twingateConnector:TwingateConnector", name, args, &resource, opts...) if err != nil { @@ -118,6 +120,12 @@ func (i *TwingateConnector) ToTwingateConnectorOutputWithContext(ctx context.Con return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorOutput) } +func (i *TwingateConnector) ToOutput(ctx context.Context) pulumix.Output[*TwingateConnector] { + return pulumix.Output[*TwingateConnector]{ + OutputState: i.ToTwingateConnectorOutputWithContext(ctx).OutputState, + } +} + // TwingateConnectorArrayInput is an input type that accepts TwingateConnectorArray and TwingateConnectorArrayOutput values. // You can construct a concrete instance of `TwingateConnectorArrayInput` via: // @@ -143,6 +151,12 @@ func (i TwingateConnectorArray) ToTwingateConnectorArrayOutputWithContext(ctx co return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorArrayOutput) } +func (i TwingateConnectorArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateConnector] { + return pulumix.Output[[]*TwingateConnector]{ + OutputState: i.ToTwingateConnectorArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateConnectorMapInput is an input type that accepts TwingateConnectorMap and TwingateConnectorMapOutput values. // You can construct a concrete instance of `TwingateConnectorMapInput` via: // @@ -168,6 +182,12 @@ func (i TwingateConnectorMap) ToTwingateConnectorMapOutputWithContext(ctx contex return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorMapOutput) } +func (i TwingateConnectorMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateConnector] { + return pulumix.Output[map[string]*TwingateConnector]{ + OutputState: i.ToTwingateConnectorMapOutputWithContext(ctx).OutputState, + } +} + type TwingateConnectorOutput struct{ *pulumi.OutputState } func (TwingateConnectorOutput) ElementType() reflect.Type { @@ -182,6 +202,12 @@ func (o TwingateConnectorOutput) ToTwingateConnectorOutputWithContext(ctx contex return o } +func (o TwingateConnectorOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateConnector] { + return pulumix.Output[*TwingateConnector]{ + OutputState: o.OutputState, + } +} + // Name of the Connector, if not provided one will be generated. func (o TwingateConnectorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TwingateConnector) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) @@ -211,6 +237,12 @@ func (o TwingateConnectorArrayOutput) ToTwingateConnectorArrayOutputWithContext( return o } +func (o TwingateConnectorArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateConnector] { + return pulumix.Output[[]*TwingateConnector]{ + OutputState: o.OutputState, + } +} + func (o TwingateConnectorArrayOutput) Index(i pulumi.IntInput) TwingateConnectorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateConnector { return vs[0].([]*TwingateConnector)[vs[1].(int)] @@ -231,6 +263,12 @@ func (o TwingateConnectorMapOutput) ToTwingateConnectorMapOutputWithContext(ctx return o } +func (o TwingateConnectorMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateConnector] { + return pulumix.Output[map[string]*TwingateConnector]{ + OutputState: o.OutputState, + } +} + func (o TwingateConnectorMapOutput) MapIndex(k pulumi.StringInput) TwingateConnectorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateConnector { return vs[0].(map[string]*TwingateConnector)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateConnectorTokens.go b/sdk/go/twingate/twingateConnectorTokens.go index f000534..b73e4e4 100644 --- a/sdk/go/twingate/twingateConnectorTokens.go +++ b/sdk/go/twingate/twingateConnectorTokens.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateConnectorTokens struct { @@ -40,7 +42,7 @@ func NewTwingateConnectorTokens(ctx *pulumi.Context, "refreshToken", }) opts = append(opts, secrets) - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateConnectorTokens err := ctx.RegisterResource("twingate:index/twingateConnectorTokens:TwingateConnectorTokens", name, args, &resource, opts...) if err != nil { @@ -130,6 +132,12 @@ func (i *TwingateConnectorTokens) ToTwingateConnectorTokensOutputWithContext(ctx return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorTokensOutput) } +func (i *TwingateConnectorTokens) ToOutput(ctx context.Context) pulumix.Output[*TwingateConnectorTokens] { + return pulumix.Output[*TwingateConnectorTokens]{ + OutputState: i.ToTwingateConnectorTokensOutputWithContext(ctx).OutputState, + } +} + // TwingateConnectorTokensArrayInput is an input type that accepts TwingateConnectorTokensArray and TwingateConnectorTokensArrayOutput values. // You can construct a concrete instance of `TwingateConnectorTokensArrayInput` via: // @@ -155,6 +163,12 @@ func (i TwingateConnectorTokensArray) ToTwingateConnectorTokensArrayOutputWithCo return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorTokensArrayOutput) } +func (i TwingateConnectorTokensArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateConnectorTokens] { + return pulumix.Output[[]*TwingateConnectorTokens]{ + OutputState: i.ToTwingateConnectorTokensArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateConnectorTokensMapInput is an input type that accepts TwingateConnectorTokensMap and TwingateConnectorTokensMapOutput values. // You can construct a concrete instance of `TwingateConnectorTokensMapInput` via: // @@ -180,6 +194,12 @@ func (i TwingateConnectorTokensMap) ToTwingateConnectorTokensMapOutputWithContex return pulumi.ToOutputWithContext(ctx, i).(TwingateConnectorTokensMapOutput) } +func (i TwingateConnectorTokensMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateConnectorTokens] { + return pulumix.Output[map[string]*TwingateConnectorTokens]{ + OutputState: i.ToTwingateConnectorTokensMapOutputWithContext(ctx).OutputState, + } +} + type TwingateConnectorTokensOutput struct{ *pulumi.OutputState } func (TwingateConnectorTokensOutput) ElementType() reflect.Type { @@ -194,6 +214,12 @@ func (o TwingateConnectorTokensOutput) ToTwingateConnectorTokensOutputWithContex return o } +func (o TwingateConnectorTokensOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateConnectorTokens] { + return pulumix.Output[*TwingateConnectorTokens]{ + OutputState: o.OutputState, + } +} + // The Access Token of the parent Connector func (o TwingateConnectorTokensOutput) AccessToken() pulumi.StringOutput { return o.ApplyT(func(v *TwingateConnectorTokens) pulumi.StringOutput { return v.AccessToken }).(pulumi.StringOutput) @@ -229,6 +255,12 @@ func (o TwingateConnectorTokensArrayOutput) ToTwingateConnectorTokensArrayOutput return o } +func (o TwingateConnectorTokensArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateConnectorTokens] { + return pulumix.Output[[]*TwingateConnectorTokens]{ + OutputState: o.OutputState, + } +} + func (o TwingateConnectorTokensArrayOutput) Index(i pulumi.IntInput) TwingateConnectorTokensOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateConnectorTokens { return vs[0].([]*TwingateConnectorTokens)[vs[1].(int)] @@ -249,6 +281,12 @@ func (o TwingateConnectorTokensMapOutput) ToTwingateConnectorTokensMapOutputWith return o } +func (o TwingateConnectorTokensMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateConnectorTokens] { + return pulumix.Output[map[string]*TwingateConnectorTokens]{ + OutputState: o.OutputState, + } +} + func (o TwingateConnectorTokensMapOutput) MapIndex(k pulumi.StringInput) TwingateConnectorTokensOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateConnectorTokens { return vs[0].(map[string]*TwingateConnectorTokens)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateGroup.go b/sdk/go/twingate/twingateGroup.go index 8aa82f9..add858d 100644 --- a/sdk/go/twingate/twingateGroup.go +++ b/sdk/go/twingate/twingateGroup.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateGroup struct { @@ -32,7 +34,7 @@ func NewTwingateGroup(ctx *pulumi.Context, args = &TwingateGroupArgs{} } - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateGroup err := ctx.RegisterResource("twingate:index/twingateGroup:TwingateGroup", name, args, &resource, opts...) if err != nil { @@ -134,6 +136,12 @@ func (i *TwingateGroup) ToTwingateGroupOutputWithContext(ctx context.Context) Tw return pulumi.ToOutputWithContext(ctx, i).(TwingateGroupOutput) } +func (i *TwingateGroup) ToOutput(ctx context.Context) pulumix.Output[*TwingateGroup] { + return pulumix.Output[*TwingateGroup]{ + OutputState: i.ToTwingateGroupOutputWithContext(ctx).OutputState, + } +} + // TwingateGroupArrayInput is an input type that accepts TwingateGroupArray and TwingateGroupArrayOutput values. // You can construct a concrete instance of `TwingateGroupArrayInput` via: // @@ -159,6 +167,12 @@ func (i TwingateGroupArray) ToTwingateGroupArrayOutputWithContext(ctx context.Co return pulumi.ToOutputWithContext(ctx, i).(TwingateGroupArrayOutput) } +func (i TwingateGroupArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateGroup] { + return pulumix.Output[[]*TwingateGroup]{ + OutputState: i.ToTwingateGroupArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateGroupMapInput is an input type that accepts TwingateGroupMap and TwingateGroupMapOutput values. // You can construct a concrete instance of `TwingateGroupMapInput` via: // @@ -184,6 +198,12 @@ func (i TwingateGroupMap) ToTwingateGroupMapOutputWithContext(ctx context.Contex return pulumi.ToOutputWithContext(ctx, i).(TwingateGroupMapOutput) } +func (i TwingateGroupMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateGroup] { + return pulumix.Output[map[string]*TwingateGroup]{ + OutputState: i.ToTwingateGroupMapOutputWithContext(ctx).OutputState, + } +} + type TwingateGroupOutput struct{ *pulumi.OutputState } func (TwingateGroupOutput) ElementType() reflect.Type { @@ -198,6 +218,12 @@ func (o TwingateGroupOutput) ToTwingateGroupOutputWithContext(ctx context.Contex return o } +func (o TwingateGroupOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateGroup] { + return pulumix.Output[*TwingateGroup]{ + OutputState: o.OutputState, + } +} + // Determines whether User assignments to this Group will override any existing assignments. Default is `true`. If set to // `false`, assignments made outside of Terraform will be ignored. func (o TwingateGroupOutput) IsAuthoritative() pulumi.BoolOutput { @@ -234,6 +260,12 @@ func (o TwingateGroupArrayOutput) ToTwingateGroupArrayOutputWithContext(ctx cont return o } +func (o TwingateGroupArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateGroup] { + return pulumix.Output[[]*TwingateGroup]{ + OutputState: o.OutputState, + } +} + func (o TwingateGroupArrayOutput) Index(i pulumi.IntInput) TwingateGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateGroup { return vs[0].([]*TwingateGroup)[vs[1].(int)] @@ -254,6 +286,12 @@ func (o TwingateGroupMapOutput) ToTwingateGroupMapOutputWithContext(ctx context. return o } +func (o TwingateGroupMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateGroup] { + return pulumix.Output[map[string]*TwingateGroup]{ + OutputState: o.OutputState, + } +} + func (o TwingateGroupMapOutput) MapIndex(k pulumi.StringInput) TwingateGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateGroup { return vs[0].(map[string]*TwingateGroup)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateRemoteNetwork.go b/sdk/go/twingate/twingateRemoteNetwork.go index 788f7c9..9623231 100644 --- a/sdk/go/twingate/twingateRemoteNetwork.go +++ b/sdk/go/twingate/twingateRemoteNetwork.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateRemoteNetwork struct { @@ -26,7 +28,7 @@ func NewTwingateRemoteNetwork(ctx *pulumi.Context, args = &TwingateRemoteNetworkArgs{} } - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateRemoteNetwork err := ctx.RegisterResource("twingate:index/twingateRemoteNetwork:TwingateRemoteNetwork", name, args, &resource, opts...) if err != nil { @@ -104,6 +106,12 @@ func (i *TwingateRemoteNetwork) ToTwingateRemoteNetworkOutputWithContext(ctx con return pulumi.ToOutputWithContext(ctx, i).(TwingateRemoteNetworkOutput) } +func (i *TwingateRemoteNetwork) ToOutput(ctx context.Context) pulumix.Output[*TwingateRemoteNetwork] { + return pulumix.Output[*TwingateRemoteNetwork]{ + OutputState: i.ToTwingateRemoteNetworkOutputWithContext(ctx).OutputState, + } +} + // TwingateRemoteNetworkArrayInput is an input type that accepts TwingateRemoteNetworkArray and TwingateRemoteNetworkArrayOutput values. // You can construct a concrete instance of `TwingateRemoteNetworkArrayInput` via: // @@ -129,6 +137,12 @@ func (i TwingateRemoteNetworkArray) ToTwingateRemoteNetworkArrayOutputWithContex return pulumi.ToOutputWithContext(ctx, i).(TwingateRemoteNetworkArrayOutput) } +func (i TwingateRemoteNetworkArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateRemoteNetwork] { + return pulumix.Output[[]*TwingateRemoteNetwork]{ + OutputState: i.ToTwingateRemoteNetworkArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateRemoteNetworkMapInput is an input type that accepts TwingateRemoteNetworkMap and TwingateRemoteNetworkMapOutput values. // You can construct a concrete instance of `TwingateRemoteNetworkMapInput` via: // @@ -154,6 +168,12 @@ func (i TwingateRemoteNetworkMap) ToTwingateRemoteNetworkMapOutputWithContext(ct return pulumi.ToOutputWithContext(ctx, i).(TwingateRemoteNetworkMapOutput) } +func (i TwingateRemoteNetworkMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateRemoteNetwork] { + return pulumix.Output[map[string]*TwingateRemoteNetwork]{ + OutputState: i.ToTwingateRemoteNetworkMapOutputWithContext(ctx).OutputState, + } +} + type TwingateRemoteNetworkOutput struct{ *pulumi.OutputState } func (TwingateRemoteNetworkOutput) ElementType() reflect.Type { @@ -168,6 +188,12 @@ func (o TwingateRemoteNetworkOutput) ToTwingateRemoteNetworkOutputWithContext(ct return o } +func (o TwingateRemoteNetworkOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateRemoteNetwork] { + return pulumix.Output[*TwingateRemoteNetwork]{ + OutputState: o.OutputState, + } +} + // The location of the Remote Network. Must be one of the following: AWS, AZURE, GOOGLE_CLOUD, ON_PREMISE, OTHER. func (o TwingateRemoteNetworkOutput) Location() pulumi.StringPtrOutput { return o.ApplyT(func(v *TwingateRemoteNetwork) pulumi.StringPtrOutput { return v.Location }).(pulumi.StringPtrOutput) @@ -192,6 +218,12 @@ func (o TwingateRemoteNetworkArrayOutput) ToTwingateRemoteNetworkArrayOutputWith return o } +func (o TwingateRemoteNetworkArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateRemoteNetwork] { + return pulumix.Output[[]*TwingateRemoteNetwork]{ + OutputState: o.OutputState, + } +} + func (o TwingateRemoteNetworkArrayOutput) Index(i pulumi.IntInput) TwingateRemoteNetworkOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateRemoteNetwork { return vs[0].([]*TwingateRemoteNetwork)[vs[1].(int)] @@ -212,6 +244,12 @@ func (o TwingateRemoteNetworkMapOutput) ToTwingateRemoteNetworkMapOutputWithCont return o } +func (o TwingateRemoteNetworkMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateRemoteNetwork] { + return pulumix.Output[map[string]*TwingateRemoteNetwork]{ + OutputState: o.OutputState, + } +} + func (o TwingateRemoteNetworkMapOutput) MapIndex(k pulumi.StringInput) TwingateRemoteNetworkOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateRemoteNetwork { return vs[0].(map[string]*TwingateRemoteNetwork)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateResource.go b/sdk/go/twingate/twingateResource.go index 3ef9725..d78bf3b 100644 --- a/sdk/go/twingate/twingateResource.go +++ b/sdk/go/twingate/twingateResource.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateResource struct { @@ -49,7 +51,7 @@ func NewTwingateResource(ctx *pulumi.Context, if args.RemoteNetworkId == nil { return nil, errors.New("invalid value for required argument 'RemoteNetworkId'") } - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateResource err := ctx.RegisterResource("twingate:index/twingateResource:TwingateResource", name, args, &resource, opts...) if err != nil { @@ -191,6 +193,12 @@ func (i *TwingateResource) ToTwingateResourceOutputWithContext(ctx context.Conte return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceOutput) } +func (i *TwingateResource) ToOutput(ctx context.Context) pulumix.Output[*TwingateResource] { + return pulumix.Output[*TwingateResource]{ + OutputState: i.ToTwingateResourceOutputWithContext(ctx).OutputState, + } +} + // TwingateResourceArrayInput is an input type that accepts TwingateResourceArray and TwingateResourceArrayOutput values. // You can construct a concrete instance of `TwingateResourceArrayInput` via: // @@ -216,6 +224,12 @@ func (i TwingateResourceArray) ToTwingateResourceArrayOutputWithContext(ctx cont return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceArrayOutput) } +func (i TwingateResourceArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateResource] { + return pulumix.Output[[]*TwingateResource]{ + OutputState: i.ToTwingateResourceArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateResourceMapInput is an input type that accepts TwingateResourceMap and TwingateResourceMapOutput values. // You can construct a concrete instance of `TwingateResourceMapInput` via: // @@ -241,6 +255,12 @@ func (i TwingateResourceMap) ToTwingateResourceMapOutputWithContext(ctx context. return pulumi.ToOutputWithContext(ctx, i).(TwingateResourceMapOutput) } +func (i TwingateResourceMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateResource] { + return pulumix.Output[map[string]*TwingateResource]{ + OutputState: i.ToTwingateResourceMapOutputWithContext(ctx).OutputState, + } +} + type TwingateResourceOutput struct{ *pulumi.OutputState } func (TwingateResourceOutput) ElementType() reflect.Type { @@ -255,6 +275,12 @@ func (o TwingateResourceOutput) ToTwingateResourceOutputWithContext(ctx context. return o } +func (o TwingateResourceOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateResource] { + return pulumix.Output[*TwingateResource]{ + OutputState: o.OutputState, + } +} + // Restrict access to certain groups or service accounts func (o TwingateResourceOutput) Access() TwingateResourceAccessPtrOutput { return o.ApplyT(func(v *TwingateResource) TwingateResourceAccessPtrOutput { return v.Access }).(TwingateResourceAccessPtrOutput) @@ -316,6 +342,12 @@ func (o TwingateResourceArrayOutput) ToTwingateResourceArrayOutputWithContext(ct return o } +func (o TwingateResourceArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateResource] { + return pulumix.Output[[]*TwingateResource]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceArrayOutput) Index(i pulumi.IntInput) TwingateResourceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateResource { return vs[0].([]*TwingateResource)[vs[1].(int)] @@ -336,6 +368,12 @@ func (o TwingateResourceMapOutput) ToTwingateResourceMapOutputWithContext(ctx co return o } +func (o TwingateResourceMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateResource] { + return pulumix.Output[map[string]*TwingateResource]{ + OutputState: o.OutputState, + } +} + func (o TwingateResourceMapOutput) MapIndex(k pulumi.StringInput) TwingateResourceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateResource { return vs[0].(map[string]*TwingateResource)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateServiceAccount.go b/sdk/go/twingate/twingateServiceAccount.go index 13da6e7..4e281a4 100644 --- a/sdk/go/twingate/twingateServiceAccount.go +++ b/sdk/go/twingate/twingateServiceAccount.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateServiceAccount struct { @@ -24,7 +26,7 @@ func NewTwingateServiceAccount(ctx *pulumi.Context, args = &TwingateServiceAccountArgs{} } - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateServiceAccount err := ctx.RegisterResource("twingate:index/twingateServiceAccount:TwingateServiceAccount", name, args, &resource, opts...) if err != nil { @@ -94,6 +96,12 @@ func (i *TwingateServiceAccount) ToTwingateServiceAccountOutputWithContext(ctx c return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountOutput) } +func (i *TwingateServiceAccount) ToOutput(ctx context.Context) pulumix.Output[*TwingateServiceAccount] { + return pulumix.Output[*TwingateServiceAccount]{ + OutputState: i.ToTwingateServiceAccountOutputWithContext(ctx).OutputState, + } +} + // TwingateServiceAccountArrayInput is an input type that accepts TwingateServiceAccountArray and TwingateServiceAccountArrayOutput values. // You can construct a concrete instance of `TwingateServiceAccountArrayInput` via: // @@ -119,6 +127,12 @@ func (i TwingateServiceAccountArray) ToTwingateServiceAccountArrayOutputWithCont return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountArrayOutput) } +func (i TwingateServiceAccountArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateServiceAccount] { + return pulumix.Output[[]*TwingateServiceAccount]{ + OutputState: i.ToTwingateServiceAccountArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateServiceAccountMapInput is an input type that accepts TwingateServiceAccountMap and TwingateServiceAccountMapOutput values. // You can construct a concrete instance of `TwingateServiceAccountMapInput` via: // @@ -144,6 +158,12 @@ func (i TwingateServiceAccountMap) ToTwingateServiceAccountMapOutputWithContext( return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountMapOutput) } +func (i TwingateServiceAccountMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateServiceAccount] { + return pulumix.Output[map[string]*TwingateServiceAccount]{ + OutputState: i.ToTwingateServiceAccountMapOutputWithContext(ctx).OutputState, + } +} + type TwingateServiceAccountOutput struct{ *pulumi.OutputState } func (TwingateServiceAccountOutput) ElementType() reflect.Type { @@ -158,6 +178,12 @@ func (o TwingateServiceAccountOutput) ToTwingateServiceAccountOutputWithContext( return o } +func (o TwingateServiceAccountOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateServiceAccount] { + return pulumix.Output[*TwingateServiceAccount]{ + OutputState: o.OutputState, + } +} + // The name of the Service Account in Twingate func (o TwingateServiceAccountOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TwingateServiceAccount) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) @@ -177,6 +203,12 @@ func (o TwingateServiceAccountArrayOutput) ToTwingateServiceAccountArrayOutputWi return o } +func (o TwingateServiceAccountArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateServiceAccount] { + return pulumix.Output[[]*TwingateServiceAccount]{ + OutputState: o.OutputState, + } +} + func (o TwingateServiceAccountArrayOutput) Index(i pulumi.IntInput) TwingateServiceAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateServiceAccount { return vs[0].([]*TwingateServiceAccount)[vs[1].(int)] @@ -197,6 +229,12 @@ func (o TwingateServiceAccountMapOutput) ToTwingateServiceAccountMapOutputWithCo return o } +func (o TwingateServiceAccountMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateServiceAccount] { + return pulumix.Output[map[string]*TwingateServiceAccount]{ + OutputState: o.OutputState, + } +} + func (o TwingateServiceAccountMapOutput) MapIndex(k pulumi.StringInput) TwingateServiceAccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateServiceAccount { return vs[0].(map[string]*TwingateServiceAccount)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateServiceAccountKey.go b/sdk/go/twingate/twingateServiceAccountKey.go index fb2e43b..9d650bc 100644 --- a/sdk/go/twingate/twingateServiceAccountKey.go +++ b/sdk/go/twingate/twingateServiceAccountKey.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type TwingateServiceAccountKey struct { @@ -36,7 +38,7 @@ func NewTwingateServiceAccountKey(ctx *pulumi.Context, "token", }) opts = append(opts, secrets) - opts = pkgResourceDefaultOpts(opts) + opts = internal.PkgResourceDefaultOpts(opts) var resource TwingateServiceAccountKey err := ctx.RegisterResource("twingate:index/twingateServiceAccountKey:TwingateServiceAccountKey", name, args, &resource, opts...) if err != nil { @@ -118,6 +120,12 @@ func (i *TwingateServiceAccountKey) ToTwingateServiceAccountKeyOutputWithContext return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountKeyOutput) } +func (i *TwingateServiceAccountKey) ToOutput(ctx context.Context) pulumix.Output[*TwingateServiceAccountKey] { + return pulumix.Output[*TwingateServiceAccountKey]{ + OutputState: i.ToTwingateServiceAccountKeyOutputWithContext(ctx).OutputState, + } +} + // TwingateServiceAccountKeyArrayInput is an input type that accepts TwingateServiceAccountKeyArray and TwingateServiceAccountKeyArrayOutput values. // You can construct a concrete instance of `TwingateServiceAccountKeyArrayInput` via: // @@ -143,6 +151,12 @@ func (i TwingateServiceAccountKeyArray) ToTwingateServiceAccountKeyArrayOutputWi return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountKeyArrayOutput) } +func (i TwingateServiceAccountKeyArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateServiceAccountKey] { + return pulumix.Output[[]*TwingateServiceAccountKey]{ + OutputState: i.ToTwingateServiceAccountKeyArrayOutputWithContext(ctx).OutputState, + } +} + // TwingateServiceAccountKeyMapInput is an input type that accepts TwingateServiceAccountKeyMap and TwingateServiceAccountKeyMapOutput values. // You can construct a concrete instance of `TwingateServiceAccountKeyMapInput` via: // @@ -168,6 +182,12 @@ func (i TwingateServiceAccountKeyMap) ToTwingateServiceAccountKeyMapOutputWithCo return pulumi.ToOutputWithContext(ctx, i).(TwingateServiceAccountKeyMapOutput) } +func (i TwingateServiceAccountKeyMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateServiceAccountKey] { + return pulumix.Output[map[string]*TwingateServiceAccountKey]{ + OutputState: i.ToTwingateServiceAccountKeyMapOutputWithContext(ctx).OutputState, + } +} + type TwingateServiceAccountKeyOutput struct{ *pulumi.OutputState } func (TwingateServiceAccountKeyOutput) ElementType() reflect.Type { @@ -182,6 +202,12 @@ func (o TwingateServiceAccountKeyOutput) ToTwingateServiceAccountKeyOutputWithCo return o } +func (o TwingateServiceAccountKeyOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateServiceAccountKey] { + return pulumix.Output[*TwingateServiceAccountKey]{ + OutputState: o.OutputState, + } +} + // The name of the Service Key func (o TwingateServiceAccountKeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TwingateServiceAccountKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) @@ -211,6 +237,12 @@ func (o TwingateServiceAccountKeyArrayOutput) ToTwingateServiceAccountKeyArrayOu return o } +func (o TwingateServiceAccountKeyArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateServiceAccountKey] { + return pulumix.Output[[]*TwingateServiceAccountKey]{ + OutputState: o.OutputState, + } +} + func (o TwingateServiceAccountKeyArrayOutput) Index(i pulumi.IntInput) TwingateServiceAccountKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateServiceAccountKey { return vs[0].([]*TwingateServiceAccountKey)[vs[1].(int)] @@ -231,6 +263,12 @@ func (o TwingateServiceAccountKeyMapOutput) ToTwingateServiceAccountKeyMapOutput return o } +func (o TwingateServiceAccountKeyMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateServiceAccountKey] { + return pulumix.Output[map[string]*TwingateServiceAccountKey]{ + OutputState: o.OutputState, + } +} + func (o TwingateServiceAccountKeyMapOutput) MapIndex(k pulumi.StringInput) TwingateServiceAccountKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateServiceAccountKey { return vs[0].(map[string]*TwingateServiceAccountKey)[vs[1].(string)] diff --git a/sdk/go/twingate/twingateUser.go b/sdk/go/twingate/twingateUser.go new file mode 100644 index 0000000..d75050e --- /dev/null +++ b/sdk/go/twingate/twingateUser.go @@ -0,0 +1,341 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package twingate + +import ( + "context" + "reflect" + + "errors" + "github.com/Twingate-Labs/pulumi-twingate/sdk/go/twingate/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +type TwingateUser struct { + pulumi.CustomResourceState + + // The User's email address + Email pulumi.StringOutput `pulumi:"email"` + // The User's first name + FirstName pulumi.StringOutput `pulumi:"firstName"` + // Determines whether the User is active or not. Inactive users will be not able to sign in. + IsActive pulumi.BoolOutput `pulumi:"isActive"` + // The User's last name + LastName pulumi.StringOutput `pulumi:"lastName"` + // Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + Role pulumi.StringOutput `pulumi:"role"` + // Determines whether to send an email invitation to the User. True by default. + SendInvite pulumi.BoolOutput `pulumi:"sendInvite"` + // Indicates the User's type. Either MANUAL or SYNCED. + Type pulumi.StringOutput `pulumi:"type"` +} + +// NewTwingateUser registers a new resource with the given unique name, arguments, and options. +func NewTwingateUser(ctx *pulumi.Context, + name string, args *TwingateUserArgs, opts ...pulumi.ResourceOption) (*TwingateUser, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Email == nil { + return nil, errors.New("invalid value for required argument 'Email'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource TwingateUser + err := ctx.RegisterResource("twingate:index/twingateUser:TwingateUser", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetTwingateUser gets an existing TwingateUser resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetTwingateUser(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *TwingateUserState, opts ...pulumi.ResourceOption) (*TwingateUser, error) { + var resource TwingateUser + err := ctx.ReadResource("twingate:index/twingateUser:TwingateUser", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering TwingateUser resources. +type twingateUserState struct { + // The User's email address + Email *string `pulumi:"email"` + // The User's first name + FirstName *string `pulumi:"firstName"` + // Determines whether the User is active or not. Inactive users will be not able to sign in. + IsActive *bool `pulumi:"isActive"` + // The User's last name + LastName *string `pulumi:"lastName"` + // Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + Role *string `pulumi:"role"` + // Determines whether to send an email invitation to the User. True by default. + SendInvite *bool `pulumi:"sendInvite"` + // Indicates the User's type. Either MANUAL or SYNCED. + Type *string `pulumi:"type"` +} + +type TwingateUserState struct { + // The User's email address + Email pulumi.StringPtrInput + // The User's first name + FirstName pulumi.StringPtrInput + // Determines whether the User is active or not. Inactive users will be not able to sign in. + IsActive pulumi.BoolPtrInput + // The User's last name + LastName pulumi.StringPtrInput + // Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + Role pulumi.StringPtrInput + // Determines whether to send an email invitation to the User. True by default. + SendInvite pulumi.BoolPtrInput + // Indicates the User's type. Either MANUAL or SYNCED. + Type pulumi.StringPtrInput +} + +func (TwingateUserState) ElementType() reflect.Type { + return reflect.TypeOf((*twingateUserState)(nil)).Elem() +} + +type twingateUserArgs struct { + // The User's email address + Email string `pulumi:"email"` + // The User's first name + FirstName *string `pulumi:"firstName"` + // Determines whether the User is active or not. Inactive users will be not able to sign in. + IsActive *bool `pulumi:"isActive"` + // The User's last name + LastName *string `pulumi:"lastName"` + // Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + Role *string `pulumi:"role"` + // Determines whether to send an email invitation to the User. True by default. + SendInvite *bool `pulumi:"sendInvite"` +} + +// The set of arguments for constructing a TwingateUser resource. +type TwingateUserArgs struct { + // The User's email address + Email pulumi.StringInput + // The User's first name + FirstName pulumi.StringPtrInput + // Determines whether the User is active or not. Inactive users will be not able to sign in. + IsActive pulumi.BoolPtrInput + // The User's last name + LastName pulumi.StringPtrInput + // Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + Role pulumi.StringPtrInput + // Determines whether to send an email invitation to the User. True by default. + SendInvite pulumi.BoolPtrInput +} + +func (TwingateUserArgs) ElementType() reflect.Type { + return reflect.TypeOf((*twingateUserArgs)(nil)).Elem() +} + +type TwingateUserInput interface { + pulumi.Input + + ToTwingateUserOutput() TwingateUserOutput + ToTwingateUserOutputWithContext(ctx context.Context) TwingateUserOutput +} + +func (*TwingateUser) ElementType() reflect.Type { + return reflect.TypeOf((**TwingateUser)(nil)).Elem() +} + +func (i *TwingateUser) ToTwingateUserOutput() TwingateUserOutput { + return i.ToTwingateUserOutputWithContext(context.Background()) +} + +func (i *TwingateUser) ToTwingateUserOutputWithContext(ctx context.Context) TwingateUserOutput { + return pulumi.ToOutputWithContext(ctx, i).(TwingateUserOutput) +} + +func (i *TwingateUser) ToOutput(ctx context.Context) pulumix.Output[*TwingateUser] { + return pulumix.Output[*TwingateUser]{ + OutputState: i.ToTwingateUserOutputWithContext(ctx).OutputState, + } +} + +// TwingateUserArrayInput is an input type that accepts TwingateUserArray and TwingateUserArrayOutput values. +// You can construct a concrete instance of `TwingateUserArrayInput` via: +// +// TwingateUserArray{ TwingateUserArgs{...} } +type TwingateUserArrayInput interface { + pulumi.Input + + ToTwingateUserArrayOutput() TwingateUserArrayOutput + ToTwingateUserArrayOutputWithContext(context.Context) TwingateUserArrayOutput +} + +type TwingateUserArray []TwingateUserInput + +func (TwingateUserArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*TwingateUser)(nil)).Elem() +} + +func (i TwingateUserArray) ToTwingateUserArrayOutput() TwingateUserArrayOutput { + return i.ToTwingateUserArrayOutputWithContext(context.Background()) +} + +func (i TwingateUserArray) ToTwingateUserArrayOutputWithContext(ctx context.Context) TwingateUserArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(TwingateUserArrayOutput) +} + +func (i TwingateUserArray) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateUser] { + return pulumix.Output[[]*TwingateUser]{ + OutputState: i.ToTwingateUserArrayOutputWithContext(ctx).OutputState, + } +} + +// TwingateUserMapInput is an input type that accepts TwingateUserMap and TwingateUserMapOutput values. +// You can construct a concrete instance of `TwingateUserMapInput` via: +// +// TwingateUserMap{ "key": TwingateUserArgs{...} } +type TwingateUserMapInput interface { + pulumi.Input + + ToTwingateUserMapOutput() TwingateUserMapOutput + ToTwingateUserMapOutputWithContext(context.Context) TwingateUserMapOutput +} + +type TwingateUserMap map[string]TwingateUserInput + +func (TwingateUserMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*TwingateUser)(nil)).Elem() +} + +func (i TwingateUserMap) ToTwingateUserMapOutput() TwingateUserMapOutput { + return i.ToTwingateUserMapOutputWithContext(context.Background()) +} + +func (i TwingateUserMap) ToTwingateUserMapOutputWithContext(ctx context.Context) TwingateUserMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(TwingateUserMapOutput) +} + +func (i TwingateUserMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateUser] { + return pulumix.Output[map[string]*TwingateUser]{ + OutputState: i.ToTwingateUserMapOutputWithContext(ctx).OutputState, + } +} + +type TwingateUserOutput struct{ *pulumi.OutputState } + +func (TwingateUserOutput) ElementType() reflect.Type { + return reflect.TypeOf((**TwingateUser)(nil)).Elem() +} + +func (o TwingateUserOutput) ToTwingateUserOutput() TwingateUserOutput { + return o +} + +func (o TwingateUserOutput) ToTwingateUserOutputWithContext(ctx context.Context) TwingateUserOutput { + return o +} + +func (o TwingateUserOutput) ToOutput(ctx context.Context) pulumix.Output[*TwingateUser] { + return pulumix.Output[*TwingateUser]{ + OutputState: o.OutputState, + } +} + +// The User's email address +func (o TwingateUserOutput) Email() pulumi.StringOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput) +} + +// The User's first name +func (o TwingateUserOutput) FirstName() pulumi.StringOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.StringOutput { return v.FirstName }).(pulumi.StringOutput) +} + +// Determines whether the User is active or not. Inactive users will be not able to sign in. +func (o TwingateUserOutput) IsActive() pulumi.BoolOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.BoolOutput { return v.IsActive }).(pulumi.BoolOutput) +} + +// The User's last name +func (o TwingateUserOutput) LastName() pulumi.StringOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.StringOutput { return v.LastName }).(pulumi.StringOutput) +} + +// Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. +func (o TwingateUserOutput) Role() pulumi.StringOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput) +} + +// Determines whether to send an email invitation to the User. True by default. +func (o TwingateUserOutput) SendInvite() pulumi.BoolOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.BoolOutput { return v.SendInvite }).(pulumi.BoolOutput) +} + +// Indicates the User's type. Either MANUAL or SYNCED. +func (o TwingateUserOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v *TwingateUser) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) +} + +type TwingateUserArrayOutput struct{ *pulumi.OutputState } + +func (TwingateUserArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*TwingateUser)(nil)).Elem() +} + +func (o TwingateUserArrayOutput) ToTwingateUserArrayOutput() TwingateUserArrayOutput { + return o +} + +func (o TwingateUserArrayOutput) ToTwingateUserArrayOutputWithContext(ctx context.Context) TwingateUserArrayOutput { + return o +} + +func (o TwingateUserArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TwingateUser] { + return pulumix.Output[[]*TwingateUser]{ + OutputState: o.OutputState, + } +} + +func (o TwingateUserArrayOutput) Index(i pulumi.IntInput) TwingateUserOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TwingateUser { + return vs[0].([]*TwingateUser)[vs[1].(int)] + }).(TwingateUserOutput) +} + +type TwingateUserMapOutput struct{ *pulumi.OutputState } + +func (TwingateUserMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*TwingateUser)(nil)).Elem() +} + +func (o TwingateUserMapOutput) ToTwingateUserMapOutput() TwingateUserMapOutput { + return o +} + +func (o TwingateUserMapOutput) ToTwingateUserMapOutputWithContext(ctx context.Context) TwingateUserMapOutput { + return o +} + +func (o TwingateUserMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TwingateUser] { + return pulumix.Output[map[string]*TwingateUser]{ + OutputState: o.OutputState, + } +} + +func (o TwingateUserMapOutput) MapIndex(k pulumi.StringInput) TwingateUserOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TwingateUser { + return vs[0].(map[string]*TwingateUser)[vs[1].(string)] + }).(TwingateUserOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*TwingateUserInput)(nil)).Elem(), &TwingateUser{}) + pulumi.RegisterInputType(reflect.TypeOf((*TwingateUserArrayInput)(nil)).Elem(), TwingateUserArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*TwingateUserMapInput)(nil)).Elem(), TwingateUserMap{}) + pulumi.RegisterOutputType(TwingateUserOutput{}) + pulumi.RegisterOutputType(TwingateUserArrayOutput{}) + pulumi.RegisterOutputType(TwingateUserMapOutput{}) +} diff --git a/sdk/nodejs/twingateUser.ts b/sdk/nodejs/twingateUser.ts new file mode 100644 index 0000000..bef8958 --- /dev/null +++ b/sdk/nodejs/twingateUser.ts @@ -0,0 +1,164 @@ +// *** 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! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class TwingateUser extends pulumi.CustomResource { + /** + * Get an existing TwingateUser resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: TwingateUserState, opts?: pulumi.CustomResourceOptions): TwingateUser { + return new TwingateUser(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'twingate:index/twingateUser:TwingateUser'; + + /** + * Returns true if the given object is an instance of TwingateUser. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is TwingateUser { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === TwingateUser.__pulumiType; + } + + /** + * The User's email address + */ + public readonly email!: pulumi.Output; + /** + * The User's first name + */ + public readonly firstName!: pulumi.Output; + /** + * Determines whether the User is active or not. Inactive users will be not able to sign in. + */ + public readonly isActive!: pulumi.Output; + /** + * The User's last name + */ + public readonly lastName!: pulumi.Output; + /** + * Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + */ + public readonly role!: pulumi.Output; + /** + * Determines whether to send an email invitation to the User. True by default. + */ + public readonly sendInvite!: pulumi.Output; + /** + * Indicates the User's type. Either MANUAL or SYNCED. + */ + public /*out*/ readonly type!: pulumi.Output; + + /** + * Create a TwingateUser resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: TwingateUserArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: TwingateUserArgs | TwingateUserState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as TwingateUserState | undefined; + resourceInputs["email"] = state ? state.email : undefined; + resourceInputs["firstName"] = state ? state.firstName : undefined; + resourceInputs["isActive"] = state ? state.isActive : undefined; + resourceInputs["lastName"] = state ? state.lastName : undefined; + resourceInputs["role"] = state ? state.role : undefined; + resourceInputs["sendInvite"] = state ? state.sendInvite : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as TwingateUserArgs | undefined; + if ((!args || args.email === undefined) && !opts.urn) { + throw new Error("Missing required property 'email'"); + } + resourceInputs["email"] = args ? args.email : undefined; + resourceInputs["firstName"] = args ? args.firstName : undefined; + resourceInputs["isActive"] = args ? args.isActive : undefined; + resourceInputs["lastName"] = args ? args.lastName : undefined; + resourceInputs["role"] = args ? args.role : undefined; + resourceInputs["sendInvite"] = args ? args.sendInvite : undefined; + resourceInputs["type"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(TwingateUser.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering TwingateUser resources. + */ +export interface TwingateUserState { + /** + * The User's email address + */ + email?: pulumi.Input; + /** + * The User's first name + */ + firstName?: pulumi.Input; + /** + * Determines whether the User is active or not. Inactive users will be not able to sign in. + */ + isActive?: pulumi.Input; + /** + * The User's last name + */ + lastName?: pulumi.Input; + /** + * Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + */ + role?: pulumi.Input; + /** + * Determines whether to send an email invitation to the User. True by default. + */ + sendInvite?: pulumi.Input; + /** + * Indicates the User's type. Either MANUAL or SYNCED. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a TwingateUser resource. + */ +export interface TwingateUserArgs { + /** + * The User's email address + */ + email: pulumi.Input; + /** + * The User's first name + */ + firstName?: pulumi.Input; + /** + * Determines whether the User is active or not. Inactive users will be not able to sign in. + */ + isActive?: pulumi.Input; + /** + * The User's last name + */ + lastName?: pulumi.Input; + /** + * Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + */ + role?: pulumi.Input; + /** + * Determines whether to send an email invitation to the User. True by default. + */ + sendInvite?: pulumi.Input; +} diff --git a/sdk/python/pulumi_twingate/__init__.py b/sdk/python/pulumi_twingate/__init__.py index 9ab9bfe..46e0922 100644 --- a/sdk/python/pulumi_twingate/__init__.py +++ b/sdk/python/pulumi_twingate/__init__.py @@ -26,6 +26,7 @@ from .twingate_resource import * from .twingate_service_account import * from .twingate_service_account_key import * +from .twingate_user import * from ._inputs import * from . import outputs @@ -94,6 +95,14 @@ "classes": { "twingate:index/twingateServiceAccountKey:TwingateServiceAccountKey": "TwingateServiceAccountKey" } + }, + { + "pkg": "twingate", + "mod": "index/twingateUser", + "fqn": "pulumi_twingate", + "classes": { + "twingate:index/twingateUser:TwingateUser": "TwingateUser" + } } ] """, diff --git a/sdk/python/pulumi_twingate/_inputs.py b/sdk/python/pulumi_twingate/_inputs.py index 2293ffb..2999666 100644 --- a/sdk/python/pulumi_twingate/_inputs.py +++ b/sdk/python/pulumi_twingate/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -34,10 +34,21 @@ class TwingateResourceAccessArgs: def __init__(__self__, *, group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, service_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + TwingateResourceAccessArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_ids=group_ids, + service_account_ids=service_account_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + service_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if group_ids is not None: - pulumi.set(__self__, "group_ids", group_ids) + _setter("group_ids", group_ids) if service_account_ids is not None: - pulumi.set(__self__, "service_account_ids", service_account_ids) + _setter("service_account_ids", service_account_ids) @property @pulumi.getter(name="groupIds") @@ -64,10 +75,23 @@ def __init__(__self__, *, tcp: pulumi.Input['TwingateResourceProtocolsTcpArgs'], udp: pulumi.Input['TwingateResourceProtocolsUdpArgs'], allow_icmp: Optional[pulumi.Input[bool]] = None): - pulumi.set(__self__, "tcp", tcp) - pulumi.set(__self__, "udp", udp) + TwingateResourceProtocolsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tcp=tcp, + udp=udp, + allow_icmp=allow_icmp, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tcp: pulumi.Input['TwingateResourceProtocolsTcpArgs'], + udp: pulumi.Input['TwingateResourceProtocolsUdpArgs'], + allow_icmp: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("tcp", tcp) + _setter("udp", udp) if allow_icmp is not None: - pulumi.set(__self__, "allow_icmp", allow_icmp) + _setter("allow_icmp", allow_icmp) @property @pulumi.getter @@ -102,9 +126,20 @@ class TwingateResourceProtocolsTcpArgs: def __init__(__self__, *, policy: pulumi.Input[str], ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): - pulumi.set(__self__, "policy", policy) + TwingateResourceProtocolsTcpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: pulumi.Input[str], + ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -130,9 +165,20 @@ class TwingateResourceProtocolsUdpArgs: def __init__(__self__, *, policy: pulumi.Input[str], ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): - pulumi.set(__self__, "policy", policy) + TwingateResourceProtocolsUdpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: pulumi.Input[str], + ports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -160,10 +206,25 @@ def __init__(__self__, *, name: str, remote_network_id: str, status_updates_enabled: bool): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "remote_network_id", remote_network_id) - pulumi.set(__self__, "status_updates_enabled", status_updates_enabled) + GetTwingateConnectorsConnectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + remote_network_id=remote_network_id, + status_updates_enabled=status_updates_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + name: str, + remote_network_id: str, + status_updates_enabled: bool, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("name", name) + _setter("remote_network_id", remote_network_id) + _setter("status_updates_enabled", status_updates_enabled) @property @pulumi.getter @@ -210,11 +271,28 @@ def __init__(__self__, *, name: str, security_policy_id: str, type: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "is_active", is_active) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "security_policy_id", security_policy_id) - pulumi.set(__self__, "type", type) + GetTwingateGroupsGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_active=is_active, + name=name, + security_policy_id=security_policy_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + is_active: bool, + name: str, + security_policy_id: str, + type: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("is_active", is_active) + _setter("name", name) + _setter("security_policy_id", security_policy_id) + _setter("type", type) @property @pulumi.getter @@ -268,9 +346,22 @@ def __init__(__self__, *, id: str, location: str, name: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) + GetTwingateRemoteNetworksRemoteNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + location: str, + name: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("location", location) + _setter("name", name) @property @pulumi.getter @@ -306,11 +397,24 @@ def __init__(__self__, *, allow_icmp: bool, tcps: Optional[Sequence['GetTwingateResourceProtocolTcpArgs']] = None, udps: Optional[Sequence['GetTwingateResourceProtocolUdpArgs']] = None): - pulumi.set(__self__, "allow_icmp", allow_icmp) + GetTwingateResourceProtocolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_icmp=allow_icmp, + tcps=tcps, + udps=udps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_icmp: bool, + tcps: Optional[Sequence['GetTwingateResourceProtocolTcpArgs']] = None, + udps: Optional[Sequence['GetTwingateResourceProtocolUdpArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("allow_icmp", allow_icmp) if tcps is not None: - pulumi.set(__self__, "tcps", tcps) + _setter("tcps", tcps) if udps is not None: - pulumi.set(__self__, "udps", udps) + _setter("udps", udps) @property @pulumi.getter(name="allowIcmp") @@ -345,8 +449,19 @@ class GetTwingateResourceProtocolTcpArgs: def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourceProtocolTcpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -372,8 +487,19 @@ class GetTwingateResourceProtocolUdpArgs: def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourceProtocolUdpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -402,12 +528,29 @@ def __init__(__self__, *, name: str, remote_network_id: str, protocols: Optional[Sequence['GetTwingateResourcesResourceProtocolArgs']] = None): - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "remote_network_id", remote_network_id) + GetTwingateResourcesResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + id=id, + name=name, + remote_network_id=remote_network_id, + protocols=protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: str, + id: str, + name: str, + remote_network_id: str, + protocols: Optional[Sequence['GetTwingateResourcesResourceProtocolArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("address", address) + _setter("id", id) + _setter("name", name) + _setter("remote_network_id", remote_network_id) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) @property @pulumi.getter @@ -461,11 +604,24 @@ def __init__(__self__, *, allow_icmp: bool, tcps: Optional[Sequence['GetTwingateResourcesResourceProtocolTcpArgs']] = None, udps: Optional[Sequence['GetTwingateResourcesResourceProtocolUdpArgs']] = None): - pulumi.set(__self__, "allow_icmp", allow_icmp) + GetTwingateResourcesResourceProtocolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_icmp=allow_icmp, + tcps=tcps, + udps=udps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_icmp: bool, + tcps: Optional[Sequence['GetTwingateResourcesResourceProtocolTcpArgs']] = None, + udps: Optional[Sequence['GetTwingateResourcesResourceProtocolUdpArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("allow_icmp", allow_icmp) if tcps is not None: - pulumi.set(__self__, "tcps", tcps) + _setter("tcps", tcps) if udps is not None: - pulumi.set(__self__, "udps", udps) + _setter("udps", udps) @property @pulumi.getter(name="allowIcmp") @@ -500,8 +656,19 @@ class GetTwingateResourcesResourceProtocolTcpArgs: def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourcesResourceProtocolTcpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -527,8 +694,19 @@ class GetTwingateResourcesResourceProtocolUdpArgs: def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourcesResourceProtocolUdpArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -554,8 +732,19 @@ class GetTwingateSecurityPoliciesSecurityPolicyArgs: def __init__(__self__, *, id: str, name: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetTwingateSecurityPoliciesSecurityPolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + name: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -583,10 +772,25 @@ def __init__(__self__, *, key_ids: Sequence[str], name: str, resource_ids: Sequence[str]): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "key_ids", key_ids) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_ids", resource_ids) + GetTwingateServiceAccountsServiceAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + key_ids=key_ids, + name=name, + resource_ids=resource_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + key_ids: Sequence[str], + name: str, + resource_ids: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("key_ids", key_ids) + _setter("name", name) + _setter("resource_ids", resource_ids) @property @pulumi.getter @@ -633,13 +837,39 @@ def __init__(__self__, *, id: str, is_admin: bool, last_name: str, - role: str): - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "is_admin", is_admin) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "role", role) + role: str, + type: str): + GetTwingateUsersUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + id=id, + is_admin=is_admin, + last_name=last_name, + role=role, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: str, + first_name: str, + id: str, + is_admin: bool, + last_name: str, + role: str, + type: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("email", email) + _setter("first_name", first_name) + _setter("id", id) + if is_admin is not None: + warnings.warn("""This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""", DeprecationWarning) + pulumi.log.warn("""is_admin is deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""") + _setter("is_admin", is_admin) + _setter("last_name", last_name) + _setter("role", role) + _setter("type", type) @property @pulumi.getter @@ -671,6 +901,9 @@ def id(self, value: str): @property @pulumi.getter(name="isAdmin") def is_admin(self) -> bool: + warnings.warn("""This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""", DeprecationWarning) + pulumi.log.warn("""is_admin is deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""") + return pulumi.get(self, "is_admin") @is_admin.setter @@ -695,4 +928,13 @@ def role(self) -> str: def role(self, value: str): pulumi.set(self, "role", value) + @property + @pulumi.getter + def type(self) -> str: + return pulumi.get(self, "type") + + @type.setter + def type(self, value: str): + pulumi.set(self, "type", value) + diff --git a/sdk/python/pulumi_twingate/config/__init__.pyi b/sdk/python/pulumi_twingate/config/__init__.pyi index 47ee94b..c1e8c56 100644 --- a/sdk/python/pulumi_twingate/config/__init__.pyi +++ b/sdk/python/pulumi_twingate/config/__init__.pyi @@ -6,7 +6,7 @@ import copy import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities apiToken: Optional[str] diff --git a/sdk/python/pulumi_twingate/config/vars.py b/sdk/python/pulumi_twingate/config/vars.py index bc54f92..f64fc41 100644 --- a/sdk/python/pulumi_twingate/config/vars.py +++ b/sdk/python/pulumi_twingate/config/vars.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities import types diff --git a/sdk/python/pulumi_twingate/get_twingate_connector.py b/sdk/python/pulumi_twingate/get_twingate_connector.py index 1c51f38..5e8cb80 100644 --- a/sdk/python/pulumi_twingate/get_twingate_connector.py +++ b/sdk/python/pulumi_twingate/get_twingate_connector.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -79,10 +79,10 @@ def get_twingate_connector(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateConnector:getTwingateConnector', __args__, opts=opts, typ=GetTwingateConnectorResult).value return AwaitableGetTwingateConnectorResult( - id=__ret__.id, - name=__ret__.name, - remote_network_id=__ret__.remote_network_id, - status_updates_enabled=__ret__.status_updates_enabled) + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + remote_network_id=pulumi.get(__ret__, 'remote_network_id'), + status_updates_enabled=pulumi.get(__ret__, 'status_updates_enabled')) @_utilities.lift_output_func(get_twingate_connector) diff --git a/sdk/python/pulumi_twingate/get_twingate_connectors.py b/sdk/python/pulumi_twingate/get_twingate_connectors.py index 06966e5..b4c969d 100644 --- a/sdk/python/pulumi_twingate/get_twingate_connectors.py +++ b/sdk/python/pulumi_twingate/get_twingate_connectors.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -66,8 +66,8 @@ def get_twingate_connectors(connectors: Optional[Sequence[pulumi.InputType['GetT __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateConnectors:getTwingateConnectors', __args__, opts=opts, typ=GetTwingateConnectorsResult).value return AwaitableGetTwingateConnectorsResult( - connectors=__ret__.connectors, - id=__ret__.id) + connectors=pulumi.get(__ret__, 'connectors'), + id=pulumi.get(__ret__, 'id')) @_utilities.lift_output_func(get_twingate_connectors) diff --git a/sdk/python/pulumi_twingate/get_twingate_group.py b/sdk/python/pulumi_twingate/get_twingate_group.py index c39ea7f..888a3ff 100644 --- a/sdk/python/pulumi_twingate/get_twingate_group.py +++ b/sdk/python/pulumi_twingate/get_twingate_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -88,11 +88,11 @@ def get_twingate_group(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateGroup:getTwingateGroup', __args__, opts=opts, typ=GetTwingateGroupResult).value return AwaitableGetTwingateGroupResult( - id=__ret__.id, - is_active=__ret__.is_active, - name=__ret__.name, - security_policy_id=__ret__.security_policy_id, - type=__ret__.type) + id=pulumi.get(__ret__, 'id'), + is_active=pulumi.get(__ret__, 'is_active'), + name=pulumi.get(__ret__, 'name'), + security_policy_id=pulumi.get(__ret__, 'security_policy_id'), + type=pulumi.get(__ret__, 'type')) @_utilities.lift_output_func(get_twingate_group) diff --git a/sdk/python/pulumi_twingate/get_twingate_groups.py b/sdk/python/pulumi_twingate/get_twingate_groups.py index dd432ac..987765f 100644 --- a/sdk/python/pulumi_twingate/get_twingate_groups.py +++ b/sdk/python/pulumi_twingate/get_twingate_groups.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -99,11 +99,11 @@ def get_twingate_groups(groups: Optional[Sequence[pulumi.InputType['GetTwingateG __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateGroups:getTwingateGroups', __args__, opts=opts, typ=GetTwingateGroupsResult).value return AwaitableGetTwingateGroupsResult( - groups=__ret__.groups, - id=__ret__.id, - is_active=__ret__.is_active, - name=__ret__.name, - type=__ret__.type) + groups=pulumi.get(__ret__, 'groups'), + id=pulumi.get(__ret__, 'id'), + is_active=pulumi.get(__ret__, 'is_active'), + name=pulumi.get(__ret__, 'name'), + type=pulumi.get(__ret__, 'type')) @_utilities.lift_output_func(get_twingate_groups) diff --git a/sdk/python/pulumi_twingate/get_twingate_remote_network.py b/sdk/python/pulumi_twingate/get_twingate_remote_network.py index 263fc37..52eb687 100644 --- a/sdk/python/pulumi_twingate/get_twingate_remote_network.py +++ b/sdk/python/pulumi_twingate/get_twingate_remote_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -72,9 +72,9 @@ def get_twingate_remote_network(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateRemoteNetwork:getTwingateRemoteNetwork', __args__, opts=opts, typ=GetTwingateRemoteNetworkResult).value return AwaitableGetTwingateRemoteNetworkResult( - id=__ret__.id, - location=__ret__.location, - name=__ret__.name) + id=pulumi.get(__ret__, 'id'), + location=pulumi.get(__ret__, 'location'), + name=pulumi.get(__ret__, 'name')) @_utilities.lift_output_func(get_twingate_remote_network) diff --git a/sdk/python/pulumi_twingate/get_twingate_remote_networks.py b/sdk/python/pulumi_twingate/get_twingate_remote_networks.py index 6b6a3ea..6183fc3 100644 --- a/sdk/python/pulumi_twingate/get_twingate_remote_networks.py +++ b/sdk/python/pulumi_twingate/get_twingate_remote_networks.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -66,8 +66,8 @@ def get_twingate_remote_networks(remote_networks: Optional[Sequence[pulumi.Input __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateRemoteNetworks:getTwingateRemoteNetworks', __args__, opts=opts, typ=GetTwingateRemoteNetworksResult).value return AwaitableGetTwingateRemoteNetworksResult( - id=__ret__.id, - remote_networks=__ret__.remote_networks) + id=pulumi.get(__ret__, 'id'), + remote_networks=pulumi.get(__ret__, 'remote_networks')) @_utilities.lift_output_func(get_twingate_remote_networks) diff --git a/sdk/python/pulumi_twingate/get_twingate_resource.py b/sdk/python/pulumi_twingate/get_twingate_resource.py index aedb8ab..018a489 100644 --- a/sdk/python/pulumi_twingate/get_twingate_resource.py +++ b/sdk/python/pulumi_twingate/get_twingate_resource.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -92,11 +92,11 @@ def get_twingate_resource(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateResource:getTwingateResource', __args__, opts=opts, typ=GetTwingateResourceResult).value return AwaitableGetTwingateResourceResult( - address=__ret__.address, - id=__ret__.id, - name=__ret__.name, - protocols=__ret__.protocols, - remote_network_id=__ret__.remote_network_id) + address=pulumi.get(__ret__, 'address'), + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + protocols=pulumi.get(__ret__, 'protocols'), + remote_network_id=pulumi.get(__ret__, 'remote_network_id')) @_utilities.lift_output_func(get_twingate_resource) diff --git a/sdk/python/pulumi_twingate/get_twingate_resources.py b/sdk/python/pulumi_twingate/get_twingate_resources.py index 7faede4..af1d4f8 100644 --- a/sdk/python/pulumi_twingate/get_twingate_resources.py +++ b/sdk/python/pulumi_twingate/get_twingate_resources.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -77,9 +77,9 @@ def get_twingate_resources(name: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateResources:getTwingateResources', __args__, opts=opts, typ=GetTwingateResourcesResult).value return AwaitableGetTwingateResourcesResult( - id=__ret__.id, - name=__ret__.name, - resources=__ret__.resources) + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + resources=pulumi.get(__ret__, 'resources')) @_utilities.lift_output_func(get_twingate_resources) diff --git a/sdk/python/pulumi_twingate/get_twingate_security_policies.py b/sdk/python/pulumi_twingate/get_twingate_security_policies.py index 03811e7..77afe71 100644 --- a/sdk/python/pulumi_twingate/get_twingate_security_policies.py +++ b/sdk/python/pulumi_twingate/get_twingate_security_policies.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -66,8 +66,8 @@ def get_twingate_security_policies(security_policies: Optional[Sequence[pulumi.I __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateSecurityPolicies:getTwingateSecurityPolicies', __args__, opts=opts, typ=GetTwingateSecurityPoliciesResult).value return AwaitableGetTwingateSecurityPoliciesResult( - id=__ret__.id, - security_policies=__ret__.security_policies) + id=pulumi.get(__ret__, 'id'), + security_policies=pulumi.get(__ret__, 'security_policies')) @_utilities.lift_output_func(get_twingate_security_policies) diff --git a/sdk/python/pulumi_twingate/get_twingate_security_policy.py b/sdk/python/pulumi_twingate/get_twingate_security_policy.py index 1636076..f21f2f2 100644 --- a/sdk/python/pulumi_twingate/get_twingate_security_policy.py +++ b/sdk/python/pulumi_twingate/get_twingate_security_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -63,8 +63,8 @@ def get_twingate_security_policy(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateSecurityPolicy:getTwingateSecurityPolicy', __args__, opts=opts, typ=GetTwingateSecurityPolicyResult).value return AwaitableGetTwingateSecurityPolicyResult( - id=__ret__.id, - name=__ret__.name) + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name')) @_utilities.lift_output_func(get_twingate_security_policy) diff --git a/sdk/python/pulumi_twingate/get_twingate_service_accounts.py b/sdk/python/pulumi_twingate/get_twingate_service_accounts.py index 387a309..df0d24a 100644 --- a/sdk/python/pulumi_twingate/get_twingate_service_accounts.py +++ b/sdk/python/pulumi_twingate/get_twingate_service_accounts.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -77,9 +77,9 @@ def get_twingate_service_accounts(name: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateServiceAccounts:getTwingateServiceAccounts', __args__, opts=opts, typ=GetTwingateServiceAccountsResult).value return AwaitableGetTwingateServiceAccountsResult( - id=__ret__.id, - name=__ret__.name, - service_accounts=__ret__.service_accounts) + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + service_accounts=pulumi.get(__ret__, 'service_accounts')) @_utilities.lift_output_func(get_twingate_service_accounts) diff --git a/sdk/python/pulumi_twingate/get_twingate_user.py b/sdk/python/pulumi_twingate/get_twingate_user.py index 7240e90..5318ce1 100644 --- a/sdk/python/pulumi_twingate/get_twingate_user.py +++ b/sdk/python/pulumi_twingate/get_twingate_user.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -21,7 +21,7 @@ class GetTwingateUserResult: """ A collection of values returned by getTwingateUser. """ - def __init__(__self__, email=None, first_name=None, id=None, is_admin=None, last_name=None, role=None): + def __init__(__self__, email=None, first_name=None, id=None, is_admin=None, last_name=None, role=None, type=None): if email and not isinstance(email, str): raise TypeError("Expected argument 'email' to be a str") pulumi.set(__self__, "email", email) @@ -40,6 +40,9 @@ def __init__(__self__, email=None, first_name=None, id=None, is_admin=None, last if role and not isinstance(role, str): raise TypeError("Expected argument 'role' to be a str") pulumi.set(__self__, "role", role) + if type and not isinstance(type, str): + raise TypeError("Expected argument 'type' to be a str") + pulumi.set(__self__, "type", type) @property @pulumi.getter @@ -59,6 +62,9 @@ def id(self) -> str: @property @pulumi.getter(name="isAdmin") def is_admin(self) -> bool: + warnings.warn("""This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""", DeprecationWarning) + pulumi.log.warn("""is_admin is deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""") + return pulumi.get(self, "is_admin") @property @@ -71,6 +77,11 @@ def last_name(self) -> str: def role(self) -> str: return pulumi.get(self, "role") + @property + @pulumi.getter + def type(self) -> str: + return pulumi.get(self, "type") + class AwaitableGetTwingateUserResult(GetTwingateUserResult): # pylint: disable=using-constant-test @@ -83,7 +94,8 @@ def __await__(self): id=self.id, is_admin=self.is_admin, last_name=self.last_name, - role=self.role) + role=self.role, + type=self.type) def get_twingate_user(id: Optional[str] = None, @@ -97,12 +109,13 @@ def get_twingate_user(id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateUser:getTwingateUser', __args__, opts=opts, typ=GetTwingateUserResult).value return AwaitableGetTwingateUserResult( - email=__ret__.email, - first_name=__ret__.first_name, - id=__ret__.id, - is_admin=__ret__.is_admin, - last_name=__ret__.last_name, - role=__ret__.role) + email=pulumi.get(__ret__, 'email'), + first_name=pulumi.get(__ret__, 'first_name'), + id=pulumi.get(__ret__, 'id'), + is_admin=pulumi.get(__ret__, 'is_admin'), + last_name=pulumi.get(__ret__, 'last_name'), + role=pulumi.get(__ret__, 'role'), + type=pulumi.get(__ret__, 'type')) @_utilities.lift_output_func(get_twingate_user) diff --git a/sdk/python/pulumi_twingate/get_twingate_users.py b/sdk/python/pulumi_twingate/get_twingate_users.py index 17cf466..8283050 100644 --- a/sdk/python/pulumi_twingate/get_twingate_users.py +++ b/sdk/python/pulumi_twingate/get_twingate_users.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -66,8 +66,8 @@ def get_twingate_users(users: Optional[Sequence[pulumi.InputType['GetTwingateUse __ret__ = pulumi.runtime.invoke('twingate:index/getTwingateUsers:getTwingateUsers', __args__, opts=opts, typ=GetTwingateUsersResult).value return AwaitableGetTwingateUsersResult( - id=__ret__.id, - users=__ret__.users) + id=pulumi.get(__ret__, 'id'), + users=pulumi.get(__ret__, 'users')) @_utilities.lift_output_func(get_twingate_users) diff --git a/sdk/python/pulumi_twingate/outputs.py b/sdk/python/pulumi_twingate/outputs.py index 42158b9..e032454 100644 --- a/sdk/python/pulumi_twingate/outputs.py +++ b/sdk/python/pulumi_twingate/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs @@ -54,10 +54,21 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, group_ids: Optional[Sequence[str]] = None, service_account_ids: Optional[Sequence[str]] = None): + TwingateResourceAccess._configure( + lambda key, value: pulumi.set(__self__, key, value), + group_ids=group_ids, + service_account_ids=service_account_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + group_ids: Optional[Sequence[str]] = None, + service_account_ids: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if group_ids is not None: - pulumi.set(__self__, "group_ids", group_ids) + _setter("group_ids", group_ids) if service_account_ids is not None: - pulumi.set(__self__, "service_account_ids", service_account_ids) + _setter("service_account_ids", service_account_ids) @property @pulumi.getter(name="groupIds") @@ -93,10 +104,23 @@ def __init__(__self__, *, tcp: 'outputs.TwingateResourceProtocolsTcp', udp: 'outputs.TwingateResourceProtocolsUdp', allow_icmp: Optional[bool] = None): - pulumi.set(__self__, "tcp", tcp) - pulumi.set(__self__, "udp", udp) + TwingateResourceProtocols._configure( + lambda key, value: pulumi.set(__self__, key, value), + tcp=tcp, + udp=udp, + allow_icmp=allow_icmp, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tcp: 'outputs.TwingateResourceProtocolsTcp', + udp: 'outputs.TwingateResourceProtocolsUdp', + allow_icmp: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("tcp", tcp) + _setter("udp", udp) if allow_icmp is not None: - pulumi.set(__self__, "allow_icmp", allow_icmp) + _setter("allow_icmp", allow_icmp) @property @pulumi.getter @@ -119,9 +143,20 @@ class TwingateResourceProtocolsTcp(dict): def __init__(__self__, *, policy: str, ports: Optional[Sequence[str]] = None): - pulumi.set(__self__, "policy", policy) + TwingateResourceProtocolsTcp._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -139,9 +174,20 @@ class TwingateResourceProtocolsUdp(dict): def __init__(__self__, *, policy: str, ports: Optional[Sequence[str]] = None): - pulumi.set(__self__, "policy", policy) + TwingateResourceProtocolsUdp._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) @property @pulumi.getter @@ -161,10 +207,25 @@ def __init__(__self__, *, name: str, remote_network_id: str, status_updates_enabled: bool): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "remote_network_id", remote_network_id) - pulumi.set(__self__, "status_updates_enabled", status_updates_enabled) + GetTwingateConnectorsConnectorResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + remote_network_id=remote_network_id, + status_updates_enabled=status_updates_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + name: str, + remote_network_id: str, + status_updates_enabled: bool, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("name", name) + _setter("remote_network_id", remote_network_id) + _setter("status_updates_enabled", status_updates_enabled) @property @pulumi.getter @@ -195,11 +256,28 @@ def __init__(__self__, *, name: str, security_policy_id: str, type: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "is_active", is_active) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "security_policy_id", security_policy_id) - pulumi.set(__self__, "type", type) + GetTwingateGroupsGroupResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + is_active=is_active, + name=name, + security_policy_id=security_policy_id, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + is_active: bool, + name: str, + security_policy_id: str, + type: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("is_active", is_active) + _setter("name", name) + _setter("security_policy_id", security_policy_id) + _setter("type", type) @property @pulumi.getter @@ -233,9 +311,22 @@ def __init__(__self__, *, id: str, location: str, name: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "location", location) - pulumi.set(__self__, "name", name) + GetTwingateRemoteNetworksRemoteNetworkResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + location: str, + name: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("location", location) + _setter("name", name) @property @pulumi.getter @@ -259,11 +350,24 @@ def __init__(__self__, *, allow_icmp: bool, tcps: Optional[Sequence['outputs.GetTwingateResourceProtocolTcpResult']] = None, udps: Optional[Sequence['outputs.GetTwingateResourceProtocolUdpResult']] = None): - pulumi.set(__self__, "allow_icmp", allow_icmp) + GetTwingateResourceProtocolResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_icmp=allow_icmp, + tcps=tcps, + udps=udps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_icmp: bool, + tcps: Optional[Sequence['outputs.GetTwingateResourceProtocolTcpResult']] = None, + udps: Optional[Sequence['outputs.GetTwingateResourceProtocolUdpResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("allow_icmp", allow_icmp) if tcps is not None: - pulumi.set(__self__, "tcps", tcps) + _setter("tcps", tcps) if udps is not None: - pulumi.set(__self__, "udps", udps) + _setter("udps", udps) @property @pulumi.getter(name="allowIcmp") @@ -286,8 +390,19 @@ class GetTwingateResourceProtocolTcpResult(dict): def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourceProtocolTcpResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -305,8 +420,19 @@ class GetTwingateResourceProtocolUdpResult(dict): def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourceProtocolUdpResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -327,12 +453,29 @@ def __init__(__self__, *, name: str, remote_network_id: str, protocols: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolResult']] = None): - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "remote_network_id", remote_network_id) + GetTwingateResourcesResourceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + id=id, + name=name, + remote_network_id=remote_network_id, + protocols=protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: str, + id: str, + name: str, + remote_network_id: str, + protocols: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("address", address) + _setter("id", id) + _setter("name", name) + _setter("remote_network_id", remote_network_id) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) @property @pulumi.getter @@ -366,11 +509,24 @@ def __init__(__self__, *, allow_icmp: bool, tcps: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolTcpResult']] = None, udps: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolUdpResult']] = None): - pulumi.set(__self__, "allow_icmp", allow_icmp) + GetTwingateResourcesResourceProtocolResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_icmp=allow_icmp, + tcps=tcps, + udps=udps, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_icmp: bool, + tcps: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolTcpResult']] = None, + udps: Optional[Sequence['outputs.GetTwingateResourcesResourceProtocolUdpResult']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("allow_icmp", allow_icmp) if tcps is not None: - pulumi.set(__self__, "tcps", tcps) + _setter("tcps", tcps) if udps is not None: - pulumi.set(__self__, "udps", udps) + _setter("udps", udps) @property @pulumi.getter(name="allowIcmp") @@ -393,8 +549,19 @@ class GetTwingateResourcesResourceProtocolTcpResult(dict): def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourcesResourceProtocolTcpResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -412,8 +579,19 @@ class GetTwingateResourcesResourceProtocolUdpResult(dict): def __init__(__self__, *, policy: str, ports: Sequence[str]): - pulumi.set(__self__, "policy", policy) - pulumi.set(__self__, "ports", ports) + GetTwingateResourcesResourceProtocolUdpResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + policy=policy, + ports=ports, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + policy: str, + ports: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("policy", policy) + _setter("ports", ports) @property @pulumi.getter @@ -431,8 +609,19 @@ class GetTwingateSecurityPoliciesSecurityPolicyResult(dict): def __init__(__self__, *, id: str, name: str): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "name", name) + GetTwingateSecurityPoliciesSecurityPolicyResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + name: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("name", name) @property @pulumi.getter @@ -452,10 +641,25 @@ def __init__(__self__, *, key_ids: Sequence[str], name: str, resource_ids: Sequence[str]): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "key_ids", key_ids) - pulumi.set(__self__, "name", name) - pulumi.set(__self__, "resource_ids", resource_ids) + GetTwingateServiceAccountsServiceAccountResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + id=id, + key_ids=key_ids, + name=name, + resource_ids=resource_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + id: str, + key_ids: Sequence[str], + name: str, + resource_ids: Sequence[str], + opts: Optional[pulumi.ResourceOptions]=None): + _setter("id", id) + _setter("key_ids", key_ids) + _setter("name", name) + _setter("resource_ids", resource_ids) @property @pulumi.getter @@ -486,13 +690,36 @@ def __init__(__self__, *, id: str, is_admin: bool, last_name: str, - role: str): - pulumi.set(__self__, "email", email) - pulumi.set(__self__, "first_name", first_name) - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "is_admin", is_admin) - pulumi.set(__self__, "last_name", last_name) - pulumi.set(__self__, "role", role) + role: str, + type: str): + GetTwingateUsersUserResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + id=id, + is_admin=is_admin, + last_name=last_name, + role=role, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: str, + first_name: str, + id: str, + is_admin: bool, + last_name: str, + role: str, + type: str, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("email", email) + _setter("first_name", first_name) + _setter("id", id) + _setter("is_admin", is_admin) + _setter("last_name", last_name) + _setter("role", role) + _setter("type", type) @property @pulumi.getter @@ -512,6 +739,9 @@ def id(self) -> str: @property @pulumi.getter(name="isAdmin") def is_admin(self) -> bool: + warnings.warn("""This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""", DeprecationWarning) + pulumi.log.warn("""is_admin is deprecated: This read-only Boolean value will be deprecated in a future release. You may use the `role` value instead.""") + return pulumi.get(self, "is_admin") @property @@ -524,4 +754,9 @@ def last_name(self) -> str: def role(self) -> str: return pulumi.get(self, "role") + @property + @pulumi.getter + def type(self) -> str: + return pulumi.get(self, "type") + diff --git a/sdk/python/pulumi_twingate/provider.py b/sdk/python/pulumi_twingate/provider.py index d047091..7c1dfa2 100644 --- a/sdk/python/pulumi_twingate/provider.py +++ b/sdk/python/pulumi_twingate/provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ProviderArgs', 'Provider'] @@ -33,20 +33,37 @@ def __init__(__self__, *, environment variable. :param pulumi.Input[str] url: The default is 'twingate.com' This is optional and shouldn't be changed under normal circumstances. """ + ProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + api_token=api_token, + http_max_retry=http_max_retry, + http_timeout=http_timeout, + network=network, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + api_token: Optional[pulumi.Input[str]] = None, + http_max_retry: Optional[pulumi.Input[int]] = None, + http_timeout: Optional[pulumi.Input[int]] = None, + network: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if api_token is not None: - pulumi.set(__self__, "api_token", api_token) + _setter("api_token", api_token) if http_max_retry is None: http_max_retry = 5 if http_max_retry is not None: - pulumi.set(__self__, "http_max_retry", http_max_retry) + _setter("http_max_retry", http_max_retry) if http_timeout is None: http_timeout = 10 if http_timeout is not None: - pulumi.set(__self__, "http_timeout", http_timeout) + _setter("http_timeout", http_timeout) if network is not None: - pulumi.set(__self__, "network", network) + _setter("network", network) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="apiToken") @@ -168,6 +185,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_connector.py b/sdk/python/pulumi_twingate/twingate_connector.py index 5d41727..cc7b19e 100644 --- a/sdk/python/pulumi_twingate/twingate_connector.py +++ b/sdk/python/pulumi_twingate/twingate_connector.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateConnectorArgs', 'TwingateConnector'] @@ -23,11 +23,24 @@ def __init__(__self__, *, :param pulumi.Input[str] name: Name of the Connector, if not provided one will be generated. :param pulumi.Input[bool] status_updates_enabled: Determines whether status notifications are enabled for the Connector. """ - pulumi.set(__self__, "remote_network_id", remote_network_id) + TwingateConnectorArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + remote_network_id=remote_network_id, + name=name, + status_updates_enabled=status_updates_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + remote_network_id: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + status_updates_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("remote_network_id", remote_network_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if status_updates_enabled is not None: - pulumi.set(__self__, "status_updates_enabled", status_updates_enabled) + _setter("status_updates_enabled", status_updates_enabled) @property @pulumi.getter(name="remoteNetworkId") @@ -78,12 +91,25 @@ def __init__(__self__, *, :param pulumi.Input[str] remote_network_id: The ID of the Remote Network the Connector is attached to. :param pulumi.Input[bool] status_updates_enabled: Determines whether status notifications are enabled for the Connector. """ + _TwingateConnectorState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + remote_network_id=remote_network_id, + status_updates_enabled=status_updates_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + remote_network_id: Optional[pulumi.Input[str]] = None, + status_updates_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if remote_network_id is not None: - pulumi.set(__self__, "remote_network_id", remote_network_id) + _setter("remote_network_id", remote_network_id) if status_updates_enabled is not None: - pulumi.set(__self__, "status_updates_enabled", status_updates_enabled) + _setter("status_updates_enabled", status_updates_enabled) @property @pulumi.getter @@ -157,6 +183,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateConnectorArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_connector_tokens.py b/sdk/python/pulumi_twingate/twingate_connector_tokens.py index dd3e1a9..fe13bec 100644 --- a/sdk/python/pulumi_twingate/twingate_connector_tokens.py +++ b/sdk/python/pulumi_twingate/twingate_connector_tokens.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateConnectorTokensArgs', 'TwingateConnectorTokens'] @@ -22,9 +22,20 @@ def __init__(__self__, *, :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. Use this to automatically rotate Connector tokens on a schedule. """ - pulumi.set(__self__, "connector_id", connector_id) + TwingateConnectorTokensArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + connector_id=connector_id, + keepers=keepers, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + connector_id: pulumi.Input[str], + keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("connector_id", connector_id) if keepers is not None: - pulumi.set(__self__, "keepers", keepers) + _setter("keepers", keepers) @property @pulumi.getter(name="connectorId") @@ -67,14 +78,29 @@ def __init__(__self__, *, Connector tokens on a schedule. :param pulumi.Input[str] refresh_token: The Refresh Token of the parent Connector """ + _TwingateConnectorTokensState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_token=access_token, + connector_id=connector_id, + keepers=keepers, + refresh_token=refresh_token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_token: Optional[pulumi.Input[str]] = None, + connector_id: Optional[pulumi.Input[str]] = None, + keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + refresh_token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if access_token is not None: - pulumi.set(__self__, "access_token", access_token) + _setter("access_token", access_token) if connector_id is not None: - pulumi.set(__self__, "connector_id", connector_id) + _setter("connector_id", connector_id) if keepers is not None: - pulumi.set(__self__, "keepers", keepers) + _setter("keepers", keepers) if refresh_token is not None: - pulumi.set(__self__, "refresh_token", refresh_token) + _setter("refresh_token", refresh_token) @property @pulumi.getter(name="accessToken") @@ -160,6 +186,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateConnectorTokensArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_group.py b/sdk/python/pulumi_twingate/twingate_group.py index ab5fd44..1960185 100644 --- a/sdk/python/pulumi_twingate/twingate_group.py +++ b/sdk/python/pulumi_twingate/twingate_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateGroupArgs', 'TwingateGroup'] @@ -27,14 +27,29 @@ def __init__(__self__, *, `twingate_security_policy` and `twingate_security_policies` data sources. :param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: List of User IDs that have permission to access the Group. """ + TwingateGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_authoritative=is_authoritative, + name=name, + security_policy_id=security_policy_id, + user_ids=user_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_authoritative: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + security_policy_id: Optional[pulumi.Input[str]] = None, + user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if is_authoritative is not None: - pulumi.set(__self__, "is_authoritative", is_authoritative) + _setter("is_authoritative", is_authoritative) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if security_policy_id is not None: - pulumi.set(__self__, "security_policy_id", security_policy_id) + _setter("security_policy_id", security_policy_id) if user_ids is not None: - pulumi.set(__self__, "user_ids", user_ids) + _setter("user_ids", user_ids) @property @pulumi.getter(name="isAuthoritative") @@ -103,14 +118,29 @@ def __init__(__self__, *, `twingate_security_policy` and `twingate_security_policies` data sources. :param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: List of User IDs that have permission to access the Group. """ + _TwingateGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_authoritative=is_authoritative, + name=name, + security_policy_id=security_policy_id, + user_ids=user_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_authoritative: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + security_policy_id: Optional[pulumi.Input[str]] = None, + user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if is_authoritative is not None: - pulumi.set(__self__, "is_authoritative", is_authoritative) + _setter("is_authoritative", is_authoritative) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if security_policy_id is not None: - pulumi.set(__self__, "security_policy_id", security_policy_id) + _setter("security_policy_id", security_policy_id) if user_ids is not None: - pulumi.set(__self__, "user_ids", user_ids) + _setter("user_ids", user_ids) @property @pulumi.getter(name="isAuthoritative") @@ -202,6 +232,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_remote_network.py b/sdk/python/pulumi_twingate/twingate_remote_network.py index e17cebd..562848f 100644 --- a/sdk/python/pulumi_twingate/twingate_remote_network.py +++ b/sdk/python/pulumi_twingate/twingate_remote_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateRemoteNetworkArgs', 'TwingateRemoteNetwork'] @@ -21,10 +21,21 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location of the Remote Network. Must be one of the following: AWS, AZURE, GOOGLE_CLOUD, ON_PREMISE, OTHER. :param pulumi.Input[str] name: The name of the Remote Network """ + TwingateRemoteNetworkArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -61,10 +72,21 @@ def __init__(__self__, *, :param pulumi.Input[str] location: The location of the Remote Network. Must be one of the following: AWS, AZURE, GOOGLE_CLOUD, ON_PREMISE, OTHER. :param pulumi.Input[str] name: The name of the Remote Network """ + _TwingateRemoteNetworkState._configure( + lambda key, value: pulumi.set(__self__, key, value), + location=location, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + location: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if location is not None: - pulumi.set(__self__, "location", location) + _setter("location", location) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -124,6 +146,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateRemoteNetworkArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_resource.py b/sdk/python/pulumi_twingate/twingate_resource.py index dcf044e..d7c78aa 100644 --- a/sdk/python/pulumi_twingate/twingate_resource.py +++ b/sdk/python/pulumi_twingate/twingate_resource.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -39,22 +39,47 @@ def __init__(__self__, *, :param pulumi.Input['TwingateResourceProtocolsArgs'] protocols: Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed. """ - pulumi.set(__self__, "address", address) - pulumi.set(__self__, "remote_network_id", remote_network_id) + TwingateResourceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + address=address, + remote_network_id=remote_network_id, + access=access, + alias=alias, + is_authoritative=is_authoritative, + is_browser_shortcut_enabled=is_browser_shortcut_enabled, + is_visible=is_visible, + name=name, + protocols=protocols, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + address: pulumi.Input[str], + remote_network_id: pulumi.Input[str], + access: Optional[pulumi.Input['TwingateResourceAccessArgs']] = None, + alias: Optional[pulumi.Input[str]] = None, + is_authoritative: Optional[pulumi.Input[bool]] = None, + is_browser_shortcut_enabled: Optional[pulumi.Input[bool]] = None, + is_visible: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input['TwingateResourceProtocolsArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("address", address) + _setter("remote_network_id", remote_network_id) if access is not None: - pulumi.set(__self__, "access", access) + _setter("access", access) if alias is not None: - pulumi.set(__self__, "alias", alias) + _setter("alias", alias) if is_authoritative is not None: - pulumi.set(__self__, "is_authoritative", is_authoritative) + _setter("is_authoritative", is_authoritative) if is_browser_shortcut_enabled is not None: - pulumi.set(__self__, "is_browser_shortcut_enabled", is_browser_shortcut_enabled) + _setter("is_browser_shortcut_enabled", is_browser_shortcut_enabled) if is_visible is not None: - pulumi.set(__self__, "is_visible", is_visible) + _setter("is_visible", is_visible) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) @property @pulumi.getter @@ -193,24 +218,49 @@ def __init__(__self__, *, restriction, and all protocols and ports are allowed. :param pulumi.Input[str] remote_network_id: Remote Network ID where the Resource lives """ + _TwingateResourceState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access=access, + address=address, + alias=alias, + is_authoritative=is_authoritative, + is_browser_shortcut_enabled=is_browser_shortcut_enabled, + is_visible=is_visible, + name=name, + protocols=protocols, + remote_network_id=remote_network_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access: Optional[pulumi.Input['TwingateResourceAccessArgs']] = None, + address: Optional[pulumi.Input[str]] = None, + alias: Optional[pulumi.Input[str]] = None, + is_authoritative: Optional[pulumi.Input[bool]] = None, + is_browser_shortcut_enabled: Optional[pulumi.Input[bool]] = None, + is_visible: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + protocols: Optional[pulumi.Input['TwingateResourceProtocolsArgs']] = None, + remote_network_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if access is not None: - pulumi.set(__self__, "access", access) + _setter("access", access) if address is not None: - pulumi.set(__self__, "address", address) + _setter("address", address) if alias is not None: - pulumi.set(__self__, "alias", alias) + _setter("alias", alias) if is_authoritative is not None: - pulumi.set(__self__, "is_authoritative", is_authoritative) + _setter("is_authoritative", is_authoritative) if is_browser_shortcut_enabled is not None: - pulumi.set(__self__, "is_browser_shortcut_enabled", is_browser_shortcut_enabled) + _setter("is_browser_shortcut_enabled", is_browser_shortcut_enabled) if is_visible is not None: - pulumi.set(__self__, "is_visible", is_visible) + _setter("is_visible", is_visible) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocols is not None: - pulumi.set(__self__, "protocols", protocols) + _setter("protocols", protocols) if remote_network_id is not None: - pulumi.set(__self__, "remote_network_id", remote_network_id) + _setter("remote_network_id", remote_network_id) @property @pulumi.getter @@ -372,6 +422,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateResourceArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -395,6 +449,11 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = TwingateResourceArgs.__new__(TwingateResourceArgs) + if not isinstance(access, TwingateResourceAccessArgs): + access = access or {} + def _setter(key, value): + access[key] = value + TwingateResourceAccessArgs._configure(_setter, **access) __props__.__dict__["access"] = access if address is None and not opts.urn: raise TypeError("Missing required property 'address'") @@ -404,6 +463,11 @@ def _internal_init(__self__, __props__.__dict__["is_browser_shortcut_enabled"] = is_browser_shortcut_enabled __props__.__dict__["is_visible"] = is_visible __props__.__dict__["name"] = name + if not isinstance(protocols, TwingateResourceProtocolsArgs): + protocols = protocols or {} + def _setter(key, value): + protocols[key] = value + TwingateResourceProtocolsArgs._configure(_setter, **protocols) __props__.__dict__["protocols"] = protocols if remote_network_id is None and not opts.urn: raise TypeError("Missing required property 'remote_network_id'") diff --git a/sdk/python/pulumi_twingate/twingate_service_account.py b/sdk/python/pulumi_twingate/twingate_service_account.py index 58de467..af5ec3a 100644 --- a/sdk/python/pulumi_twingate/twingate_service_account.py +++ b/sdk/python/pulumi_twingate/twingate_service_account.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateServiceAccountArgs', 'TwingateServiceAccount'] @@ -19,8 +19,17 @@ def __init__(__self__, *, The set of arguments for constructing a TwingateServiceAccount resource. :param pulumi.Input[str] name: The name of the Service Account in Twingate """ + TwingateServiceAccountArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -43,8 +52,17 @@ def __init__(__self__, *, Input properties used for looking up and filtering TwingateServiceAccount resources. :param pulumi.Input[str] name: The name of the Service Account in Twingate """ + _TwingateServiceAccountState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter @@ -90,6 +108,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateServiceAccountArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_service_account_key.py b/sdk/python/pulumi_twingate/twingate_service_account_key.py index f937820..8891460 100644 --- a/sdk/python/pulumi_twingate/twingate_service_account_key.py +++ b/sdk/python/pulumi_twingate/twingate_service_account_key.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TwingateServiceAccountKeyArgs', 'TwingateServiceAccountKey'] @@ -21,9 +21,20 @@ def __init__(__self__, *, :param pulumi.Input[str] service_account_id: The id of the Service Account :param pulumi.Input[str] name: The name of the Service Key """ - pulumi.set(__self__, "service_account_id", service_account_id) + TwingateServiceAccountKeyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + service_account_id=service_account_id, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + service_account_id: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("service_account_id", service_account_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="serviceAccountId") @@ -62,12 +73,25 @@ def __init__(__self__, *, :param pulumi.Input[str] service_account_id: The id of the Service Account :param pulumi.Input[str] token: Autogenerated Service Key token. Used to configure a Twingate Client running in headless mode. """ + _TwingateServiceAccountKeyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + service_account_id=service_account_id, + token=token, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + service_account_id: Optional[pulumi.Input[str]] = None, + token: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if service_account_id is not None: - pulumi.set(__self__, "service_account_id", service_account_id) + _setter("service_account_id", service_account_id) if token is not None: - pulumi.set(__self__, "token", token) + _setter("token", token) @property @pulumi.getter @@ -139,6 +163,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateServiceAccountKeyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_twingate/twingate_user.py b/sdk/python/pulumi_twingate/twingate_user.py new file mode 100644 index 0000000..fa740c5 --- /dev/null +++ b/sdk/python/pulumi_twingate/twingate_user.py @@ -0,0 +1,451 @@ +# coding=utf-8 +# *** 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! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['TwingateUserArgs', 'TwingateUser'] + +@pulumi.input_type +class TwingateUserArgs: + def __init__(__self__, *, + email: pulumi.Input[str], + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None): + """ + The set of arguments for constructing a TwingateUser resource. + :param pulumi.Input[str] email: The User's email address + :param pulumi.Input[str] first_name: The User's first name + :param pulumi.Input[bool] is_active: Determines whether the User is active or not. Inactive users will be not able to sign in. + :param pulumi.Input[str] last_name: The User's last name + :param pulumi.Input[str] role: Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + :param pulumi.Input[bool] send_invite: Determines whether to send an email invitation to the User. True by default. + """ + TwingateUserArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + is_active=is_active, + last_name=last_name, + role=role, + send_invite=send_invite, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: pulumi.Input[str], + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + _setter("email", email) + if first_name is not None: + _setter("first_name", first_name) + if is_active is not None: + _setter("is_active", is_active) + if last_name is not None: + _setter("last_name", last_name) + if role is not None: + _setter("role", role) + if send_invite is not None: + _setter("send_invite", send_invite) + + @property + @pulumi.getter + def email(self) -> pulumi.Input[str]: + """ + The User's email address + """ + return pulumi.get(self, "email") + + @email.setter + def email(self, value: pulumi.Input[str]): + pulumi.set(self, "email", value) + + @property + @pulumi.getter(name="firstName") + def first_name(self) -> Optional[pulumi.Input[str]]: + """ + The User's first name + """ + return pulumi.get(self, "first_name") + + @first_name.setter + def first_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "first_name", value) + + @property + @pulumi.getter(name="isActive") + def is_active(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether the User is active or not. Inactive users will be not able to sign in. + """ + return pulumi.get(self, "is_active") + + @is_active.setter + def is_active(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_active", value) + + @property + @pulumi.getter(name="lastName") + def last_name(self) -> Optional[pulumi.Input[str]]: + """ + The User's last name + """ + return pulumi.get(self, "last_name") + + @last_name.setter + def last_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "last_name", value) + + @property + @pulumi.getter + def role(self) -> Optional[pulumi.Input[str]]: + """ + Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + """ + return pulumi.get(self, "role") + + @role.setter + def role(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "role", value) + + @property + @pulumi.getter(name="sendInvite") + def send_invite(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether to send an email invitation to the User. True by default. + """ + return pulumi.get(self, "send_invite") + + @send_invite.setter + def send_invite(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "send_invite", value) + + +@pulumi.input_type +class _TwingateUserState: + def __init__(__self__, *, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering TwingateUser resources. + :param pulumi.Input[str] email: The User's email address + :param pulumi.Input[str] first_name: The User's first name + :param pulumi.Input[bool] is_active: Determines whether the User is active or not. Inactive users will be not able to sign in. + :param pulumi.Input[str] last_name: The User's last name + :param pulumi.Input[str] role: Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + :param pulumi.Input[bool] send_invite: Determines whether to send an email invitation to the User. True by default. + :param pulumi.Input[str] type: Indicates the User's type. Either MANUAL or SYNCED. + """ + _TwingateUserState._configure( + lambda key, value: pulumi.set(__self__, key, value), + email=email, + first_name=first_name, + is_active=is_active, + last_name=last_name, + role=role, + send_invite=send_invite, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None): + if email is not None: + _setter("email", email) + if first_name is not None: + _setter("first_name", first_name) + if is_active is not None: + _setter("is_active", is_active) + if last_name is not None: + _setter("last_name", last_name) + if role is not None: + _setter("role", role) + if send_invite is not None: + _setter("send_invite", send_invite) + if type is not None: + _setter("type", type) + + @property + @pulumi.getter + def email(self) -> Optional[pulumi.Input[str]]: + """ + The User's email address + """ + return pulumi.get(self, "email") + + @email.setter + def email(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "email", value) + + @property + @pulumi.getter(name="firstName") + def first_name(self) -> Optional[pulumi.Input[str]]: + """ + The User's first name + """ + return pulumi.get(self, "first_name") + + @first_name.setter + def first_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "first_name", value) + + @property + @pulumi.getter(name="isActive") + def is_active(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether the User is active or not. Inactive users will be not able to sign in. + """ + return pulumi.get(self, "is_active") + + @is_active.setter + def is_active(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_active", value) + + @property + @pulumi.getter(name="lastName") + def last_name(self) -> Optional[pulumi.Input[str]]: + """ + The User's last name + """ + return pulumi.get(self, "last_name") + + @last_name.setter + def last_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "last_name", value) + + @property + @pulumi.getter + def role(self) -> Optional[pulumi.Input[str]]: + """ + Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + """ + return pulumi.get(self, "role") + + @role.setter + def role(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "role", value) + + @property + @pulumi.getter(name="sendInvite") + def send_invite(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether to send an email invitation to the User. True by default. + """ + return pulumi.get(self, "send_invite") + + @send_invite.setter + def send_invite(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "send_invite", value) + + @property + @pulumi.getter + def type(self) -> Optional[pulumi.Input[str]]: + """ + Indicates the User's type. Either MANUAL or SYNCED. + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "type", value) + + +class TwingateUser(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + __props__=None): + """ + Create a TwingateUser resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] email: The User's email address + :param pulumi.Input[str] first_name: The User's first name + :param pulumi.Input[bool] is_active: Determines whether the User is active or not. Inactive users will be not able to sign in. + :param pulumi.Input[str] last_name: The User's last name + :param pulumi.Input[str] role: Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + :param pulumi.Input[bool] send_invite: Determines whether to send an email invitation to the User. True by default. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: TwingateUserArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Create a TwingateUser resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param TwingateUserArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(TwingateUserArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TwingateUserArgs._configure(_setter, **kwargs) + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = TwingateUserArgs.__new__(TwingateUserArgs) + + if email is None and not opts.urn: + raise TypeError("Missing required property 'email'") + __props__.__dict__["email"] = email + __props__.__dict__["first_name"] = first_name + __props__.__dict__["is_active"] = is_active + __props__.__dict__["last_name"] = last_name + __props__.__dict__["role"] = role + __props__.__dict__["send_invite"] = send_invite + __props__.__dict__["type"] = None + super(TwingateUser, __self__).__init__( + 'twingate:index/twingateUser:TwingateUser', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + email: Optional[pulumi.Input[str]] = None, + first_name: Optional[pulumi.Input[str]] = None, + is_active: Optional[pulumi.Input[bool]] = None, + last_name: Optional[pulumi.Input[str]] = None, + role: Optional[pulumi.Input[str]] = None, + send_invite: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None) -> 'TwingateUser': + """ + Get an existing TwingateUser resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] email: The User's email address + :param pulumi.Input[str] first_name: The User's first name + :param pulumi.Input[bool] is_active: Determines whether the User is active or not. Inactive users will be not able to sign in. + :param pulumi.Input[str] last_name: The User's last name + :param pulumi.Input[str] role: Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + :param pulumi.Input[bool] send_invite: Determines whether to send an email invitation to the User. True by default. + :param pulumi.Input[str] type: Indicates the User's type. Either MANUAL or SYNCED. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _TwingateUserState.__new__(_TwingateUserState) + + __props__.__dict__["email"] = email + __props__.__dict__["first_name"] = first_name + __props__.__dict__["is_active"] = is_active + __props__.__dict__["last_name"] = last_name + __props__.__dict__["role"] = role + __props__.__dict__["send_invite"] = send_invite + __props__.__dict__["type"] = type + return TwingateUser(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def email(self) -> pulumi.Output[str]: + """ + The User's email address + """ + return pulumi.get(self, "email") + + @property + @pulumi.getter(name="firstName") + def first_name(self) -> pulumi.Output[str]: + """ + The User's first name + """ + return pulumi.get(self, "first_name") + + @property + @pulumi.getter(name="isActive") + def is_active(self) -> pulumi.Output[bool]: + """ + Determines whether the User is active or not. Inactive users will be not able to sign in. + """ + return pulumi.get(self, "is_active") + + @property + @pulumi.getter(name="lastName") + def last_name(self) -> pulumi.Output[str]: + """ + The User's last name + """ + return pulumi.get(self, "last_name") + + @property + @pulumi.getter + def role(self) -> pulumi.Output[str]: + """ + Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER. + """ + return pulumi.get(self, "role") + + @property + @pulumi.getter(name="sendInvite") + def send_invite(self) -> pulumi.Output[bool]: + """ + Determines whether to send an email invitation to the User. True by default. + """ + return pulumi.get(self, "send_invite") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + Indicates the User's type. Either MANUAL or SYNCED. + """ + return pulumi.get(self, "type") + diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 00c1105..03f4937 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -9,26 +9,6 @@ VERSION = "0.0.0" -PLUGIN_VERSION = "0.0.0" - -class InstallPluginCommand(install): - def run(self): - install.run(self) - try: - check_call(['pulumi', 'plugin', 'install', 'resource', 'twingate', PLUGIN_VERSION, '--server', 'github://api.github.com/twingate-labs']) - except OSError as error: - if error.errno == errno.ENOENT: - print(f""" - There was an error installing the twingate resource provider plugin. - It looks like `pulumi` is not installed on your system. - Please visit https://pulumi.com/ to install the Pulumi CLI. - You may try manually installing the plugin by running - `pulumi plugin install resource twingate {PLUGIN_VERSION}` - """) - else: - raise - - def readme(): try: with open('README.md', encoding='utf-8') as f: @@ -43,9 +23,6 @@ def readme(): description="A Pulumi package for creating and managing Twingate cloud resources.", long_description=readme(), long_description_content_type='text/markdown', - cmdclass={ - 'install': InstallPluginCommand, - }, keywords='pulumi twingate category/infrastructure', url='https://www.twingate.com', project_urls={