Skip to content

Commit

Permalink
Add explicit dependency for S3 public access block to resolve race co…
Browse files Browse the repository at this point in the history
…ndition (#163)

* Add explicit dependency for S3 public access block to resolve race condition

* fix changelog date
  • Loading branch information
KenFigueiredo authored Jun 18, 2020
1 parent ce7c296 commit 2c7169c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ terraform.tfstate.backup
*.swp
*.plan
terraform.tfstate
.terraform.tfstate.lock.info

# Netbeans files
nbactions.xml
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ 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).

## [6.4.1] - 2020-06-18
### Fixed
- [Issue 162](https://github.com/ExpediaGroup/apiary-data-lake/issues/162) Add explicit dependency for S3 public access block to resolve race condition.

## [6.4.0] - 2020-06-16
### Added
- Create `apiary_system` database and buckets. This is pre-work for Ranger access logs Hive tables and other system data. Requires `apiary-metastore-docker` version `1.15.0` or above.
Expand Down
8 changes: 4 additions & 4 deletions s3-other.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EOF

resource "aws_s3_bucket_public_access_block" "apiary_inventory_bucket" {
count = var.s3_enable_inventory == true ? 1 : 0
bucket = local.s3_inventory_bucket
bucket = aws_s3_bucket.apiary_inventory_bucket[0].bucket

block_public_acls = true
block_public_policy = true
Expand Down Expand Up @@ -73,7 +73,7 @@ resource "aws_s3_bucket" "apiary_managed_logs_bucket" {

resource "aws_s3_bucket_public_access_block" "apiary_managed_logs_bucket" {
count = local.enable_apiary_s3_log_management ? 1 : 0
bucket = local.apiary_s3_logs_bucket
bucket = aws_s3_bucket.apiary_managed_logs_bucket[0].bucket

block_public_acls = true
block_public_policy = true
Expand All @@ -96,7 +96,7 @@ resource "aws_s3_bucket" "apiary_access_logs_hive" {

resource "aws_s3_bucket_public_access_block" "apiary_access_logs_hive" {
count = local.enable_apiary_s3_log_management ? 1 : 0
bucket = local.apiary_s3_hive_logs_bucket
bucket = aws_s3_bucket.apiary_access_logs_hive[0].bucket

block_public_acls = true
block_public_policy = true
Expand All @@ -117,7 +117,7 @@ resource "aws_s3_bucket" "apiary_system" {
}

resource "aws_s3_bucket_public_access_block" "apiary_system" {
bucket = local.apiary_system_bucket
bucket = aws_s3_bucket.apiary_system.bucket

block_public_acls = true
block_public_policy = true
Expand Down

0 comments on commit 2c7169c

Please sign in to comment.