Created
February 17, 2020 03:23
-
-
Save sue445/a655d09c695646b4d7c22a8353d66ce2 to your computer and use it in GitHub Desktop.
Service account for datadog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Service account for datadog | |
# c.f. https://docs.datadoghq.com/ja/integrations/google_cloud_platform/?tab=datadogussite#setup | |
resource "google_service_account" "datadog" { | |
account_id = "datadog" | |
display_name = "datadog" | |
} | |
# Compute Viewer | |
resource "google_project_iam_binding" "datadog_compute_viewer" { | |
role = "roles/compute.viewer" | |
members = [ | |
"serviceAccount:${google_service_account.datadog.email}", | |
] | |
} | |
# Monitoring Viewer | |
resource "google_project_iam_binding" "datadog_monitoring_viewer" { | |
role = "roles/monitoring.viewer" | |
members = [ | |
"serviceAccount:${google_service_account.datadog.email}", | |
] | |
} | |
# Cloud Asset Viewer | |
resource "google_project_iam_binding" "datadog_cloudasset_viewer" { | |
role = "roles/cloudasset.viewer" | |
members = [ | |
"serviceAccount:${google_service_account.datadog.email}", | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment