From 114d53e7978e0a6c85bd03476dd6a0654e869227 Mon Sep 17 00:00:00 2001 From: bob walker Date: Tue, 31 Dec 2019 14:38:44 +0000 Subject: [PATCH] Fixes for terraform 0.12 --- main.tf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index d240019..024ab85 100644 --- a/main.tf +++ b/main.tf @@ -33,7 +33,7 @@ data "aws_region" "_" {} data "template_file" "codebuild_source_location" { template = "https://github.com/$${owner}/$${repository}.git" - vars { + vars = { owner = "${var.github_owner}" repository = "${var.github_repository}" } @@ -47,7 +47,7 @@ data "template_file" "codebuild_source_location" { data "template_file" "codebuild_iam_policy" { template = "${file("${path.module}/iam/policies/codebuild.json")}" - vars { + vars = { bucket = "${aws_s3_bucket._.bucket}" } } @@ -120,7 +120,13 @@ resource "aws_codebuild_project" "_" { type = "LINUX_CONTAINER" image = "${var.codebuild_image}" privileged_mode = "${var.codebuild_privileged_mode}" - environment_variable = "${var.codebuild_environment_variables}" + dynamic "environment_variable" { + for_each = var.codebuild_environment_variables + content { + name = environment_variable.value.name + value = environment_variable.value.value + } + } } artifacts {