From 039a43c453f20b398ff64949d64ad03d447431e3 Mon Sep 17 00:00:00 2001 From: Kunpei Sakai Date: Fri, 26 Oct 2018 10:01:55 +0900 Subject: [PATCH] expose x-goog-version instead of attributes argument --- README.md | 2 +- examples/simple/example.tf | 2 +- main.tf | 2 +- test/fixtures/main.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87cd003..2d6b2f5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ module "pubsub" { name = "push" // required ack_deadline_seconds = 20 // optonal push_endpoint = "https://example.com" - attributes = "x-goog-version:v1beta1" + x-goog-version = "v1beta1" } ] pull_subscriptions = [ diff --git a/examples/simple/example.tf b/examples/simple/example.tf index f533972..c3475d1 100644 --- a/examples/simple/example.tf +++ b/examples/simple/example.tf @@ -36,7 +36,7 @@ module "pubsub" { name = "push" ack_deadline_seconds = 20 push_endpoint = "https://${var.project_id}.appspot.com" - attributes = "x-goog-version:v1beta1" + x-goog-version = "v1beta1" }, ] } diff --git a/main.tf b/main.tf index bca7ee1..7b2f878 100644 --- a/main.tf +++ b/main.tf @@ -36,7 +36,7 @@ resource "google_pubsub_subscription" "push_subscriptions" { // FIXME: This should be programmable, but nested map isn't supported at this time. // https://github.com/hashicorp/terraform/issues/2114 attributes = { - x-goog-version = "${element(split(":", lookup(var.push_subscriptions[count.index], "attributes", "x-goog-version:v1")), 1)}" + x-goog-version = "${lookup(var.push_subscriptions[count.index], "x-goog-version", "v1")}" } } diff --git a/test/fixtures/main.tf b/test/fixtures/main.tf index e3cc015..1b3b3ca 100644 --- a/test/fixtures/main.tf +++ b/test/fixtures/main.tf @@ -27,7 +27,7 @@ module "pubsub" { { name = "push" push_endpoint = "https://${var.project}.appspot.com/" - attributes = "x-goog-version:v1beta1" + x-goog-version = "v1beta1" ack_deadline_seconds = 20 }, ]