Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into release-0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jahodfra committed Apr 17, 2019
2 parents 790f37f + 717f4a7 commit 1da699d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aws-lambda-scorer/terraform-recipe/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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}"]
}
]
}
Expand Down

0 comments on commit 1da699d

Please sign in to comment.