When I run cdktf deploy
to provision a data collection rule, I get the following error:
Error: creating Data Collection Rule (Subscription: "a475b49b-c65e-46a7-9c63-1ec577986549"
│ Resource Group Name: "rg-mprt"
│ Data Collection Rule Name: "dcr-mprt-sandbox"): unexpected status 400 (400 Bad Request) with error: InvalidPayload: Data collection rule is invalid
│
│ with azurerm_monitor_data_collection_rule.stack-monitor-mprt-sandbox_data-collection-rule-mprt_B0ED6D0E (stack-monitor-mprt-sandbox/data-collection-rule-mprt),
│ on cdk.tf.json line 662, in resource.azurerm_monitor_data_collection_rule.stack-monitor-mprt-sandbox_data-collection-rule-mprt_B0ED6D0E (stack-monitor-mprt-sandbox/data-collection-rule-mprt):
│ 662: }
│
│ creating Data Collection Rule (Subscription:
│ "a475b49b-c65e-46a7-9c63-1ec577986549"
│ Resource Group Name: "rg-mprt"
│ Data Collection Rule Name: "dcr-mprt-sandbox"): unexpected status 400 (40
I’ve tried turning on debugging and logging in order to help pinpoint the error with the following command:
CDKTF_LOG_LEVEL=debug TF_LOG_LEVEL=debug CDKTF_LOG_FILE_DIRECTORY="." cdktf deploy stack-mprt-sandbox
However, setting the log level doesn’t seem to actually increase the output information in the log.
How can I go about effectively debugging the underlying error when provisioning this resource? Thanks for any and all info.