-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteams.tf
59 lines (48 loc) · 1.96 KB
/
teams.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
resource "tfe_team" "test" {
for_each = var.tfe-teams
name = each.value.name
organization = each.value.organization
depends_on = [
tfe_organization.org
]
}
# Workspaces created using the basic modules will create workspaces but won't have all the bells and whistles.
# If you need more control and want to set more workspace settings, suggest using a terraform team and creating
# workspaces with another module. See workspaces.tf for examples.
module "aws-team" {
source = "./modules/teams"
teamname = "aws-sharedservices"
workspaces = ["aws-sharednetwork", "aws-iam-profiles", "aws-domain-names"]
workspace-tags = ["aws", "sharedservices"]
organization = data.tfe_organization.teamcarljavier.name
}
module "azure-team" {
source = "./modules/teams"
teamname = "azure-sharedservices"
workspaces = ["azure-vnets", "azure-msi-profiles", "azure-resource-groups"]
workspace-tags = ["azure", "sharedservices"]
organization = data.tfe_organization.teamcarljavier.name
}
module "gcp-team" {
source = "./modules/teams"
teamname = "gcp-sharedservices"
workspaces = ["gcp-sharednetwork", "gcp-iam-profiles", "gcp-projects"]
workspace-tags = ["gcp", "sharedservices", "datalakes"]
organization = data.tfe_organization.teamcarljavier.name
}
output "gcp-team" {
value = module.gcp-team.teamname
}
module "app-service" {
source = "./modules/teams"
teamname = "app-service"
workspaces = ["app-service-dev", "app-service-iam-profiles", "app-service-domain-names"]
workspace-tags = ["aws", "app-service"]
organization = data.tfe_organization.teamcarljavier.name
}
# The following is an example of only creating a Team with no workspaces
# TFC Admins would look to create workspaces seperately. See workspaces.tf for examples
resource "tfe_team" "teamnoworkspaces" {
name = "teamnoworkspaces"
organization = data.tfe_organization.teamcarljavier.name
}