From 42ea8ddd3770fad5d70d08fc0f1ba5c266dff46c Mon Sep 17 00:00:00 2001 From: Konrad Obal Date: Sun, 31 Mar 2019 08:35:58 +0200 Subject: [PATCH] fix: Add condition to manage creation of cache bucket policy (#39) Fixes #38 --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 0ebb776..6215f3e 100644 --- a/main.tf +++ b/main.tf @@ -129,7 +129,7 @@ data "aws_iam_policy_document" "permissions" { } data "aws_iam_policy_document" "permissions_cache_bucket" { - count = "${var.enabled == "true" ? 1 : 0}" + count = "${var.enabled == "true" && var.cache_enabled == "true" ? 1 : 0}" statement { sid = ""