-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.tf
More file actions
29 lines (21 loc) · 733 Bytes
/
main.tf
File metadata and controls
29 lines (21 loc) · 733 Bytes
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
# terraform-datadog-teams
# https://www.terraform.io/docs/providers/datadog/r/user.html
module "enabled" {
source = "devops-workflow/boolean/local"
version = "0.1.1"
value = "${var.enabled}"
}
data "null_data_source" "this" {
count = "${module.enabled.value ? length(var.teams) : 0}"
inputs {
name = "${lookup(var.teams[count.index], "name")}"
}
}
resource "github_team" "this" {
count = "${module.enabled.value ? length(var.teams) : 0}"
name = "${lookup(var.teams[count.index], "name")}"
description = "${lookup(var.teams[count.index], "description", "Managed by Terraform")}"
privacy = "${lookup(var.teams[count.index], "privacy", "secret")}"
# secret or closed
}
# output: id