Skip to content

Commit 208d6b6

Browse files
author
Artem Vovchenko
committed
feat: add managed devops pool and dev center
1 parent e045608 commit 208d6b6

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

main.tf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ locals {
1515
network_security_group = substr(join("-", compact(["nsg", var.project, var.environment, var.location, var.instance_number])), 0, 80)
1616
network_security_groups = { for item in var.network_security_groups : item => substr(join("-", compact(["nsg", var.project, item, var.environment, var.location, var.instance_number])), 0, 80) }
1717

18-
# Application Security Groups
18+
# Application Security Groups
1919
application_security_group = substr(join("-", compact(["asg", var.project, var.environment, var.location, var.instance_number])), 0, 80)
2020
application_security_groups = { for item in var.application_security_groups : item => substr(join("-", compact(["asg", var.project, item, var.environment, var.location, var.instance_number])), 0, 80) }
2121

@@ -102,6 +102,19 @@ locals {
102102
# User Assigned Identity
103103
user_assigned_identity = substr(join("-", compact(["id", var.project, var.environment, var.location, var.instance_number])), 0, 63)
104104
user_assigned_identities = { for item in var.user_assigned_identities : item => substr(join("-", compact(["id", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }
105+
106+
# Dev Center
107+
dev_center = substr(join("-", compact(["dc", var.project, var.environment,
108+
var.location, var.instance_number])), 0, 26)
109+
dev_centers = { for item in var.dev_centers : item => substr(join("-", compact(["dc", var.project, item, var.environment, var.location, var.instance_number])), 0, 26) }
110+
111+
# Dev Center Project
112+
dev_center_project = substr(join("-", compact(["dcp", var.project, var.environment, var.location, var.instance_number])), 0, 63)
113+
dev_center_projects = { for item in var.dev_center_projects : item => substr(join("-", compact(["dcp", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }
114+
115+
# Managed DevOps Pool
116+
managed_devops_pool = substr(join("-", compact(["mdp", var.project, var.environment, var.location, var.instance_number])), 0, 63)
117+
managed_devops_pools = { for item in var.managed_devops_pools : item => substr(join("-", compact(["mdp", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }
105118
}
106119

107120
locals {

outputs.tf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,36 @@ output "user_assigned_identities" {
283283
description = "Built name of multiple User Assigned Identities with unique particle"
284284
value = local.user_assigned_identities
285285
}
286+
287+
# Dev Center
288+
output "dev_center" {
289+
description = "Built name of single Dev Center"
290+
value = local.dev_center
291+
}
292+
293+
output "dev_centers" {
294+
description = "Built name of multiple Dev Centers with unique particle"
295+
value = local.dev_centers
296+
}
297+
298+
# Dev Center Project
299+
output "dev_center_project" {
300+
description = "Built name of single Dev Center Project"
301+
value = local.dev_center_project
302+
}
303+
304+
output "dev_center_projects" {
305+
description = "Built name of multiple Dev Center Projects with unique particle"
306+
value = local.dev_center_projects
307+
}
308+
309+
# Managed DevOps Pool
310+
output "managed_devops_pool" {
311+
description = "Built name of single Managed DevOps pool"
312+
value = local.managed_devops_pool
313+
}
314+
315+
output "managed_devops_pools" {
316+
description = "Built name of multiple Managed DevOps Pools with unique particle"
317+
value = local.managed_devops_pools
318+
}

variables.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,21 @@ variable "application_security_groups" {
174174
description = "Set of unique strings to create Application Security Groups full names"
175175
default = []
176176
}
177+
178+
variable "dev_centers" {
179+
type = set(string)
180+
description = "Set of unique strings to create Dev Center full names"
181+
default = []
182+
}
183+
184+
variable "dev_center_projects" {
185+
type = set(string)
186+
description = "Set of unique strings to create Dev Center Project full names"
187+
default = []
188+
}
189+
190+
variable "managed_devops_pools" {
191+
type = set(string)
192+
description = "Set of unique strings to create Managed DevOps Pool full names"
193+
default = []
194+
}

0 commit comments

Comments
 (0)