-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
69 lines (60 loc) · 2.13 KB
/
main.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
locals {
modules = {
"tfe-notification" = {
display_identifier = "dhoppeIT/terraform-tfe-notification"
identifier = "dhoppeIT/terraform-tfe-notification"
},
"tfe-oauth_client" = {
display_identifier = "dhoppeIT/terraform-tfe-oauth_client"
identifier = "dhoppeIT/terraform-tfe-oauth_client"
},
"tfe-organization" = {
display_identifier = "dhoppeIT/terraform-tfe-organization"
identifier = "dhoppeIT/terraform-tfe-organization"
},
"tfe-registry" = {
display_identifier = "dhoppeIT/terraform-tfe-registry"
identifier = "dhoppeIT/terraform-tfe-registry"
},
"tfe-variable" = {
display_identifier = "dhoppeIT/terraform-tfe-variable"
identifier = "dhoppeIT/terraform-tfe-variable"
},
"tfe-workspace" = {
display_identifier = "dhoppeIT/terraform-tfe-workspace"
identifier = "dhoppeIT/terraform-tfe-workspace"
}
}
}
module "tfe_organization" {
source = "dhoppeIT/organization/tfe"
version = "~> 0.3"
name = "dhoppeIT"
email = "[email protected]"
collaborator_auth_policy = "two_factor_mandatory"
send_passing_statuses_for_untriggered_speculative_plans = true
}
module "tfe_team" {
source = "dhoppeIT/team/tfe"
version = "~> 0.1"
name = "owners"
organization = module.tfe_organization.name
organization_membership_id = module.tfe_organization.id
}
module "tfe_oauth_client" {
source = "dhoppeIT/oauth_client/tfe"
version = "~> 0.2"
organization = module.tfe_organization.name
api_url = "https://api.github.com"
http_url = "https://github.com"
oauth_token = var.github_token
service_provider = "github"
}
module "tfe_registry" {
source = "dhoppeIT/registry/tfe"
version = "~> 0.1"
for_each = local.modules
display_identifier = each.value["display_identifier"]
identifier = each.value["identifier"]
oauth_token_id = module.tfe_oauth_client.oauth_token_id
}