|
1 | | -variable "tpl_local_name" { |
| 1 | +variable "role_assignment" { |
2 | 2 | type = any |
3 | 3 | default = {} |
4 | 4 | description = "Resource definition, default settings are defined within locals and merged with var settings. For more information look at [Outputs](#Outputs)." |
5 | 5 | } |
6 | 6 |
|
7 | 7 | locals { |
8 | 8 | default = { |
9 | | - tpl_local_name = { |
10 | | - name = "" |
11 | | - tags = {} |
| 9 | + // resource definition |
| 10 | + role_assignment = { |
| 11 | + name = null |
| 12 | + role_definition_id = null |
| 13 | + role_definition_name = null |
| 14 | + condition = null |
| 15 | + condition_version = null |
| 16 | + delegated_managed_identity_resource_id = null |
| 17 | + description = null |
| 18 | + skip_service_principal_aad_check = null |
12 | 19 | } |
13 | 20 | } |
14 | 21 |
|
15 | | - /** |
16 | | - compare and merge custom and default values |
17 | | - */ |
18 | | - tpl_local_name_values = { |
19 | | - for tpl_local_name in keys(var.tpl_local_name) : |
20 | | - tpl_local_name => merge(local.default.tpl_local_name, var.tpl_local_name[tpl_local_name]) |
| 22 | + // compare and merge custom and default values |
| 23 | + role_assignment_values = { |
| 24 | + for role_assignment in keys(var.role_assignment) : |
| 25 | + role_assignment => merge(local.default.role_assignment, var.role_assignment[role_assignment]) |
21 | 26 | } |
22 | 27 |
|
23 | | - /** |
24 | | - deep merge of all custom and default values |
25 | | - */ |
26 | | - tpl_local_name = { |
27 | | - for tpl_local_name in keys(var.tpl_local_name) : |
28 | | - tpl_local_name => merge( |
29 | | - local.tpl_local_name_values[tpl_local_name], |
| 28 | + // deep merge of all custom and default values |
| 29 | + role_assignment = { |
| 30 | + for role_assignment in keys(var.role_assignment) : |
| 31 | + role_assignment => merge( |
| 32 | + local.role_assignment_values[role_assignment], |
30 | 33 | {} |
31 | 34 | ) |
32 | 35 | } |
|
0 commit comments