From fba0f67bfa229eee1520a95804e68357c4992209 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 22 Feb 2022 15:23:39 -0600 Subject: [PATCH] added policy to read write S3 --- qa/scripts/perf/able/ableTest.sh | 2 +- qa/tf/.modules/featurebase-cluster/main.tf | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/qa/scripts/perf/able/ableTest.sh b/qa/scripts/perf/able/ableTest.sh index 9eef6b7d2..867f60d1a 100755 --- a/qa/scripts/perf/able/ableTest.sh +++ b/qa/scripts/perf/able/ableTest.sh @@ -41,7 +41,7 @@ then fi # run test -echo "Running perf test..." +echo "Running perf test" # leaving this here because K6 is timing out and need to work out why #ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "/home/ec2-user/bin/k6 run -e DATANODE0=test.k6.io /data/highcardinalitygroupby.js" ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "curl ${DATANODE0}:10101/index/seg/query -X POST -o /data/response.json -d 'GroupBy(Rows(education_level), Rows(gender), Rows(political_party), Rows(domain))'" diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index 325516bfc..c06576025 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -257,6 +257,27 @@ resource "aws_iam_role" "fb_cluster_node_role" { }) } + inline_policy { + name = "s3_perms" + policy = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Sid = "VisualEditor0", + Effect = "Allow", + Action = ["s3:PutObject", "s3:GetObject"], + Resource = "arn:aws:s3:::molecula-perf-storage/*" + }, + { + Sid = "VisualEditor1", + Effect = "Allow", + Action = "s3:PutObject", + Resource = "arn:aws:s3:::molecula-artifact-storage/*" + } + ] + }) + } + tags = { Prefix = "${var.cluster_prefix}" Name = "${var.cluster_prefix}-fb_cluster_node_role"