datadog_integration_gcp (Resource)

This resource is deprecated—use the datadog_integration_gcp_sts resource instead. Provides a Datadog - Google Cloud Platform integration resource. This can be used to create and manage Datadog - Google Cloud Platform integration.

Example Usage

# Create a new Datadog - Google Cloud Platform integration
resource "datadog_integration_gcp" "awesome_gcp_project_integration" {
  project_id     = "awesome-project-id"
  private_key_id = "1234567890123456789012345678901234567890"
  private_key    = "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
  client_email   = "awesome-service-account@awesome-project-id.iam.gserviceaccount.com"
  client_id      = "123456789012345678901"
  host_filters   = "foo:bar,buzz:lightyear"
}


# Usage with google_service_account and google_service_account_key resources
resource "google_service_account" "datadog" {
  account_id   = "datadog-integration"
  display_name = "Datadog Integration"
}

resource "google_service_account_key" "datadog" {
  service_account_id = google_service_account.datadog.name
}

resource "datadog_integration_gcp" "awesome_gcp_project_integration" {
  project_id     = jsondecode(base64decode(google_service_account_key.datadog.private_key))["project_id"]
  private_key    = jsondecode(base64decode(google_service_account_key.datadog.private_key))["private_key"]
  private_key_id = jsondecode(base64decode(google_service_account_key.datadog.private_key))["private_key_id"]
  client_email   = jsondecode(base64decode(google_service_account_key.datadog.private_key))["client_email"]
  client_id      = jsondecode(base64decode(google_service_account_key.datadog.private_key))["client_id"]
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

# Google Cloud Platform integrations can be imported using their project ID, e.g.
terraform import datadog_integration_gcp.awesome_gcp_project_integration project_id