Skip to content

[datadog_tag_pipeline_ruleset] Add if_tag_exists feature to Cloud Cost tag pipelines and deprecate if_not_exists field#3500

Open
ashleyyip wants to merge 4 commits intomasterfrom
ashley.yip/terraform-update-tag-pipelines-new-field
Open

[datadog_tag_pipeline_ruleset] Add if_tag_exists feature to Cloud Cost tag pipelines and deprecate if_not_exists field#3500
ashleyyip wants to merge 4 commits intomasterfrom
ashley.yip/terraform-update-tag-pipelines-new-field

Conversation

@ashleyyip
Copy link

@ashleyyip ashleyyip commented Feb 5, 2026

Motivation

In CCM's Tag Pipelines product we have a new field in the API if_tag_exists (which accepts 3 string options append, replace, do_not_apply) to replace the existing if_not_exists boolean.

Changes

This PR updates the relevant resource (tagPipelineRulesetResource) and data source (tagPipelineRulesetDataSource ) to support this new field and deprecate the old field. This change applies to all rule types supported in Tag Pipelines:

  • Mapping Rules
  • Query Rules
  • Reference Table Rules

Tests were updated to reference the old field:

  • data_source_datadog_tag_pipeline_ruleset_test.go
  • resource_datadog_tag_pipeline_rulesets_test.go
  • resource_datadog_tag_pipeline_ruleset_test.go (I also left existing tests referencing the deprecated field to test backwards compatibility)

Docs and examples are updated to reflect the new if_tag_exists field, as well as adding a deprecation message to if_not_exists.

@ashleyyip ashleyyip force-pushed the ashley.yip/terraform-update-tag-pipelines-new-field branch from dbf5c9f to 6d45276 Compare February 5, 2026 19:23
@ashleyyip ashleyyip marked this pull request as ready for review February 5, 2026 20:44
@ashleyyip ashleyyip requested review from a team as code owners February 5, 2026 20:44
@drichards-87 drichards-87 self-assigned this Feb 5, 2026
@drichards-87 drichards-87 removed their assignment Feb 5, 2026
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.

2 participants