forked from infosanity/deploy-cowrie-farm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiam.tf
29 lines (27 loc) · 770 Bytes
/
iam.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
resource "aws_iam_role" "ssm_managed_honeypot_role" {
name = "ssm_managed_honeypot_role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
}
resource "aws_iam_instance_profile" "ssm_managed_honeypot_profile" {
name = "ssm_managed_honeypot_profile"
role = aws_iam_role.ssm_managed_honeypot_role.name
}
resource "aws_iam_role_policy" "ssm_managed_honeypot_role_policy" {
name = "ssm_managed_honeypot_role_policy"
role = aws_iam_role.ssm_managed_honeypot_role.id
policy = data.template_file.iam_instance_profile.rendered
}