added policy to read write S3

This commit is contained in:
pokeeffe-molecula 2022-02-22 15:23:39 -06:00
parent b0ea69d2f4
commit fba0f67bfa
2 changed files with 22 additions and 1 deletions

View file

@ -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))'"

View file

@ -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"