forked from cattle-ops/terraform-aws-gitlab-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
43 lines (32 loc) · 816 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
data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
data "aws_region" "current" {}
data "aws_subnet" "runners" {
id = var.subnet_id
}
data "aws_availability_zone" "runners" {
name = data.aws_subnet.runners.availability_zone
}
data "aws_ami" "runner" {
most_recent = "true"
dynamic "filter" {
for_each = var.runner_ami_filter
content {
name = filter.key
values = filter.value
}
}
owners = var.runner_ami_owners
}
data "aws_ami" "docker-machine" {
count = var.runner_worker.type == "docker+machine" ? 1 : 0
most_recent = "true"
dynamic "filter" {
for_each = var.runner_worker_docker_machine_ami_filter
content {
name = filter.key
values = filter.value
}
}
owners = var.runner_worker_docker_machine_ami_owners
}