Open GauthierMenier opened 1 year ago
Could you reach out to Datadog support at https://help.datadoghq.com/? We don't have much context on integration issues, and a support engineer would be able to see exactly why your requests are 400ing.
I created a support ticket to Datadog.
same issue here after migrating to new GCP integration
tested on provider versions:
We have the same issue with version 3.34.0. Did you hear back from Datadog @GauthierMenier.
Had a similar issue. Worked with the DD support team. It seems some logs need to flow first before setting up the DD log archive. However, this was not the case with the older DD provider version.
We uptated to using the datadog_integration_gcp_sts module and then after the integration was in-place in Datadog, we had to manually change to the new integration in the Datadog UI. After that, it started working in subsequent runs.
This seems to be a bug. Please comment out "project_id" and it works. See the below code snippet for reference. update: It only works on Mac and Linux. Windows provider for TF has a bug and I could not find any fix for windows.
resource "datadog_logs_archive" "datadog_gcs_archive" {
name = "${var.datadog_archive_name}-gcs-archive"
query = "*"
gcs_archive {
bucket =
} }
The below setting worked for me
resource "datadog_logs_archive" "dd_logs_archive" {
name = "${var.datadog_archive_name}-datadog-logs"
query = "*"
gcs_archive {
bucket = var.bucket_name
path = "/"
client_email = google_service_account.datadog_integration.email
project_id = var.project_id
}
include_tags = true
}
Datadog Terraform Provider Version
v3.28.0
Terraform Version
v1.5.3
What resources or data sources are affected?
datadog_logs_archive
Terraform Configuration Files
No response
Relevant debug or panic output
During a Terraform deployment with the new GCP integration in Datadog (a service account instead of a project ID), the update no longer seems to work.
Expected Behavior
Modification complete.
Actual Behavior
Error: error updating logs archive from https://api.datadoghq.eu/api/v2/logs/config/archives/: 400 Bad Request: {"errors":["The specified GCP project id and client email have not been configured."]}
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response