Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs and example for security monitoring default rule #1246

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func resourceDatadogSecurityMonitoringDefaultRule() *schema.Resource {
return &schema.Resource{
Description: "Provides a Datadog Security Monitoring Rule API resource for default rules.",
Description: "Provides a Datadog Security Monitoring Rule API resource for default rules. It can only be imported, you can't create a default rule.",
CreateContext: resourceDatadogSecurityMonitoringDefaultRuleCreate,
ReadContext: resourceDatadogSecurityMonitoringDefaultRuleRead,
UpdateContext: resourceDatadogSecurityMonitoringDefaultRuleUpdate,
Expand Down
3 changes: 1 addition & 2 deletions docs/resources/security_monitoring_default_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ description: |-

# datadog_security_monitoring_default_rule (Resource)

Provides a Datadog Security Monitoring Rule API resource for default rules.
Provides a Datadog Security Monitoring Rule API resource for default rules. It can only be imported, you can't create a default rule.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "it can only be imported"?
Also one note, I would write
you can only enable/disable a default rules and change it's notifications and it's filters (might be double checked by documentation thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it doesn't fit in the regular terraform workflow, as if you try to create the resource it will fail.


## Example Usage

```terraform
resource "datadog_security_monitoring_default_rule" "adefaultrule" {
rule_id = "ojo-qef-3g3"
enabled = true

# Change the notifications for the high case
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "datadog_security_monitoring_default_rule" "adefaultrule" {
rule_id = "ojo-qef-3g3"
enabled = true

# Change the notifications for the high case
Expand Down