Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add managed devops pool and dev center #11

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ No resources.
| <a name="input_dashboards"></a> [dashboards](#input\_dashboards) | Set of unique strings to create Dashboards full names | `set(string)` | `[]` | no |
| <a name="input_data_factories"></a> [data\_factories](#input\_data\_factories) | Set of unique strings to create Data Factories full names | `set(string)` | `[]` | no |
| <a name="input_databricks_workspaces"></a> [databricks\_workspaces](#input\_databricks\_workspaces) | Set of unique strings to create Databricks Workspaces full names | `set(string)` | `[]` | no |
| <a name="input_dev_center_projects"></a> [dev\_center\_projects](#input\_dev\_center\_projects) | Set of unique strings to create Dev Center Project full names | `set(string)` | `[]` | no |
| <a name="input_dev_centers"></a> [dev\_centers](#input\_dev\_centers) | Set of unique strings to create Dev Center full names | `set(string)` | `[]` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment/Subscription name | `string` | n/a | yes |
| <a name="input_instance_number"></a> [instance\_number](#input\_instance\_number) | Instance number of deployment | `string` | `"1"` | no |
| <a name="input_internal_load_balancers"></a> [internal\_load\_balancers](#input\_internal\_load\_balancers) | Set of unique strings to create Internal Load Balancers full names | `set(string)` | `[]` | no |
Expand All @@ -42,6 +44,7 @@ No resources.
| <a name="input_linux_virtual_machines"></a> [linux\_virtual\_machines](#input\_linux\_virtual\_machines) | Set of unique strings to create Linux Virtual Machines full names | `set(string)` | `[]` | no |
| <a name="input_location"></a> [location](#input\_location) | Azure Region | `string` | n/a | yes |
| <a name="input_log_analytics_workspaces"></a> [log\_analytics\_workspaces](#input\_log\_analytics\_workspaces) | Set of unique strings to create Log Analytics Workspaces full names | `set(string)` | `[]` | no |
| <a name="input_managed_devops_pools"></a> [managed\_devops\_pools](#input\_managed\_devops\_pools) | Set of unique strings to create Managed DevOps Pool full names | `set(string)` | `[]` | no |
| <a name="input_mssql_databases"></a> [mssql\_databases](#input\_mssql\_databases) | Set of unique strings to create MSSQL Databases full names | `set(string)` | `[]` | no |
| <a name="input_mssql_servers"></a> [mssql\_servers](#input\_mssql\_servers) | Set of unique strings to create MSSQL Servers full names | `set(string)` | `[]` | no |
| <a name="input_nat_gateways"></a> [nat\_gateways](#input\_nat\_gateways) | Set of unique strings to create Nat Gateways full names | `set(string)` | `[]` | no |
Expand Down Expand Up @@ -75,6 +78,10 @@ No resources.
| <a name="output_data_factory"></a> [data\_factory](#output\_data\_factory) | Built name of single Data Factory |
| <a name="output_databricks_workspace"></a> [databricks\_workspace](#output\_databricks\_workspace) | Built name of single Databricks Workspace |
| <a name="output_databricks_workspaces"></a> [databricks\_workspaces](#output\_databricks\_workspaces) | Built name of multiple Databricks Workspaces with unique particle |
| <a name="output_dev_center"></a> [dev\_center](#output\_dev\_center) | Built name of single Dev Center |
| <a name="output_dev_center_project"></a> [dev\_center\_project](#output\_dev\_center\_project) | Built name of single Dev Center Project |
| <a name="output_dev_center_projects"></a> [dev\_center\_projects](#output\_dev\_center\_projects) | Built name of multiple Dev Center Projects with unique particle |
| <a name="output_dev_centers"></a> [dev\_centers](#output\_dev\_centers) | Built name of multiple Dev Centers with unique particle |
| <a name="output_internal_load_balancer"></a> [internal\_load\_balancer](#output\_internal\_load\_balancer) | Built name of single Internal Load Balancer |
| <a name="output_internal_load_balancers"></a> [internal\_load\_balancers](#output\_internal\_load\_balancers) | Built name of multiple Internal Load Balancers with unique particle |
| <a name="output_key_vault"></a> [key\_vault](#output\_key\_vault) | Built name of single Key Vault |
Expand All @@ -85,6 +92,8 @@ No resources.
| <a name="output_linux_virtual_machines"></a> [linux\_virtual\_machines](#output\_linux\_virtual\_machines) | Built name of multiple Linux Virtual Machines with unique particle |
| <a name="output_log_analytics_workspace"></a> [log\_analytics\_workspace](#output\_log\_analytics\_workspace) | Built name of single Log Analytics Workspace |
| <a name="output_log_analytics_workspaces"></a> [log\_analytics\_workspaces](#output\_log\_analytics\_workspaces) | Built name of multiple Log Analytics Workspaces with unique particle |
| <a name="output_managed_devops_pool"></a> [managed\_devops\_pool](#output\_managed\_devops\_pool) | Built name of single Managed DevOps pool |
| <a name="output_managed_devops_pools"></a> [managed\_devops\_pools](#output\_managed\_devops\_pools) | Built name of multiple Managed DevOps Pools with unique particle |
| <a name="output_mssql_database"></a> [mssql\_database](#output\_mssql\_database) | Built name of single MSSQL Database |
| <a name="output_mssql_databases"></a> [mssql\_databases](#output\_mssql\_databases) | Built name of multiple MSSQL Databases with unique particle |
| <a name="output_mssql_server"></a> [mssql\_server](#output\_mssql\_server) | Built name of single MSSQL Server |
Expand Down
15 changes: 14 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ locals {
network_security_group = substr(join("-", compact(["nsg", var.project, var.environment, var.location, var.instance_number])), 0, 80)
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) }

# Application Security Groups
# Application Security Groups
application_security_group = substr(join("-", compact(["asg", var.project, var.environment, var.location, var.instance_number])), 0, 80)
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) }

Expand Down Expand Up @@ -102,6 +102,19 @@ locals {
# User Assigned Identity
user_assigned_identity = substr(join("-", compact(["id", var.project, var.environment, var.location, var.instance_number])), 0, 63)
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) }

# Dev Center
dev_center = substr(join("-", compact(["dc", var.project, var.environment,
var.location, var.instance_number])), 0, 26)
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) }

# Dev Center Project
dev_center_project = substr(join("-", compact(["dcp", var.project, var.environment, var.location, var.instance_number])), 0, 63)
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) }

# Managed DevOps Pool
managed_devops_pool = substr(join("-", compact(["mdp", var.project, var.environment, var.location, var.instance_number])), 0, 63)
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) }
}

locals {
Expand Down
33 changes: 33 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,36 @@ output "user_assigned_identities" {
description = "Built name of multiple User Assigned Identities with unique particle"
value = local.user_assigned_identities
}

# Dev Center
output "dev_center" {
description = "Built name of single Dev Center"
value = local.dev_center
}

output "dev_centers" {
description = "Built name of multiple Dev Centers with unique particle"
value = local.dev_centers
}

# Dev Center Project
output "dev_center_project" {
description = "Built name of single Dev Center Project"
value = local.dev_center_project
}

output "dev_center_projects" {
description = "Built name of multiple Dev Center Projects with unique particle"
value = local.dev_center_projects
}

# Managed DevOps Pool
output "managed_devops_pool" {
description = "Built name of single Managed DevOps pool"
value = local.managed_devops_pool
}

output "managed_devops_pools" {
description = "Built name of multiple Managed DevOps Pools with unique particle"
value = local.managed_devops_pools
}
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,21 @@ variable "application_security_groups" {
description = "Set of unique strings to create Application Security Groups full names"
default = []
}

variable "dev_centers" {
type = set(string)
description = "Set of unique strings to create Dev Center full names"
default = []
}

variable "dev_center_projects" {
type = set(string)
description = "Set of unique strings to create Dev Center Project full names"
default = []
}

variable "managed_devops_pools" {
type = set(string)
description = "Set of unique strings to create Managed DevOps Pool full names"
default = []
}