Skip to content

Commit

Permalink
fixes #92, fix way to iterate empty list (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepbhadani authored Dec 19, 2018
1 parent 373c985 commit 6f1b93c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"),",","\",\"")}"
}
}

Expand Down
2 changes: 1 addition & 1 deletion templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}

0 comments on commit 6f1b93c

Please sign in to comment.