diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d7bf0..9f79ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.0.2] - 2018-12-18 + +### Changed +- Fixes [#92](https://github.com/ExpediaInc/apiary-data-lake/issues/92). + ## [1.0.1] - 2018-12-14 ### Added diff --git a/s3.tf b/s3.tf index 00b222a..e59ac3b 100644 --- a/s3.tf +++ b/s3.tf @@ -13,11 +13,12 @@ data "template_file" "bucket_policy" { vars { #if apiary_shared_schemas is empty or contains current schema, allow customer accounts to access this bucket. - customer_principal = "${ length(var.apiary_shared_schemas) == 0 || contains(var.apiary_shared_schemas,var.apiary_managed_schemas[count.index]) ? + customer_principal = "${ length(var.apiary_shared_schemas) == 0 || contains(var.apiary_shared_schemas, element(concat(var.apiary_managed_schemas,list("")),count.index)) ? join("\",\"", formatlist("arn:aws:iam::%s:root",var.apiary_customer_accounts)) : "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root" }" - bucket_name = "${local.apiary_data_buckets[count.index]}" - producer_iamroles = "${replace(lookup(var.apiary_producer_iamroles,element(concat(var.apiary_managed_schemas,list("")),count.index),"arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"),",","\",\"")}" + + bucket_name = "${local.apiary_data_buckets[count.index]}" + producer_iamroles = "${replace(lookup(var.apiary_producer_iamroles,element(concat(var.apiary_managed_schemas,list("")),count.index),"arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"),",","\",\"")}" } } diff --git a/templates.tf b/templates.tf index e50d23a..1cc3dc1 100644 --- a/templates.tf +++ b/templates.tf @@ -56,7 +56,7 @@ data "template_file" "hms_readonly" { hive_metastore_log_level = "${var.hms_log_level}" nofile_ulimit = "${var.hms_nofile_ulimit}" enable_metrics = "${var.enable_hive_metastore_metrics}" - shared_schemas = "${join(",",var.apiary_shared_schemas)}" + shared_schemas = "${join(",",var.apiary_shared_schemas)}" instance_name = "${local.instance_alias}" } }