简体   繁体   English

GCP云计费通过terraform导出到BQ

[英]GCP cloud billing export into BQ through terraform

Can we automate GCP billing export into BQ through Terraform?我们可以通过 Terraform 自动将 GCP 账单导出到 BQ吗?

I tried below terraform code but it's not working.我尝试了以下 terraform 代码,但它不起作用。 So, not sure if GCP billing exporting into BQ would be possible through Terraform or not.因此,不确定是否可以通过 Terraform 将 GCP 计费导出到 BQ。

resource "google_logging_billing_account_sink" "billing-sink" {
  name            = "billing-sink"
  description     = "Billing export"
  billing_account = "**********"
  unique_writer_identity = true
  destination = "bigquery.googleapis.com/projects/${var.project_name}/datasets/${google_bigquery_dataset.billing_export.dataset_id}"
}

resource "google_project_iam_member" "log_writer" {
  project = var.project_name
  role    = "roles/bigquery.dataEditor"
  member  = google_logging_billing_account_sink.billing-sink.writer_identity
}

Unfortunately,there is no such option.不幸的是,没有这样的选择。 This concern is already raised under github and this is in enhancement.此问题已在github下提出,并且正在增强中。 Currently there is no ETA available.目前没有可用的预计到达时间。 I can see in terraform only google_logging_billing_account_sink and Automating logs export to BigQuery with Terraform.我在 terraform 中只能看到google_logging_billing_account_sink和 Automating logs export to BigQuery with Terraform。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GCP Cloud Build 和 Terraform 集成 - GCP Cloud Build and Terraform integration 使用 Cloud Pub/Sub 主题在 GCP 中安排 bq 命令行 - Schedule a bq command line in GCP with Cloud Pub/Sub topic GCP Terraform 服务帐户密钥导出 - GCP terraform service accounts keys export 无法通过 Terraform 使用 GCP Cloud Build 对 GitHub 存储库进行身份验证 - Cannot authenticate GitHub repository with GCP Cloud Build via Terraform 是否可以在Terraform中更新GCP Cloud Function的源代码? - Is it possible to update the source code of a GCP Cloud Function in Terraform? 带有多个接收器过滤器的 GCP 日志导出发布/订阅 Terraform - GCP Log-export pub/sub with multiple sink filters with Terraform 使用 bq 命令在 GCP Bigquery 和 Cloud SQL (Mysql 5.7) 之间创建连接时出现错误 - Error emitted when creating a connection between GCP Bigquery and Cloud SQL (Mysql 5.7) using bq command 使用 terraform 在 GCP 中创建云功能错误警报策略 - Creating a cloud-function error alerting policy in GCP with terraform 通过 GCP 云调度程序传递动态值 - Pass dynamic values through GCP cloud scheduler terraform GCP 云 function 无需通过 terraform 在 CI 中部署或在本地运行时打破过去的部署? - terraform GCP cloud function without having to deploy via terraform in CI or breaking past deployments when running locally?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM