Skip to content

Commit

Permalink
Merge pull request #45 from rlmartin/usergroup-channels-fix
Browse files Browse the repository at this point in the history
Pull in slack_usergroup_channels.channels from both channels and groups
  • Loading branch information
jmatsu authored Jun 17, 2021
2 parents fbbf9e3 + 7be3369 commit 9e4ecfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slack/resource_usergroup_channels.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func resourceSlackUserGroupChannels() *schema.Resource {
Required: true,
},
"channels": {
Type: schema.TypeList,
Type: schema.TypeSet,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Expand All @@ -40,7 +40,7 @@ func resourceSlackUserGroupChannels() *schema.Resource {

func configureSlackUserGroupChannels(d *schema.ResourceData, userGroup slack.UserGroup) {
d.SetId(userGroup.ID)
_ = d.Set("channels", userGroup.Prefs.Channels)
_ = d.Set("channels", append(userGroup.Prefs.Channels, userGroup.Prefs.Groups...))
}

func resourceSlackUserGroupChannelsCreate(d *schema.ResourceData, meta interface{}) error {
Expand Down

0 comments on commit 9e4ecfb

Please sign in to comment.