forked from AdamCavaliere/Producer-Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
117 lines (103 loc) · 3.85 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
resource "tfe_organization_membership" "developer" {
organization = var.org
email = "[email protected]"
}
resource "tfe_team" "developers" {
name = "developers"
organization = var.org
}
resource "tfe_team_organization_member" "developer" {
team_id = tfe_team.developers.id
organization_membership_id = tfe_organization_membership.developer.id
}
resource "tfe_organization_membership" "ops" {
organization = var.org
email = "[email protected]"
}
resource "tfe_team" "ops" {
name = "ops"
organization = var.org
}
resource "tfe_team_organization_member" "operator" {
team_id = tfe_team.ops.id
organization_membership_id = tfe_organization_membership.ops.id
}
resource "tfe_registry_module" "terraform-tfe-workspace" {
vcs_repo {
display_identifier = "milesjh/terraform-tfe-workspace"
identifier = "milesjh/terraform-tfe-workspace"
oauth_token_id = var.oauth_token
}
}
module "corp_it_dev_workspace" {
source = "app.terraform.io/mjh-demo/workspace/tfe"
version = "0.0.3"
use_case_name = "corp_it"
org = var.org
vcs_identifier = var.vcs_identifier
oauth_token = var.oauth_token
aws_access_key = var.aws_access_key
aws_secret_key = var.aws_secret_key
arm_client_id = var.arm_client_id
arm_client_secret = var.arm_client_secret
arm_tenant_id = var.arm_tenant_id
arm_subscription_id = var.arm_subscription_id
creator_workspace = var.creator_workspace
tfe_team_developers_id = tfe_team.developers.id
tfe_team_ops_id = tfe_team.ops.id
environment = "dev"
}
module "research_dev_workspace" {
source = "app.terraform.io/mjh-demo/workspace/tfe"
version = "0.0.3"
use_case_name = "research"
org = var.org
vcs_identifier = var.vcs_identifier
oauth_token = var.oauth_token
aws_access_key = var.aws_access_key
aws_secret_key = var.aws_secret_key
arm_client_id = var.arm_client_id
arm_client_secret = var.arm_client_secret
arm_tenant_id = var.arm_tenant_id
arm_subscription_id = var.arm_subscription_id
creator_workspace = var.creator_workspace
tfe_team_developers_id = tfe_team.developers.id
tfe_team_ops_id = tfe_team.ops.id
environment = "dev"
}
module "finance_dev_workspace" {
source = "app.terraform.io/mjh-demo/workspace/tfe"
version = "0.0.3"
use_case_name = "finance"
org = var.org
vcs_identifier = var.vcs_identifier
oauth_token = var.oauth_token
aws_access_key = var.aws_access_key
aws_secret_key = var.aws_secret_key
arm_client_id = var.arm_client_id
arm_client_secret = var.arm_client_secret
arm_tenant_id = var.arm_tenant_id
arm_subscription_id = var.arm_subscription_id
creator_workspace = var.creator_workspace
tfe_team_developers_id = tfe_team.developers.id
tfe_team_ops_id = tfe_team.ops.id
environment = "dev"
}
module "mfg_dev_workspace" {
source = "app.terraform.io/mjh-demo/workspace/tfe"
version = "0.0.3"
use_case_name = "manufacturing"
org = var.org
vcs_identifier = var.vcs_identifier
oauth_token = var.oauth_token
aws_access_key = var.aws_access_key
aws_secret_key = var.aws_secret_key
arm_client_id = var.arm_client_id
arm_client_secret = var.arm_client_secret
arm_tenant_id = var.arm_tenant_id
arm_subscription_id = var.arm_subscription_id
creator_workspace = var.creator_workspace
tfe_team_developers_id = tfe_team.developers.id
tfe_team_ops_id = tfe_team.ops.id
environment = "dev"
}