Skip to content

[datadog_csm_threats] supporting cws multi-policy in terraform #2681

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

Merged
merged 15 commits into from
Jun 10, 2025

Conversation

homoeconomics
Copy link
Contributor

@homoeconomics homoeconomics commented Nov 15, 2024

Adding new resources and data sources to support the CWS multi-policy feature.

  1. Updated the data source and resource datadog_csm_threats_agent_rule for users to manage their rules
  2. Added a new data source resource datadog_csm_threats_policy for users to manage their policies.
  • Create a policy resource:
resource "datadog_csm_threats_policy" "my_policy" {
    description  = "my terraform policy"
    enabled      = false
    name         = "TERRAFORM POLICY"
    tags         = ["env:staging"]
}
  • Create a multi policy agent rule resource:
resource "datadog_csm_threats_agent_rule" "my_rule" {
    description  = "my terraform rule"
    enabled      = false
    expression   = "bind.addr.ip==1.1.1.1"
    name         = "TERRAFORM_RULE"
    policy_id    = datadog_csm_threats_policy.my_policy.id
    product_tags = ["foo:bar"]
}

TBD: record tests

@homoeconomics homoeconomics force-pushed the daniel.zhou/CWS-3394-tf-provider branch from 6322019 to 5da3fb7 Compare November 15, 2024 20:48
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch 2 times, most recently from bf4b1af to 4c19fd8 Compare February 14, 2025 13:25
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch from a390790 to 6fc7905 Compare February 27, 2025 13:04
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch 2 times, most recently from f715a3a to 595f718 Compare February 28, 2025 16:56
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch 2 times, most recently from 8c3f3f3 to 1d306ae Compare March 28, 2025 15:36
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch from 2c6ae21 to 37ea69b Compare April 3, 2025 12:09
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch 4 times, most recently from 84f08b8 to b528f99 Compare May 15, 2025 08:25
@QuentinGuillard QuentinGuillard marked this pull request as ready for review May 15, 2025 08:56
@QuentinGuillard QuentinGuillard requested review from a team as code owners May 15, 2025 08:56
@QuentinGuillard QuentinGuillard changed the title supporting cws multi-policy in terraform [CWS - Workload Protection] supporting cws multi-policy in terraform May 15, 2025
@QuentinGuillard QuentinGuillard changed the title [CWS - Workload Protection] supporting cws multi-policy in terraform [CWS] supporting cws multi-policy in terraform May 15, 2025
@QuentinGuillard QuentinGuillard changed the title [CWS] supporting cws multi-policy in terraform [datadog_csm_threats] supporting cws multi-policy in terraform May 15, 2025
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch 3 times, most recently from 8db7937 to b7c98ce Compare June 2, 2025 13:25
@QuentinGuillard QuentinGuillard force-pushed the daniel.zhou/CWS-3394-tf-provider branch from b7c98ce to 33be267 Compare June 4, 2025 07:28
Copy link
Member

@armcburney armcburney left a comment

Choose a reason for hiding this comment

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

The code LGTM!

@QuentinGuillard
Copy link
Contributor

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 10, 2025

View all feedbacks in Devflow UI.

2025-06-10 12:13:00 UTC ℹ️ Start processing command /merge


2025-06-10 12:13:07 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 27m (p90).


2025-06-10 12:38:40 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit bdc1194 into master Jun 10, 2025
18 checks passed
@dd-mergequeue dd-mergequeue bot deleted the daniel.zhou/CWS-3394-tf-provider branch June 10, 2025 12:38
shaneyuandd pushed a commit that referenced this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants