From 5c6c4f4f3a73f5afb9aea4a671009a285f3d7142 Mon Sep 17 00:00:00 2001 From: Frantisek Jahoda Date: Tue, 16 Apr 2019 14:26:45 +0200 Subject: [PATCH 1/2] Bump version to 0.2.0-SNAPSHOT (#56) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0b1cc02e..1471d945 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version = 0.1.1-SNAPSHOT +version = 0.2.0-SNAPSHOT # Versions of dependencies. Try to keep these at the same version across the deployment templates to facilitate # issue resolution. From 717f4a7cb2372bfd9cda21673cb3fcec4c987c6b Mon Sep 17 00:00:00 2001 From: Frantisek Jahoda Date: Wed, 17 Apr 2019 09:38:45 +0200 Subject: [PATCH 2/2] Format bucket_arn locally (#57) --- aws-lambda-scorer/terraform-recipe/main.tf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/aws-lambda-scorer/terraform-recipe/main.tf b/aws-lambda-scorer/terraform-recipe/main.tf index 9cf600a5..cd70001d 100644 --- a/aws-lambda-scorer/terraform-recipe/main.tf +++ b/aws-lambda-scorer/terraform-recipe/main.tf @@ -24,12 +24,9 @@ variable "mojo_path" { variable "bucket_name" { description = "Name of S3 bucket." } -variable "bucket_arn" { - description = "ARN of S3 bucket." -} - locals { escaped_id = "${replace("h2oai_${var.lambda_id}", "/[^-_a-zA-Z0-9]/", "")}" + bucket_arn = "arn:aws:s3:::${var.bucket_name}" } provider "aws" { @@ -105,12 +102,12 @@ resource "aws_iam_policy" "s3_policy" { { "Effect": "Allow", "Action": ["s3:ListBucket"], - "Resource": ["${var.bucket_arn}"] + "Resource": ["${local.bucket_arn}"] }, { "Effect": "Allow", "Action": ["s3:GetObject"], - "Resource": ["${var.bucket_arn}/${aws_s3_bucket_object.mojo.key}"] + "Resource": ["${local.bucket_arn}/${aws_s3_bucket_object.mojo.key}"] } ] }