-
Notifications
You must be signed in to change notification settings - Fork 1
/
resources.tf
28 lines (23 loc) · 884 Bytes
/
resources.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
locals {
internal_manifests = [
for output in module.manifests[*] : output
if strcontains(output.manifest.apiVersion, "lukerops.com") && output.manifest.kind == "CustomResourceDefinition"
]
resource_manifests = [
for output in module.manifests[*] : output
if !strcontains(output.manifest.apiVersion, "lukerops.com")
]
}
module "custom_resource_definitions" {
source = "./CustomResourceDefinition"
count = length(local.internal_manifests)
path = local.internal_manifests[count.index].path
manifest = local.internal_manifests[count.index].manifest
}
module "resources" {
source = "./resourceValidation"
count = length(local.resource_manifests)
path = local.resource_manifests[count.index].path
manifest = local.resource_manifests[count.index].manifest
custom_resource_definitions = module.custom_resource_definitions[*].schema
}