Skip to content

if you disable the daily limit through the console, it does not re-enable on subsequent plan or applies #3014

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

Open
deroine opened this issue May 19, 2025 · 0 comments

Comments

@deroine
Copy link

deroine commented May 19, 2025

Datadog Terraform Provider Version

3.62.0

Terraform Version

v1.6.5

What resources or data sources are affected?

datadog_logs_index

Terraform Configuration Files

resource "datadog_logs_index" "main" {
  name = "main"

  // 200m for prod, 1m for dev + stage
  daily_limit = terraform.workspace == "prod" ? 200000000 : 1000000

  //including example filters we run in case it is meaningful to the bug. 
  filter {
    query = terraform.workspace == "prod" ? "*" : "XXXXXXXXXXXXXXXXX"
  }
  exclusion_filter {
    is_enabled = true
    name       = "Filter example"

    filter {
      query       = "service:XXXXXX @@message:\"XXXXXXXXXXXX\""
      sample_rate = 1
    }
  }
}

Relevant debug or panic output

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # datadog_logs_index.main will be updated in-place
  ~ resource "datadog_logs_index" "main" {
        id                                       = "main"
        name                                     = "main"
        # (5 unchanged attributes hidden)

      ~ filter {
          // this update in our case is a `-` -> `!` change in the query. 
          ~ query = "XXXXXXXXXXXXXXXXX" -> "XXXXXXXXXXXXXXXXX"
        }

        # (4 unchanged blocks hidden)
    }

Expected Behavior

I would expect that the disable_daily_limit to be set back to false based on the documentation:

If false or omitted, the index's current daily_limit is maintained.

If we set it to false it behaves as expected, it is just an issue when omitted which documentation seems to indicate it should be the same behavior.

Actual Behavior

The plan/apply does not set the disable_daily_limit to be false, it does nothing.

Steps to Reproduce

  1. create an log_index with daily limit in terraform
  2. log into the datadog console
  3. disable the daily limit
  4. re-plan the log_index, observe it does not re-enable the daily limit

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants