-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tf
More file actions
21 lines (18 loc) · 725 Bytes
/
main.tf
File metadata and controls
21 lines (18 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
data "github_team" "team" {
slug = "${var.team_slug}"
}
data "github_user" "user" {
count = "${length(data.github_team.team.members)}"
username = "${data.github_team.team.members[count.index]}"
}
data "ignition_user" "user" {
count = "${length(data.github_team.team.members)}"
name = "${lower(element(data.github_user.user.*.login, count.index))}"
home_dir = "/home/${lower(element(data.github_user.user.*.login, count.index))}"
shell = "/bin/bash"
ssh_authorized_keys = ["${data.github_user.user.*.ssh_keys[count.index]}"]
groups = ["${var.groups}"]
}
data "ignition_config" "users" {
users = ["${data.ignition_user.user.*.id}"]
}