Skip to content

Commit 8f0daa7

Browse files
committed
address comments
1 parent 7bf6b77 commit 8f0daa7

10 files changed

+14
-19
lines changed

sysdig/data_source_sysdig_monitor_notification_channel_slack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func dataSourceSysdigMonitorNotificationChannelSlack() *schema.Resource {
2929
Type: schema.TypeString,
3030
Computed: true,
3131
},
32-
"private_channel": {
32+
"is_private_channel": {
3333
Type: schema.TypeBool,
3434
Computed: true,
3535
},

sysdig/data_source_sysdig_secure_notification_channel_slack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func dataSourceSysdigSecureNotificationChannelSlack() *schema.Resource {
2929
Type: schema.TypeString,
3030
Computed: true,
3131
},
32-
"private_channel": {
32+
"is_private_channel": {
3333
Type: schema.TypeBool,
3434
Computed: true,
3535
},

sysdig/resource_sysdig_monitor_notification_channel_slack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func resourceSysdigMonitorNotificationChannelSlack() *schema.Resource {
4040
Type: schema.TypeString,
4141
Required: true,
4242
},
43-
"private_channel": {
43+
"is_private_channel": {
4444
Type: schema.TypeBool,
4545
Optional: true,
4646
Default: false,
@@ -204,7 +204,7 @@ func monitorNotificationChannelSlackFromResourceData(d *schema.ResourceData, tea
204204
nc.Type = NOTIFICATION_CHANNEL_TYPE_SLACK
205205
nc.Options.Url = d.Get("url").(string)
206206
nc.Options.Channel = d.Get("channel").(string)
207-
nc.Options.PrivateChannel = d.Get("private_channel").(bool)
207+
nc.Options.PrivateChannel = d.Get("is_private_channel").(bool)
208208
nc.Options.PrivateChannelUrl = d.Get("private_channel_url").(string)
209209
nc.Options.TemplateConfiguration = []v2.NotificationChannelTemplateConfiguration{
210210
{
@@ -257,7 +257,7 @@ func monitorNotificationChannelSlackToResourceData(nc *v2.NotificationChannel, d
257257

258258
_ = d.Set("url", nc.Options.Url)
259259
_ = d.Set("channel", nc.Options.Channel)
260-
_ = d.Set("private_channel", nc.Options.PrivateChannel)
260+
_ = d.Set("is_private_channel", nc.Options.PrivateChannel)
261261
_ = d.Set("private_channel_url", nc.Options.PrivateChannelUrl)
262262

263263
runbookLinks := true

sysdig/resource_sysdig_monitor_notification_channel_slack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ resource "sysdig_monitor_notification_channel_slack" "sample-slack-private" {
106106
enabled = true
107107
url = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
108108
channel = "#sysdig"
109-
private_channel = true
109+
is_private_channel = true
110110
private_channel_url = "https://app.slack.com/client/XXXXXXXX/XXXXXXXX"
111111
}`, name)
112112
}

sysdig/resource_sysdig_secure_notification_channel_slack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func resourceSysdigSecureNotificationChannelSlack() *schema.Resource {
4141
Type: schema.TypeString,
4242
Required: true,
4343
},
44-
"private_channel": {
44+
"is_private_channel": {
4545
Type: schema.TypeBool,
4646
Optional: true,
4747
Default: false,
@@ -174,7 +174,7 @@ func secureNotificationChannelSlackFromResourceData(d *schema.ResourceData, team
174174
nc.Type = NOTIFICATION_CHANNEL_TYPE_SLACK
175175
nc.Options.Url = d.Get("url").(string)
176176
nc.Options.Channel = d.Get("channel").(string)
177-
nc.Options.PrivateChannel = d.Get("private_channel").(bool)
177+
nc.Options.PrivateChannel = d.Get("is_private_channel").(bool)
178178
nc.Options.PrivateChannelUrl = d.Get("private_channel_url").(string)
179179

180180
setNotificationChannelSlackTemplateConfig(&nc, d)
@@ -221,7 +221,7 @@ func secureNotificationChannelSlackToResourceData(nc *v2.NotificationChannel, d
221221

222222
_ = d.Set("url", nc.Options.Url)
223223
_ = d.Set("channel", nc.Options.Channel)
224-
_ = d.Set("private_channel", nc.Options.PrivateChannel)
224+
_ = d.Set("is_private_channel", nc.Options.PrivateChannel)
225225
_ = d.Set("private_channel_url", nc.Options.PrivateChannelUrl)
226226

227227
err = getTemplateVersionFromNotificationChannelSlack(nc, d)

sysdig/resource_sysdig_secure_notification_channel_slack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ resource "sysdig_secure_notification_channel_slack" "sample-slack-private" {
105105
enabled = true
106106
url = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
107107
channel = "#sysdig"
108-
private_channel = true
108+
is_private_channel = true
109109
private_channel_url = "https://app.slack.com/client/XXXXXXXX/XXXXXXXX"
110110
}`, name)
111111
}

website/docs/d/monitor_notification_channel_slack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In addition to all arguments above, the following attributes are exported:
3131
* `id` - The Notification Channel ID.
3232
* `url` - URL of the Slack webhook.
3333
* `channel` - Name of the Slack channel.
34-
* `private_channel` - Whether the Slack Channel has been marked as private or not.
34+
* `is_private_channel` - Whether the Slack Channel has been marked as private or not.
3535
* `private_channel_url` - The channel URL, i.e. the link that is referencing the channel (not to be confused with the webhook url), if the channel is private.
3636
* `show_section_runbook_links` - Whether to include the runbook links section in the Slack messages.
3737
* `show_section_event_details` - Whether to include the event details section in the Slack messages.

website/docs/d/secure_notification_channel_slack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In addition to all arguments above, the following attributes are exported:
3131
* `id` - The Notification Channel ID.
3232
* `url` - URL of the Slack webhook.
3333
* `channel` - Name of the Slack channel.
34-
* `private_channel` - Whether the Slack Channel has been marked as private or not.
34+
* `is_private_channel` - Whether the Slack Channel has been marked as private or not.
3535
* `private_channel_url` - The channel URL, i.e. the link that is referencing the channel (not to be confused with the webhook url), if the channel is private.
3636
* `template_version` - The notification template version to use to create notifications.
3737
* `enabled` - Whether the Notification Channel is active or not.

website/docs/r/monitor_notification_channel_slack.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,10 @@ resource "sysdig_monitor_notification_channel_slack" "sample-slack" {
4848

4949
* `channel` - (Required) Name of the Slack channel. **NOTE**: If the channel is private this field cannot be changed after creation.
5050

51-
* `private_channel` - (Optional, Forces new resource) If true, the Slack channel name will be visible only to the user that created this notification channel. Default: false.
51+
* `is_private_channel` - (Optional, Forces new resource) If true, the Slack channel name will be visible only to the user that created this notification channel. Default: false.
5252

5353
* `private_channel_url` - (Optional, Forces new resource) The channel URL, i.e. the link that is referencing the channel (not to be confused with the webhook url). Can be set only if the channel is private.
5454

55-
* `is_private_channel` - (Optional) Whether the Slack channel is private or not.
56-
57-
* `private_channel_url` - (Optional) The channel URL, if channel is private.
58-
59-
6055
* `enabled` - (Optional) If false, the channel will not emit notifications. Default is true.
6156

6257
* `notify_when_ok` - (Optional) Send a new notification when the alert condition is

website/docs/r/secure_notification_channel_slack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resource "sysdig_secure_notification_channel_slack" "sample-slack" {
3535

3636
* `channel` - (Required) Name of the Slack channel. **NOTE**: If the channel is private this field cannot be changed after creation.
3737

38-
* `private_channel` - (Optional, Forces new resource) If true, the Slack channel name will be visible only to the user that created this notification channel. Default: false.
38+
* `is_private_channel` - (Optional, Forces new resource) If true, the Slack channel name will be visible only to the user that created this notification channel. Default: false.
3939

4040
* `private_channel_url` - (Optional, Forces new resource) The channel URL, i.e. the link that is referencing the channel (not to be confused with the webhook url). Can be set only if the channel is private.
4141

0 commit comments

Comments
 (0)