Skip to content

Commit 050f2bc

Browse files
author
Ben Lucas
authored
docs(policies): update docs to provide better examples (#376)
* update docs to provide better examples for providing notification channels * correction to reference the id property
1 parent f118c34 commit 050f2bc

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

website/docs/r/secure_custom_policy.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Creates a Sysdig Secure Custom Policy.
1515
## Example Usage
1616

1717
```terraform
18+
data "sysdig_secure_notification_channel" "email_notification_channel" {
19+
name = "Test Email Channel"
20+
}
21+
1822
resource "sysdig_secure_custom_policy" "write_apt_database" {
1923
name = "Write apt database"
2024
description = "an attempt to write to the dpkg database by any non-dpkg related program"
@@ -40,8 +44,7 @@ resource "sysdig_secure_custom_policy" "write_apt_database" {
4044
}
4145
}
4246
43-
notification_channels = [10000]
44-
47+
notification_channels = [data.sysdig_secure_notification_channel.email_notification_channel.id]
4548
}
4649
```
4750

website/docs/r/secure_managed_policy.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ allows you to identify and configure a managed policy. The managed policy is loo
1818
## Example Usage
1919

2020
```terraform
21+
data "sysdig_secure_notification_channel" "email_notification_channel" {
22+
name = "Test Email Channel"
23+
}
24+
2125
resource "sysdig_secure_managed_policy" "sysdig_runtime_threat_detection" {
2226
name = "Sysdig Runtime Threat Detection"
2327
type = "falco"
@@ -38,7 +42,7 @@ resource "sysdig_secure_managed_policy" "sysdig_runtime_threat_detection" {
3842
}
3943
}
4044
41-
notification_channels = [10000]
45+
notification_channels = [data.sysdig_secure_notification_channel.email_notification_channel.id]
4246
}
4347
```
4448

website/docs/r/secure_managed_ruleset.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Creates a Sysdig Secure Managed Ruleset
1515
## Example Usage
1616

1717
```terraform
18+
data "sysdig_secure_notification_channel" "email_notification_channel" {
19+
name = "Test Email Channel"
20+
}
21+
1822
resource "sysdig_secure_managed_ruleset" "sysdig_runtime_threat_detection_managed_ruleset" {
1923
name = "Sysdig Runtime Threat Detection - Managed Ruleset"
2024
description = "Managed ruleset for Sysdig Runtime Threat Detection"
@@ -40,7 +44,7 @@ resource "sysdig_secure_managed_ruleset" "sysdig_runtime_threat_detection_manage
4044
}
4145
}
4246
43-
notification_channels = [10000]
47+
notification_channels = [data.sysdig_secure_notification_channel.email_notification_channel.id]
4448
}
4549
```
4650

website/docs/r/secure_policy.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ of policy.
1919
## Example Usage
2020

2121
```terraform
22+
data "sysdig_secure_notification_channel" "email_notification_channel" {
23+
name = "Test Email Channel"
24+
}
25+
2226
resource "sysdig_secure_policy" "write_apt_database" {
2327
name = "Write apt database"
2428
description = "an attempt to write to the dpkg database by any non-dpkg related program"
@@ -40,8 +44,7 @@ resource "sysdig_secure_policy" "write_apt_database" {
4044
}
4145
}
4246
43-
notification_channels = [10000]
44-
47+
notification_channels = [data.sysdig_secure_notification_channel.email_notification_channel.id]
4548
}
4649
```
4750

0 commit comments

Comments
 (0)