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

why does datadog_logs_pipeline_order require name? #2666

Open
dhduvall opened this issue Nov 12, 2024 · 0 comments
Open

why does datadog_logs_pipeline_order require name? #2666

dhduvall opened this issue Nov 12, 2024 · 0 comments

Comments

@dhduvall
Copy link

The name attribute in a datadog_logs_pipeline_order resource is required, even though it doesn't exist as part of the object returned by the API. The doc string for the attribute even says so itself! A freshly imported resource immediately requires being changed, which, while harmless as far as I can tell, is a red herring, and could very well lead someone to spend a whole bunch of time trying to figure out what's going on.

What's the purpose of this attribute?

resource "datadog_logs_pipeline_order" "pipeline-order" {
  name = "logs-pipeline-order"
  pipelines = [
    datadog_logs_custom_pipeline.one.id,
    datadog_logs_integration_pipeline.python.id,
    datadog_logs_custom_pipeline.two.id,
  ]
}
$ curl -X GET -H "DD-API-KEY: $DD_API_KEY" -H "DD-APPLICATION-KEY: $DD_APP_KEY" https://api.datadoghq.com/api/v1/logs/config/pipeline-order | jq
{
  "pipeline_ids": [
    "53E4i5QvRCispIKqAcMouQ",
    "b8SxsNzwQ1-RKfAQNFy4cQ",
    "LZgoIzHdS8a7uhH5kDPksA"
  ]
}
$ tofu apply
...
  # datadog_logs_pipeline_order.pipeline-order will be updated in-place
  ~ resource "datadog_logs_pipeline_order" "pipeline-order" {
        id        = "logs-pipeline-order"
      + name      = "logs-pipeline-order"
        # (1 unchanged attribute hidden)
    }
$ curl -X GET -H "DD-API-KEY: $DD_API_KEY" -H "DD-APPLICATION-KEY: $DD_APP_KEY" https://api.datadoghq.com/api/v1/logs/config/pipeline-order | jq
{
  "pipeline_ids": [
    "53E4i5QvRCispIKqAcMouQ",
    "b8SxsNzwQ1-RKfAQNFy4cQ",
    "LZgoIzHdS8a7uhH5kDPksA"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant