Skip to content

Conversation

@alextmeyer
Copy link
Contributor

@alextmeyer alextmeyer commented Oct 30, 2025

Terraform should see an expected ruleset doesn't exist and recreate them

Previous behavior:

│ Error: Error reading ruleset
│ 
│   with datadog_tag_pipeline_ruleset.<ruleset_name>,
│   on XXXX.tf line XXXX, in resource "datadog_tag_pipeline_ruleset" "<ruleset_name>":
│ 1254: resource "datadog_tag_pipeline_ruleset" "<ruleset_name>" {
│ 
│ an error occurred from /api/v2/tags/enrichment/<deleted id>: 404 Not Found: {"errors":[{"status":"404","title":"Not Found","detail":"ruleset <deleted id> not
│ found"}]}
╵

Rather than erroring, apply now shows:

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan:

  # datadog_tag_pipeline_ruleset.tag_pipeline_ruleset_test_ruleset_name_48d98775_8272_4fb6_81c6_643a6e810f5d has been deleted
  - resource "datadog_tag_pipeline_ruleset" "<ruleset_name>" {
      - id       = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -> null
        name     = "<ruleset name>"
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Terraform then also will recreate the resource and update any references in the datadog_tag_pipeline_rulesets order resource on creation

…rulesets deleted via the UI that are managed in tfstate - should see they don't exist and recreate them
@alextmeyer
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Oct 30, 2025

View all feedbacks in Devflow UI.

2025-10-30 20:48:27 UTC ℹ️ Start processing command /merge


2025-10-30 20:48:36 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-10-30 20:49:21 UTC ℹ️ MergeQueue: merge request added to the queue

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


2025-10-30 21:16:46 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit c54fb4c into master Oct 30, 2025
16 of 18 checks passed
@dd-mergequeue dd-mergequeue bot deleted the alex.meyer/datadog-tag-pipeline-ruleset-deleted-via-ui branch October 30, 2025 21:16
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.

5 participants