diff --git a/sdk/dotnet/Conversation.cs b/sdk/dotnet/Conversation.cs index 9eb8ee9..252c2e6 100644 --- a/sdk/dotnet/Conversation.cs +++ b/sdk/dotnet/Conversation.cs @@ -123,7 +123,11 @@ namespace Pulumi.Slack public partial class Conversation : global::Pulumi.CustomResource { /// - /// Either of none or archive + /// indicates whether the + /// conversation should be archived or left behind on destroy. Valid values are + /// `archive | none`. Note that when set to `none` the conversation will be left + /// as it is and as a result any subsequent runs of pulumi up with the same + /// name will fail. /// [Output("actionOnDestroy")] public Output ActionOnDestroy { get; private set; } = null!; @@ -262,7 +266,11 @@ public static Conversation Get(string name, Input id, ConversationState? public sealed class ConversationArgs : global::Pulumi.ResourceArgs { /// - /// Either of none or archive + /// indicates whether the + /// conversation should be archived or left behind on destroy. Valid values are + /// `archive | none`. Note that when set to `none` the conversation will be left + /// as it is and as a result any subsequent runs of pulumi up with the same + /// name will fail. /// [Input("actionOnDestroy")] public Input? ActionOnDestroy { get; set; } @@ -330,7 +338,11 @@ public ConversationArgs() public sealed class ConversationState : global::Pulumi.ResourceArgs { /// - /// Either of none or archive + /// indicates whether the + /// conversation should be archived or left behind on destroy. Valid values are + /// `archive | none`. Note that when set to `none` the conversation will be left + /// as it is and as a result any subsequent runs of pulumi up with the same + /// name will fail. /// [Input("actionOnDestroy")] public Input? ActionOnDestroy { get; set; } diff --git a/sdk/dotnet/GetConversation.cs b/sdk/dotnet/GetConversation.cs index 3e6cc2f..6a638d4 100644 --- a/sdk/dotnet/GetConversation.cs +++ b/sdk/dotnet/GetConversation.cs @@ -121,6 +121,9 @@ public sealed class GetConversationArgs : global::Pulumi.InvokeArgs /// /// The conversation is privileged between two or more members + /// + /// Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + /// with `name`. /// [Input("isPrivate")] public bool? IsPrivate { get; set; } @@ -147,6 +150,9 @@ public sealed class GetConversationInvokeArgs : global::Pulumi.InvokeArgs /// /// The conversation is privileged between two or more members + /// + /// Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + /// with `name`. /// [Input("isPrivate")] public Input? IsPrivate { get; set; } diff --git a/sdk/dotnet/GetUser.cs b/sdk/dotnet/GetUser.cs index c88d15a..8729cf5 100644 --- a/sdk/dotnet/GetUser.cs +++ b/sdk/dotnet/GetUser.cs @@ -115,6 +115,8 @@ public sealed class GetUserArgs : global::Pulumi.InvokeArgs { /// /// The email of the user + /// + /// The data source expects exactly one of these fields, you can't set both. /// [Input("email")] public string? Email { get; set; } @@ -135,6 +137,8 @@ public sealed class GetUserInvokeArgs : global::Pulumi.InvokeArgs { /// /// The email of the user + /// + /// The data source expects exactly one of these fields, you can't set both. /// [Input("email")] public Input? Email { get; set; } diff --git a/sdk/dotnet/GetUsergroup.cs b/sdk/dotnet/GetUsergroup.cs index bc88dd7..c9517b3 100644 --- a/sdk/dotnet/GetUsergroup.cs +++ b/sdk/dotnet/GetUsergroup.cs @@ -117,6 +117,8 @@ public sealed class GetUsergroupArgs : global::Pulumi.InvokeArgs /// /// The id of the usergroup + /// + /// The data source expects exactly one of these fields, you can't set both. /// [Input("usergroupId")] public string? UsergroupId { get; set; } @@ -137,6 +139,8 @@ public sealed class GetUsergroupInvokeArgs : global::Pulumi.InvokeArgs /// /// The id of the usergroup + /// + /// The data source expects exactly one of these fields, you can't set both. /// [Input("usergroupId")] public Input? UsergroupId { get; set; } diff --git a/sdk/dotnet/Pulumi.Slack.csproj b/sdk/dotnet/Pulumi.Slack.csproj index 88dd7f0..9c01a9e 100644 --- a/sdk/dotnet/Pulumi.Slack.csproj +++ b/sdk/dotnet/Pulumi.Slack.csproj @@ -12,7 +12,6 @@ net6.0 enable - false diff --git a/sdk/go/slack/config/config.go b/sdk/go/slack/config/config.go index b132f55..eea99b3 100644 --- a/sdk/go/slack/config/config.go +++ b/sdk/go/slack/config/config.go @@ -4,10 +4,13 @@ package config import ( + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) +var _ = internal.GetEnvOrDefault + // The Slack token func GetToken(ctx *pulumi.Context) string { return config.Get(ctx, "slack:token") diff --git a/sdk/go/slack/conversation.go b/sdk/go/slack/conversation.go index 877d9ac..8810544 100644 --- a/sdk/go/slack/conversation.go +++ b/sdk/go/slack/conversation.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // Manages a Slack channel @@ -148,7 +150,11 @@ import ( type Conversation struct { pulumi.CustomResourceState - // Either of none or archive + // indicates whether the + // conversation should be archived or left behind on destroy. Valid values are + // `archive | none`. Note that when set to `none` the conversation will be left + // as it is and as a result any subsequent runs of pulumi up with the same + // name will fail. ActionOnDestroy pulumi.StringPtrOutput `pulumi:"actionOnDestroy"` // indicate // whether the members should be kick of the channel when removed from @@ -195,6 +201,7 @@ func NewConversation(ctx *pulumi.Context, if args.IsPrivate == nil { return nil, errors.New("invalid value for required argument 'IsPrivate'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource Conversation err := ctx.RegisterResource("slack:index/conversation:Conversation", name, args, &resource, opts...) if err != nil { @@ -217,7 +224,11 @@ func GetConversation(ctx *pulumi.Context, // Input properties used for looking up and filtering Conversation resources. type conversationState struct { - // Either of none or archive + // indicates whether the + // conversation should be archived or left behind on destroy. Valid values are + // `archive | none`. Note that when set to `none` the conversation will be left + // as it is and as a result any subsequent runs of pulumi up with the same + // name will fail. ActionOnDestroy *string `pulumi:"actionOnDestroy"` // indicate // whether the members should be kick of the channel when removed from @@ -255,7 +266,11 @@ type conversationState struct { } type ConversationState struct { - // Either of none or archive + // indicates whether the + // conversation should be archived or left behind on destroy. Valid values are + // `archive | none`. Note that when set to `none` the conversation will be left + // as it is and as a result any subsequent runs of pulumi up with the same + // name will fail. ActionOnDestroy pulumi.StringPtrInput // indicate // whether the members should be kick of the channel when removed from @@ -297,7 +312,11 @@ func (ConversationState) ElementType() reflect.Type { } type conversationArgs struct { - // Either of none or archive + // indicates whether the + // conversation should be archived or left behind on destroy. Valid values are + // `archive | none`. Note that when set to `none` the conversation will be left + // as it is and as a result any subsequent runs of pulumi up with the same + // name will fail. ActionOnDestroy *string `pulumi:"actionOnDestroy"` // indicate // whether the members should be kick of the channel when removed from @@ -321,7 +340,11 @@ type conversationArgs struct { // The set of arguments for constructing a Conversation resource. type ConversationArgs struct { - // Either of none or archive + // indicates whether the + // conversation should be archived or left behind on destroy. Valid values are + // `archive | none`. Note that when set to `none` the conversation will be left + // as it is and as a result any subsequent runs of pulumi up with the same + // name will fail. ActionOnDestroy pulumi.StringPtrInput // indicate // whether the members should be kick of the channel when removed from @@ -366,6 +389,12 @@ func (i *Conversation) ToConversationOutputWithContext(ctx context.Context) Conv return pulumi.ToOutputWithContext(ctx, i).(ConversationOutput) } +func (i *Conversation) ToOutput(ctx context.Context) pulumix.Output[*Conversation] { + return pulumix.Output[*Conversation]{ + OutputState: i.ToConversationOutputWithContext(ctx).OutputState, + } +} + // ConversationArrayInput is an input type that accepts ConversationArray and ConversationArrayOutput values. // You can construct a concrete instance of `ConversationArrayInput` via: // @@ -391,6 +420,12 @@ func (i ConversationArray) ToConversationArrayOutputWithContext(ctx context.Cont return pulumi.ToOutputWithContext(ctx, i).(ConversationArrayOutput) } +func (i ConversationArray) ToOutput(ctx context.Context) pulumix.Output[[]*Conversation] { + return pulumix.Output[[]*Conversation]{ + OutputState: i.ToConversationArrayOutputWithContext(ctx).OutputState, + } +} + // ConversationMapInput is an input type that accepts ConversationMap and ConversationMapOutput values. // You can construct a concrete instance of `ConversationMapInput` via: // @@ -416,6 +451,12 @@ func (i ConversationMap) ToConversationMapOutputWithContext(ctx context.Context) return pulumi.ToOutputWithContext(ctx, i).(ConversationMapOutput) } +func (i ConversationMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Conversation] { + return pulumix.Output[map[string]*Conversation]{ + OutputState: i.ToConversationMapOutputWithContext(ctx).OutputState, + } +} + type ConversationOutput struct{ *pulumi.OutputState } func (ConversationOutput) ElementType() reflect.Type { @@ -430,7 +471,17 @@ func (o ConversationOutput) ToConversationOutputWithContext(ctx context.Context) return o } -// Either of none or archive +func (o ConversationOutput) ToOutput(ctx context.Context) pulumix.Output[*Conversation] { + return pulumix.Output[*Conversation]{ + OutputState: o.OutputState, + } +} + +// indicates whether the +// conversation should be archived or left behind on destroy. Valid values are +// `archive | none`. Note that when set to `none` the conversation will be left +// as it is and as a result any subsequent runs of pulumi up with the same +// name will fail. func (o ConversationOutput) ActionOnDestroy() pulumi.StringPtrOutput { return o.ApplyT(func(v *Conversation) pulumi.StringPtrOutput { return v.ActionOnDestroy }).(pulumi.StringPtrOutput) } @@ -524,6 +575,12 @@ func (o ConversationArrayOutput) ToConversationArrayOutputWithContext(ctx contex return o } +func (o ConversationArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*Conversation] { + return pulumix.Output[[]*Conversation]{ + OutputState: o.OutputState, + } +} + func (o ConversationArrayOutput) Index(i pulumi.IntInput) ConversationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Conversation { return vs[0].([]*Conversation)[vs[1].(int)] @@ -544,6 +601,12 @@ func (o ConversationMapOutput) ToConversationMapOutputWithContext(ctx context.Co return o } +func (o ConversationMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*Conversation] { + return pulumix.Output[map[string]*Conversation]{ + OutputState: o.OutputState, + } +} + func (o ConversationMapOutput) MapIndex(k pulumi.StringInput) ConversationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Conversation { return vs[0].(map[string]*Conversation)[vs[1].(string)] diff --git a/sdk/go/slack/getConversation.go b/sdk/go/slack/getConversation.go index cf719db..4e40882 100644 --- a/sdk/go/slack/getConversation.go +++ b/sdk/go/slack/getConversation.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // Use this data source to get information about a Slack conversation for use in other @@ -60,6 +62,7 @@ import ( // // ``` func LookupConversation(ctx *pulumi.Context, args *LookupConversationArgs, opts ...pulumi.InvokeOption) (*LookupConversationResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupConversationResult err := ctx.Invoke("slack:index/getConversation:getConversation", args, &rv, opts...) if err != nil { @@ -73,6 +76,9 @@ type LookupConversationArgs struct { // The ID of the channel ChannelId *string `pulumi:"channelId"` // The conversation is privileged between two or more members + // + // Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction + // with `name`. IsPrivate *bool `pulumi:"isPrivate"` // The name of the public or private channel Name *string `pulumi:"name"` @@ -128,6 +134,9 @@ type LookupConversationOutputArgs struct { // The ID of the channel ChannelId pulumi.StringPtrInput `pulumi:"channelId"` // The conversation is privileged between two or more members + // + // Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction + // with `name`. IsPrivate pulumi.BoolPtrInput `pulumi:"isPrivate"` // The name of the public or private channel Name pulumi.StringPtrInput `pulumi:"name"` @@ -152,6 +161,12 @@ func (o LookupConversationResultOutput) ToLookupConversationResultOutputWithCont return o } +func (o LookupConversationResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupConversationResult] { + return pulumix.Output[LookupConversationResult]{ + OutputState: o.OutputState, + } +} + func (o LookupConversationResultOutput) ChannelId() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupConversationResult) *string { return v.ChannelId }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/slack/getUser.go b/sdk/go/slack/getUser.go index 9edaa00..435051a 100644 --- a/sdk/go/slack/getUser.go +++ b/sdk/go/slack/getUser.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // Use this data source to get information about a user for use in other @@ -60,6 +62,7 @@ import ( // // ``` func GetUser(ctx *pulumi.Context, args *GetUserArgs, opts ...pulumi.InvokeOption) (*GetUserResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetUserResult err := ctx.Invoke("slack:index/getUser:getUser", args, &rv, opts...) if err != nil { @@ -71,6 +74,8 @@ func GetUser(ctx *pulumi.Context, args *GetUserArgs, opts ...pulumi.InvokeOption // A collection of arguments for invoking getUser. type GetUserArgs struct { // The email of the user + // + // The data source expects exactly one of these fields, you can't set both. Email *string `pulumi:"email"` // The name of the user Name *string `pulumi:"name"` @@ -100,6 +105,8 @@ func GetUserOutput(ctx *pulumi.Context, args GetUserOutputArgs, opts ...pulumi.I // A collection of arguments for invoking getUser. type GetUserOutputArgs struct { // The email of the user + // + // The data source expects exactly one of these fields, you can't set both. Email pulumi.StringPtrInput `pulumi:"email"` // The name of the user Name pulumi.StringPtrInput `pulumi:"name"` @@ -124,6 +131,12 @@ func (o GetUserResultOutput) ToGetUserResultOutputWithContext(ctx context.Contex return o } +func (o GetUserResultOutput) ToOutput(ctx context.Context) pulumix.Output[GetUserResult] { + return pulumix.Output[GetUserResult]{ + OutputState: o.OutputState, + } +} + func (o GetUserResultOutput) Email() pulumi.StringPtrOutput { return o.ApplyT(func(v GetUserResult) *string { return v.Email }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/slack/getUsergroup.go b/sdk/go/slack/getUsergroup.go index 443ddf5..a27708a 100644 --- a/sdk/go/slack/getUsergroup.go +++ b/sdk/go/slack/getUsergroup.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // Use this data source to get information about a usergroups for use in other @@ -58,6 +60,7 @@ import ( // // ``` func LookupUsergroup(ctx *pulumi.Context, args *LookupUsergroupArgs, opts ...pulumi.InvokeOption) (*LookupUsergroupResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupUsergroupResult err := ctx.Invoke("slack:index/getUsergroup:getUsergroup", args, &rv, opts...) if err != nil { @@ -71,6 +74,8 @@ type LookupUsergroupArgs struct { // The name of the usergroup Name *string `pulumi:"name"` // The id of the usergroup + // + // The data source expects exactly one of these fields, you can't set both. UsergroupId *string `pulumi:"usergroupId"` } @@ -109,6 +114,8 @@ type LookupUsergroupOutputArgs struct { // The name of the usergroup Name pulumi.StringPtrInput `pulumi:"name"` // The id of the usergroup + // + // The data source expects exactly one of these fields, you can't set both. UsergroupId pulumi.StringPtrInput `pulumi:"usergroupId"` } @@ -131,6 +138,12 @@ func (o LookupUsergroupResultOutput) ToLookupUsergroupResultOutputWithContext(ct return o } +func (o LookupUsergroupResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupUsergroupResult] { + return pulumix.Output[LookupUsergroupResult]{ + OutputState: o.OutputState, + } +} + // The channel IDs for which the User Group uses as a default. func (o LookupUsergroupResultOutput) Channels() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupUsergroupResult) []string { return v.Channels }).(pulumi.StringArrayOutput) diff --git a/sdk/go/slack/init.go b/sdk/go/slack/init.go index 9210966..5cd4389 100644 --- a/sdk/go/slack/init.go +++ b/sdk/go/slack/init.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/blang/semver" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -51,7 +52,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( "slack", "index/conversation", diff --git a/sdk/go/slack/pulumiUtilities.go b/sdk/go/slack/internal/pulumiUtilities.go similarity index 59% rename from sdk/go/slack/pulumiUtilities.go rename to sdk/go/slack/internal/pulumiUtilities.go index 50f4513..ae6eb3d 100644 --- a/sdk/go/slack/pulumiUtilities.go +++ b/sdk/go/slack/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 slack +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-slack/sdk(/v\\d+)?") @@ -79,9 +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{} + + 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{} + + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } + return append(defaults, opts...) +} diff --git a/sdk/go/slack/internal/pulumiVersion.go b/sdk/go/slack/internal/pulumiVersion.go new file mode 100644 index 0000000..d591687 --- /dev/null +++ b/sdk/go/slack/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/slack/provider.go b/sdk/go/slack/provider.go index ee2056d..40c81ca 100644 --- a/sdk/go/slack/provider.go +++ b/sdk/go/slack/provider.go @@ -8,7 +8,9 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // The provider type for the slack package. By default, resources use package-wide configuration @@ -32,6 +34,7 @@ func NewProvider(ctx *pulumi.Context, if args.Token == nil { return nil, errors.New("invalid value for required argument 'Token'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource Provider err := ctx.RegisterResource("pulumi:providers:slack", name, args, &resource, opts...) if err != nil { @@ -74,6 +77,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 { @@ -88,6 +97,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 Slack token func (o ProviderOutput) Token() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Token }).(pulumi.StringOutput) diff --git a/sdk/go/slack/usergroup.go b/sdk/go/slack/usergroup.go index 6189c84..cc2952e 100644 --- a/sdk/go/slack/usergroup.go +++ b/sdk/go/slack/usergroup.go @@ -7,7 +7,9 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-slack/sdk/go/slack/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // Manages a Slack User Group. @@ -137,6 +139,7 @@ func NewUsergroup(ctx *pulumi.Context, args = &UsergroupArgs{} } + opts = internal.PkgResourceDefaultOpts(opts) var resource Usergroup err := ctx.RegisterResource("slack:index/usergroup:Usergroup", name, args, &resource, opts...) if err != nil { @@ -246,6 +249,12 @@ func (i *Usergroup) ToUsergroupOutputWithContext(ctx context.Context) UsergroupO return pulumi.ToOutputWithContext(ctx, i).(UsergroupOutput) } +func (i *Usergroup) ToOutput(ctx context.Context) pulumix.Output[*Usergroup] { + return pulumix.Output[*Usergroup]{ + OutputState: i.ToUsergroupOutputWithContext(ctx).OutputState, + } +} + // UsergroupArrayInput is an input type that accepts UsergroupArray and UsergroupArrayOutput values. // You can construct a concrete instance of `UsergroupArrayInput` via: // @@ -271,6 +280,12 @@ func (i UsergroupArray) ToUsergroupArrayOutputWithContext(ctx context.Context) U return pulumi.ToOutputWithContext(ctx, i).(UsergroupArrayOutput) } +func (i UsergroupArray) ToOutput(ctx context.Context) pulumix.Output[[]*Usergroup] { + return pulumix.Output[[]*Usergroup]{ + OutputState: i.ToUsergroupArrayOutputWithContext(ctx).OutputState, + } +} + // UsergroupMapInput is an input type that accepts UsergroupMap and UsergroupMapOutput values. // You can construct a concrete instance of `UsergroupMapInput` via: // @@ -296,6 +311,12 @@ func (i UsergroupMap) ToUsergroupMapOutputWithContext(ctx context.Context) Userg return pulumi.ToOutputWithContext(ctx, i).(UsergroupMapOutput) } +func (i UsergroupMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Usergroup] { + return pulumix.Output[map[string]*Usergroup]{ + OutputState: i.ToUsergroupMapOutputWithContext(ctx).OutputState, + } +} + type UsergroupOutput struct{ *pulumi.OutputState } func (UsergroupOutput) ElementType() reflect.Type { @@ -310,6 +331,12 @@ func (o UsergroupOutput) ToUsergroupOutputWithContext(ctx context.Context) Userg return o } +func (o UsergroupOutput) ToOutput(ctx context.Context) pulumix.Output[*Usergroup] { + return pulumix.Output[*Usergroup]{ + OutputState: o.OutputState, + } +} + // channel IDs for which the User Group uses as a default. func (o UsergroupOutput) Channels() pulumi.StringArrayOutput { return o.ApplyT(func(v *Usergroup) pulumi.StringArrayOutput { return v.Channels }).(pulumi.StringArrayOutput) @@ -351,6 +378,12 @@ func (o UsergroupArrayOutput) ToUsergroupArrayOutputWithContext(ctx context.Cont return o } +func (o UsergroupArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*Usergroup] { + return pulumix.Output[[]*Usergroup]{ + OutputState: o.OutputState, + } +} + func (o UsergroupArrayOutput) Index(i pulumi.IntInput) UsergroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Usergroup { return vs[0].([]*Usergroup)[vs[1].(int)] @@ -371,6 +404,12 @@ func (o UsergroupMapOutput) ToUsergroupMapOutputWithContext(ctx context.Context) return o } +func (o UsergroupMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*Usergroup] { + return pulumix.Output[map[string]*Usergroup]{ + OutputState: o.OutputState, + } +} + func (o UsergroupMapOutput) MapIndex(k pulumi.StringInput) UsergroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Usergroup { return vs[0].(map[string]*Usergroup)[vs[1].(string)] diff --git a/sdk/java/src/main/java/com/pulumi/slack/Conversation.java b/sdk/java/src/main/java/com/pulumi/slack/Conversation.java index b2ff034..19c6993 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/Conversation.java +++ b/sdk/java/src/main/java/com/pulumi/slack/Conversation.java @@ -167,14 +167,22 @@ @ResourceType(type="slack:index/conversation:Conversation") public class Conversation extends com.pulumi.resources.CustomResource { /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ @Export(name="actionOnDestroy", type=String.class, parameters={}) private Output actionOnDestroy; /** - * @return Either of none or archive + * @return indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ public Output> actionOnDestroy() { diff --git a/sdk/java/src/main/java/com/pulumi/slack/ConversationArgs.java b/sdk/java/src/main/java/com/pulumi/slack/ConversationArgs.java index 02f36a8..bf3da28 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/ConversationArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/ConversationArgs.java @@ -18,14 +18,22 @@ public final class ConversationArgs extends com.pulumi.resources.ResourceArgs { public static final ConversationArgs Empty = new ConversationArgs(); /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ @Import(name="actionOnDestroy") private @Nullable Output actionOnDestroy; /** - * @return Either of none or archive + * @return indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ public Optional> actionOnDestroy() { @@ -183,7 +191,11 @@ public Builder(ConversationArgs defaults) { } /** - * @param actionOnDestroy Either of none or archive + * @param actionOnDestroy indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * * @return builder * @@ -194,7 +206,11 @@ public Builder actionOnDestroy(@Nullable Output actionOnDestroy) { } /** - * @param actionOnDestroy Either of none or archive + * @param actionOnDestroy indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/ConversationState.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/ConversationState.java index fbec8fa..2c72ffb 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/ConversationState.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/ConversationState.java @@ -19,14 +19,22 @@ public final class ConversationState extends com.pulumi.resources.ResourceArgs { public static final ConversationState Empty = new ConversationState(); /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ @Import(name="actionOnDestroy") private @Nullable Output actionOnDestroy; /** - * @return Either of none or archive + * @return indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * */ public Optional> actionOnDestroy() { @@ -286,7 +294,11 @@ public Builder(ConversationState defaults) { } /** - * @param actionOnDestroy Either of none or archive + * @param actionOnDestroy indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * * @return builder * @@ -297,7 +309,11 @@ public Builder actionOnDestroy(@Nullable Output actionOnDestroy) { } /** - * @param actionOnDestroy Either of none or archive + * @param actionOnDestroy indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationArgs.java index d9b7ac0..e151c48 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationArgs.java @@ -34,6 +34,9 @@ public Optional> channelId() { /** * The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * */ @Import(name="isPrivate") private @Nullable Output isPrivate; @@ -41,6 +44,9 @@ public Optional> channelId() { /** * @return The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * */ public Optional> isPrivate() { return Optional.ofNullable(this.isPrivate); @@ -111,6 +117,9 @@ public Builder channelId(String channelId) { /** * @param isPrivate The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * * @return builder * */ @@ -122,6 +131,9 @@ public Builder isPrivate(@Nullable Output isPrivate) { /** * @param isPrivate The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationPlainArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationPlainArgs.java index 2402e04..898924d 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetConversationPlainArgs.java @@ -33,6 +33,9 @@ public Optional channelId() { /** * The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * */ @Import(name="isPrivate") private @Nullable Boolean isPrivate; @@ -40,6 +43,9 @@ public Optional channelId() { /** * @return The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * */ public Optional isPrivate() { return Optional.ofNullable(this.isPrivate); @@ -100,6 +106,9 @@ public Builder channelId(@Nullable String channelId) { /** * @param isPrivate The conversation is privileged between two or more members * + * Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + * with `name`. + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserArgs.java index ce549ce..9d6e666 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserArgs.java @@ -18,6 +18,8 @@ public final class GetUserArgs extends com.pulumi.resources.InvokeArgs { /** * The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * */ @Import(name="email") private @Nullable Output email; @@ -25,6 +27,8 @@ public final class GetUserArgs extends com.pulumi.resources.InvokeArgs { /** * @return The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * */ public Optional> email() { return Optional.ofNullable(this.email); @@ -73,6 +77,8 @@ public Builder(GetUserArgs defaults) { /** * @param email The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ @@ -84,6 +90,8 @@ public Builder email(@Nullable Output email) { /** * @param email The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserPlainArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserPlainArgs.java index 831883d..d18a209 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUserPlainArgs.java @@ -17,6 +17,8 @@ public final class GetUserPlainArgs extends com.pulumi.resources.InvokeArgs { /** * The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * */ @Import(name="email") private @Nullable String email; @@ -24,6 +26,8 @@ public final class GetUserPlainArgs extends com.pulumi.resources.InvokeArgs { /** * @return The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * */ public Optional email() { return Optional.ofNullable(this.email); @@ -72,6 +76,8 @@ public Builder(GetUserPlainArgs defaults) { /** * @param email The email of the user * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupArgs.java index 0bb2221..9a0f1c9 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupArgs.java @@ -33,6 +33,8 @@ public Optional> name() { /** * The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * */ @Import(name="usergroupId") private @Nullable Output usergroupId; @@ -40,6 +42,8 @@ public Optional> name() { /** * @return The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * */ public Optional> usergroupId() { return Optional.ofNullable(this.usergroupId); @@ -94,6 +98,8 @@ public Builder name(String name) { /** * @param usergroupId The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ @@ -105,6 +111,8 @@ public Builder usergroupId(@Nullable Output usergroupId) { /** * @param usergroupId The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ diff --git a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupPlainArgs.java b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupPlainArgs.java index a8abf38..aca6080 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/slack/inputs/GetUsergroupPlainArgs.java @@ -32,6 +32,8 @@ public Optional name() { /** * The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * */ @Import(name="usergroupId") private @Nullable String usergroupId; @@ -39,6 +41,8 @@ public Optional name() { /** * @return The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * */ public Optional usergroupId() { return Optional.ofNullable(this.usergroupId); @@ -83,6 +87,8 @@ public Builder name(@Nullable String name) { /** * @param usergroupId The id of the usergroup * + * The data source expects exactly one of these fields, you can't set both. + * * @return builder * */ diff --git a/sdk/nodejs/conversation.ts b/sdk/nodejs/conversation.ts index 2d99cf6..d642279 100644 --- a/sdk/nodejs/conversation.ts +++ b/sdk/nodejs/conversation.ts @@ -122,7 +122,11 @@ export class Conversation extends pulumi.CustomResource { } /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. */ public readonly actionOnDestroy!: pulumi.Output; /** @@ -244,7 +248,11 @@ export class Conversation extends pulumi.CustomResource { */ export interface ConversationState { /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. */ actionOnDestroy?: pulumi.Input; /** @@ -313,7 +321,11 @@ export interface ConversationState { */ export interface ConversationArgs { /** - * Either of none or archive + * indicates whether the + * conversation should be archived or left behind on destroy. Valid values are + * `archive | none`. Note that when set to `none` the conversation will be left + * as it is and as a result any subsequent runs of pulumi up with the same + * name will fail. */ actionOnDestroy?: pulumi.Input; /** diff --git a/sdk/nodejs/getConversation.ts b/sdk/nodejs/getConversation.ts index 0d109f6..1c17740 100644 --- a/sdk/nodejs/getConversation.ts +++ b/sdk/nodejs/getConversation.ts @@ -58,6 +58,9 @@ export interface GetConversationArgs { channelId?: string; /** * The conversation is privileged between two or more members + * + * Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction + * with `name`. */ isPrivate?: boolean; /** @@ -170,6 +173,9 @@ export interface GetConversationOutputArgs { channelId?: pulumi.Input; /** * The conversation is privileged between two or more members + * + * Either `channelId` or `name` must be provided. `isPrivate` only works in conjunction + * with `name`. */ isPrivate?: pulumi.Input; /** diff --git a/sdk/nodejs/getUser.ts b/sdk/nodejs/getUser.ts index 7b37798..d3b5110 100644 --- a/sdk/nodejs/getUser.ts +++ b/sdk/nodejs/getUser.ts @@ -53,6 +53,8 @@ export function getUser(args?: GetUserArgs, opts?: pulumi.InvokeOptions): Promis export interface GetUserArgs { /** * The email of the user + * + * The data source expects exactly one of these fields, you can't set both. */ email?: string; /** @@ -115,6 +117,8 @@ export function getUserOutput(args?: GetUserOutputArgs, opts?: pulumi.InvokeOpti export interface GetUserOutputArgs { /** * The email of the user + * + * The data source expects exactly one of these fields, you can't set both. */ email?: pulumi.Input; /** diff --git a/sdk/nodejs/getUsergroup.ts b/sdk/nodejs/getUsergroup.ts index 868db3a..2d7f812 100644 --- a/sdk/nodejs/getUsergroup.ts +++ b/sdk/nodejs/getUsergroup.ts @@ -55,6 +55,8 @@ export interface GetUsergroupArgs { name?: string; /** * The id of the usergroup + * + * The data source expects exactly one of these fields, you can't set both. */ usergroupId?: string; } @@ -132,6 +134,8 @@ export interface GetUsergroupOutputArgs { name?: pulumi.Input; /** * The id of the usergroup + * + * The data source expects exactly one of these fields, you can't set both. */ usergroupId?: pulumi.Input; } diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 7baf7b2..02fd2af 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -11,8 +11,7 @@ "repository": "https://github.com/pulumi/pulumi-slack", "license": "Apache-2.0", "scripts": { - "build": "tsc", - "install": "node scripts/install-pulumi-plugin.js resource slack ${VERSION}" + "build": "tsc" }, "dependencies": { "@pulumi/pulumi": "^3.0.0" diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index ebd044c..4025812 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -22,7 +22,7 @@ export class Provider extends pulumi.ProviderResource { if (obj === undefined || obj === null) { return false; } - return obj['__pulumiType'] === Provider.__pulumiType; + return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; } /** diff --git a/sdk/nodejs/scripts/install-pulumi-plugin.js b/sdk/nodejs/scripts/install-pulumi-plugin.js deleted file mode 100644 index fefc6e0..0000000 --- a/sdk/nodejs/scripts/install-pulumi-plugin.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var childProcess = require("child_process"); - -var args = process.argv.slice(2); - -if (args.indexOf("${VERSION}") !== -1) { - process.exit(0); -} - -var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), { - stdio: ["ignore", "inherit", "inherit"] -}); - -if (res.error && res.error.code === "ENOENT") { - console.error("\nThere was an error installing the resource provider plugin. " + - "It looks like `pulumi` is not installed on your system. " + - "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" + - "You may try manually installing the plugin by running " + - "`pulumi plugin install " + args.join(" ") + "`"); -} else if (res.error || res.status !== 0) { - console.error("\nThere was an error installing the resource provider plugin. " + - "You may try to manually installing the plugin by running " + - "`pulumi plugin install " + args.join(" ") + "`"); -} - -process.exit(0); diff --git a/sdk/python/pulumi_slack/conversation.py b/sdk/python/pulumi_slack/conversation.py index c23f9be..57e473c 100644 --- a/sdk/python/pulumi_slack/conversation.py +++ b/sdk/python/pulumi_slack/conversation.py @@ -26,7 +26,11 @@ def __init__(__self__, *, """ The set of arguments for constructing a Conversation resource. :param pulumi.Input[bool] is_private: create a private channel instead of a public one. - :param pulumi.Input[str] action_on_destroy: Either of none or archive + :param pulumi.Input[str] action_on_destroy: indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. :param pulumi.Input[str] action_on_update_permanent_members: indicate whether the members should be kick of the channel when removed from `permanent_members`. When set to `none` the user are never kicked, this prevent @@ -71,7 +75,11 @@ def is_private(self, value: pulumi.Input[bool]): @pulumi.getter(name="actionOnDestroy") def action_on_destroy(self) -> Optional[pulumi.Input[str]]: """ - Either of none or archive + indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. """ return pulumi.get(self, "action_on_destroy") @@ -184,7 +192,11 @@ def __init__(__self__, *, topic: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Conversation resources. - :param pulumi.Input[str] action_on_destroy: Either of none or archive + :param pulumi.Input[str] action_on_destroy: indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. :param pulumi.Input[str] action_on_update_permanent_members: indicate whether the members should be kick of the channel when removed from `permanent_members`. When set to `none` the user are never kicked, this prevent @@ -240,7 +252,11 @@ def __init__(__self__, *, @pulumi.getter(name="actionOnDestroy") def action_on_destroy(self) -> Optional[pulumi.Input[str]]: """ - Either of none or archive + indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. """ return pulumi.get(self, "action_on_destroy") @@ -523,7 +539,11 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] action_on_destroy: Either of none or archive + :param pulumi.Input[str] action_on_destroy: indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. :param pulumi.Input[str] action_on_update_permanent_members: indicate whether the members should be kick of the channel when removed from `permanent_members`. When set to `none` the user are never kicked, this prevent @@ -709,7 +729,11 @@ def get(resource_name: str, :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] action_on_destroy: Either of none or archive + :param pulumi.Input[str] action_on_destroy: indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. :param pulumi.Input[str] action_on_update_permanent_members: indicate whether the members should be kick of the channel when removed from `permanent_members`. When set to `none` the user are never kicked, this prevent @@ -755,7 +779,11 @@ def get(resource_name: str, @pulumi.getter(name="actionOnDestroy") def action_on_destroy(self) -> pulumi.Output[Optional[str]]: """ - Either of none or archive + indicates whether the + conversation should be archived or left behind on destroy. Valid values are + `archive | none`. Note that when set to `none` the conversation will be left + as it is and as a result any subsequent runs of pulumi up with the same + name will fail. """ return pulumi.get(self, "action_on_destroy") diff --git a/sdk/python/pulumi_slack/get_conversation.py b/sdk/python/pulumi_slack/get_conversation.py index 3e6a698..52a1184 100644 --- a/sdk/python/pulumi_slack/get_conversation.py +++ b/sdk/python/pulumi_slack/get_conversation.py @@ -224,6 +224,9 @@ def get_conversation(channel_id: Optional[str] = None, :param str channel_id: The ID of the channel :param bool is_private: The conversation is privileged between two or more members + + Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + with `name`. :param str name: The name of the public or private channel """ __args__ = dict() @@ -234,19 +237,19 @@ def get_conversation(channel_id: Optional[str] = None, __ret__ = pulumi.runtime.invoke('slack:index/getConversation:getConversation', __args__, opts=opts, typ=GetConversationResult).value return AwaitableGetConversationResult( - channel_id=__ret__.channel_id, - created=__ret__.created, - creator=__ret__.creator, - id=__ret__.id, - is_archived=__ret__.is_archived, - is_ext_shared=__ret__.is_ext_shared, - is_general=__ret__.is_general, - is_org_shared=__ret__.is_org_shared, - is_private=__ret__.is_private, - is_shared=__ret__.is_shared, - name=__ret__.name, - purpose=__ret__.purpose, - topic=__ret__.topic) + channel_id=pulumi.get(__ret__, 'channel_id'), + created=pulumi.get(__ret__, 'created'), + creator=pulumi.get(__ret__, 'creator'), + id=pulumi.get(__ret__, 'id'), + is_archived=pulumi.get(__ret__, 'is_archived'), + is_ext_shared=pulumi.get(__ret__, 'is_ext_shared'), + is_general=pulumi.get(__ret__, 'is_general'), + is_org_shared=pulumi.get(__ret__, 'is_org_shared'), + is_private=pulumi.get(__ret__, 'is_private'), + is_shared=pulumi.get(__ret__, 'is_shared'), + name=pulumi.get(__ret__, 'name'), + purpose=pulumi.get(__ret__, 'purpose'), + topic=pulumi.get(__ret__, 'topic')) @_utilities.lift_output_func(get_conversation) @@ -286,6 +289,9 @@ def get_conversation_output(channel_id: Optional[pulumi.Input[Optional[str]]] = :param str channel_id: The ID of the channel :param bool is_private: The conversation is privileged between two or more members + + Either `channel_id` or `name` must be provided. `is_private` only works in conjunction + with `name`. :param str name: The name of the public or private channel """ ... diff --git a/sdk/python/pulumi_slack/get_user.py b/sdk/python/pulumi_slack/get_user.py index bf7538f..96498af 100644 --- a/sdk/python/pulumi_slack/get_user.py +++ b/sdk/python/pulumi_slack/get_user.py @@ -96,6 +96,8 @@ def get_user(email: Optional[str] = None, :param str email: The email of the user + + The data source expects exactly one of these fields, you can't set both. :param str name: The name of the user """ __args__ = dict() @@ -105,9 +107,9 @@ def get_user(email: Optional[str] = None, __ret__ = pulumi.runtime.invoke('slack:index/getUser:getUser', __args__, opts=opts, typ=GetUserResult).value return AwaitableGetUserResult( - email=__ret__.email, - id=__ret__.id, - name=__ret__.name) + email=pulumi.get(__ret__, 'email'), + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name')) @_utilities.lift_output_func(get_user) @@ -145,6 +147,8 @@ def get_user_output(email: Optional[pulumi.Input[Optional[str]]] = None, :param str email: The email of the user + + The data source expects exactly one of these fields, you can't set both. :param str name: The name of the user """ ... diff --git a/sdk/python/pulumi_slack/get_usergroup.py b/sdk/python/pulumi_slack/get_usergroup.py index fd17987..e4c548b 100644 --- a/sdk/python/pulumi_slack/get_usergroup.py +++ b/sdk/python/pulumi_slack/get_usergroup.py @@ -144,6 +144,8 @@ def get_usergroup(name: Optional[str] = None, :param str name: The name of the usergroup :param str usergroup_id: The id of the usergroup + + The data source expects exactly one of these fields, you can't set both. """ __args__ = dict() __args__['name'] = name @@ -152,13 +154,13 @@ def get_usergroup(name: Optional[str] = None, __ret__ = pulumi.runtime.invoke('slack:index/getUsergroup:getUsergroup', __args__, opts=opts, typ=GetUsergroupResult).value return AwaitableGetUsergroupResult( - channels=__ret__.channels, - description=__ret__.description, - handle=__ret__.handle, - id=__ret__.id, - name=__ret__.name, - usergroup_id=__ret__.usergroup_id, - users=__ret__.users) + channels=pulumi.get(__ret__, 'channels'), + description=pulumi.get(__ret__, 'description'), + handle=pulumi.get(__ret__, 'handle'), + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + usergroup_id=pulumi.get(__ret__, 'usergroup_id'), + users=pulumi.get(__ret__, 'users')) @_utilities.lift_output_func(get_usergroup) @@ -195,5 +197,7 @@ def get_usergroup_output(name: Optional[pulumi.Input[Optional[str]]] = None, :param str name: The name of the usergroup :param str usergroup_id: The id of the usergroup + + The data source expects exactly one of these fields, you can't set both. """ ... diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 2431387..0d84482 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', 'slack', PLUGIN_VERSION]) - except OSError as error: - if error.errno == errno.ENOENT: - print(f""" - There was an error installing the slack 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 slack {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 managing Slack workspaces.", long_description=readme(), long_description_content_type='text/markdown', - cmdclass={ - 'install': InstallPluginCommand, - }, keywords='pulumi slack category/utility', url='https://www.pulumi.com', project_urls={