Comments (4)
Try using something like the following:
dynamic "variables" {
for_each = each.value.variables_name != null ? [1] : []
content {
event_query {
name = each.value.variables_name
data_source = each.value.data_source
search {
query = each.value.search_query
}
compute {
aggregation = each.value.aggregation
}
}
}
}
instead of explicitly defining the variables block. This dynamic block will omit the variables block if each.value.variables_name
is null.
from terraform-provider-datadog.
Sorry, but this is working as expected. We don't plan on silently skipping invalid configurations. I suggest you change your for_each to avoid including invalid event_query
blocks, either by making the variables block dynamic, or having a conditional that sets variables to null if the monitor doesn't have an applicable event_query
definition
from terraform-provider-datadog.
We already tried making this variables NULL when not needed by some monitors but DD its still looking for it
This is the message we are receiving.
"variables.0.event_query.0.data_source" is required, but no │ definition was found"
This is in fact the real issue, not accepting the NULL for this variables
from terraform-provider-datadog.
Thanks a lot @nkzou !
That solved our problem and now our integration is working as expected with this dynamic block
Greetings!
from terraform-provider-datadog.
Related Issues (20)
- Support for Schema v3 in datadog_service_definition_yaml
- Support for `monitor_options.renotify_occurrences` in resource `datadog_synthetics_test`
- Provider produced inconsistent final plan - Replacing `-` with `_` in names of `datadog_metric_metadata.metric_description` HOT 1
- Support for Error Tracking rules and rate limits configuration
- error validating monitor from /api/v1/monitor/validate: 400 Bad Request: {"errors":["Some monitor IDs are invalid"]} HOT 1
- datadog_security_monitoring_rule 409 conflict HOT 1
- Submit signatures for OpenTofu provider registry
- Documentation for `datadog_team_permission_settings` is misleading/incomplete HOT 1
- Logs Index Resource `name` is missing `ForceNew`
- Issues with Javascript browser variable and related extractFromJavascript browser step
- Synthetic test fails with INVALID_CHAR_IN_HEADER if entry in request_headers comes from data.local_file HOT 2
- support for datadog_integration_confluent_account data resource
- Synthetics Test Multi-steps client certificate config broken when applied second time
- datadog_logs_index - allow changing Flex log settings
- Support querying incident analytics for dashboard widget overlays
- Add datadog_integration_snowflake resource
- Synthetic Test In-Place Update Removes config_variable valuable even when `example` value set
- Automatically handle built-in pipelines in datadog_logs_pipeline_order
- Error creating `datadog_integration_aws_log_collection` fixed on rerun
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-datadog.