Skip to content

Commit 99cf3a7

Browse files
committed
VED-26: Give endpoint Lambdas the required permissions to attach to the VPC.
1 parent 4107f35 commit 99cf3a7

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

terraform/endpoints.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// This file creates all lambdas needed for each endpoint plus api-gateway
22

33
locals {
4-
policy_path = "${path.root}/policies"
4+
policy_path = "${path.root}/policies"
55
}
66

77
data "aws_iam_policy_document" "logs_policy_document" {
@@ -51,7 +51,8 @@ data "aws_iam_policy_document" "imms_policy_document" {
5151
}),
5252
templatefile("${local.policy_path}/secret_manager.json", {
5353
"account_id" : data.aws_caller_identity.current.account_id
54-
})
54+
}),
55+
file("${local.policy_path}/ec2_network_interfaces.json")
5556
]
5657
}
5758

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": [
7+
"ec2:CreateNetworkInterface",
8+
"ec2:DescribeNetworkInterfaces",
9+
"ec2:DeleteNetworkInterface"
10+
],
11+
"Resource": "*"
12+
}
13+
]
14+
}

0 commit comments

Comments
 (0)