【发布时间】:2021-05-22 17:04:57
【问题描述】:
我正在运行最新的 google 提供程序并尝试使用示例 terraform 注册表代码来创建日志接收器。但是排除块无法识别
我不断收到“此处不应出现名为“排除”的参数”
关于我哪里出错了有什么想法吗?
resource "google_logging_project_sink" "log-bucket" {
name = "my-logging-sink"
destination = "logging.googleapis.com/projects/my-project/locations/global/buckets/_Default"
exclusions {
name = "nsexcllusion1"
description = "Exclude logs from namespace-1 in k8s"
filter = "resource.type = k8s_container resource.labels.namespace_name=\"namespace-1\" "
}
exclusions {
name = "nsexcllusion2"
description = "Exclude logs from namespace-2 in k8s"
filter = "resource.type = k8s_container resource.labels.namespace_name=\"namespace-2\" "
}
unique_writer_identity = true
显示 Google 提供程序的版本是下面评论中所述的版本
$ terraform version
Terraform v0.12.29
+ provider.datadog v2.21.0
+ provider.google v3.44.0
+ provider.google-beta v3.57.0
更新:也尝试了 0.14 的 Terraform,这没什么区别。
Error: Unsupported block type
on ..\..\..\..\modules\krtyen\datadog\main.tf line 75, in module "export_logs_to_datadog_log_sink":
75: exclusions {
Blocks of type "exclusions" are not expected here.
Releasing state lock. This may take a few moments...
[terragrunt] 2021/02/22 11:11:20 Hit multiple errors:
exit status 1
【问题讨论】:
标签: google-cloud-platform terraform terraform-provider-gcp