-
Notifications
You must be signed in to change notification settings - Fork 4
/
data.tf
46 lines (35 loc) · 811 Bytes
/
data.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Get the latest ECS AMI
data "aws_ami" "latest_amzn_ami" {
most_recent = true
filter {
name = "name"
values = ["amzn-ami-hvm-*-x86_64-gp2"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
owners = ["amazon"]
}
data "aws_availability_zones" "all" {}
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
data "aws_iam_policy_document" "instance_assume_role_policy" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com"]
}
}
}
data "template_file" "cloud-init" {
template = "${file("${path.module}/cloud-config.tpl")}"
vars = {
public_key = "${var.producer_public_key}"
}
}