Skip to content

Commit

Permalink
verify enabled prior to decode
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jan 13, 2025
1 parent 29893ab commit 0393d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ sys 0m2.015s

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.73.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.83.1 |
| <a name="provider_http"></a> [http](#provider\_http) | 3.4.5 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.33.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.35.1 |

## Modules

Expand Down
8 changes: 2 additions & 6 deletions eks_console_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ locals {
enabled = false
},
]
cluster_roles_map = { for cr in local.cluster_roles : cr.name => cr }
all_access_documents = flatten([
for cr_name, cr_data in local.cluster_roles_map : [
yamldecode(data.http.cluster_roles[cr_name].body)
] if cr_data.enabled
])
cluster_roles_map = { for cr in local.cluster_roles : cr.name => cr if cr.enabled }
all_access_documents = flatten([for cr_name, cr_data in local.cluster_roles_map : [yamldecode(data.http.cluster_roles[cr_name].body)] if cr_data.enabled])
}

# Fetch the YAML files from the specified URLs
Expand Down

0 comments on commit 0393d71

Please sign in to comment.