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

fix: added user assigned identity #7

Merged
merged 3 commits into from
Apr 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ No resources.
| <a name="input_route_tables"></a> [route\_tables](#input\_route\_tables) | Set of unique strings to create Route Tables full names | `set(string)` | `[]` | no |
| <a name="input_storage_accounts"></a> [storage\_accounts](#input\_storage\_accounts) | Set of unique strings to create Storage Accounts full names | `set(string)` | `[]` | no |
| <a name="input_subnets"></a> [subnets](#input\_subnets) | Set of unique strings to create Subnets full names | `set(string)` | `[]` | no |
| <a name="input_user_assigned_identities"></a> [user\_assigned\_identities](#input\_user\_assigned\_identities) | Set of unique strings to create User Assigned Identities full names | `set(string)` | `[]` | no |
| <a name="input_virtual_networks"></a> [virtual\_networks](#input\_virtual\_networks) | Set of unique strings to create Virtual Network full names | `set(string)` | `[]` | no |
| <a name="input_workbooks"></a> [workbooks](#input\_workbooks) | Set of unique strings to create Workbooks full names | `set(string)` | `[]` | no |

Expand Down Expand Up @@ -105,6 +106,8 @@ No resources.
| <a name="output_storage_accounts"></a> [storage\_accounts](#output\_storage\_accounts) | Built name of multiple Storage Accounts with unique particle |
| <a name="output_subnet"></a> [subnet](#output\_subnet) | Built name of single Subnet |
| <a name="output_subnets"></a> [subnets](#output\_subnets) | Built name of multiple Subnets with unique particle |
| <a name="output_user_assigned_identities"></a> [user\_assigned\_identities](#output\_user\_assigned\_identities) | Built name of multiple User Assigned Identities with unique particle |
| <a name="output_user_assigned_identity"></a> [user\_assigned\_identity](#output\_user\_assigned\_identity) | Built name of single User Assigned Identity |
| <a name="output_virtual_network"></a> [virtual\_network](#output\_virtual\_network) | Built name of single Virtual Network |
| <a name="output_virtual_networks"></a> [virtual\_networks](#output\_virtual\_networks) | Built name of multiple Virtual Networks with unique particle |
| <a name="output_workbook"></a> [workbook](#output\_workbook) | Built name of single Workbook |
Expand Down
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@ locals {
# Purview
purview = substr(join("-", compact(["pvw", var.project, var.environment, var.location, var.instance_number])), 0, 63)
purviews = { for item in var.purviews : item => substr(join("-", compact(["pvw", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }

# Dashboard
dashboard = substr(join("-", compact(["dsb", var.project, var.environment, var.location, var.instance_number])), 0, 63)
dashboards = { for item in var.dashboards : item => substr(join("-", compact(["dsb", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }

# Dashboard
workbook = substr(join("-", compact(["wbk", var.project, var.environment, var.location, var.instance_number])), 0, 63)
workbooks = { for item in var.workbooks : item => substr(join("-", compact(["wbk", var.project, item, var.environment, var.location, var.instance_number])), 0, 63) }

# 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) }
}

locals {
Expand Down
11 changes: 11 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,14 @@ output "workbooks" {
description = "Built name of multiple Workbooks with unique particle"
value = local.workbooks
}

# User Assigned Identity
output "user_assigned_identity" {
description = "Built name of single User Assigned Identity"
value = local.user_assigned_identity
}

output "user_assigned_identities" {
description = "Built name of multiple User Assigned Identities with unique particle"
value = local.user_assigned_identities
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@ variable "workbooks" {
description = "Set of unique strings to create Workbooks full names"
default = []
}

variable "user_assigned_identities" {
type = set(string)
description = "Set of unique strings to create User Assigned Identities full names"
default = []
}
Loading