-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tf
More file actions
41 lines (34 loc) · 848 Bytes
/
main.tf
File metadata and controls
41 lines (34 loc) · 848 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
41
terraform {
required_providers {
aci = {
source = "CiscoDevNet/aci"
version = ">= 2.6.1"
}
local = {
source = "hashicorp/local"
version = ">= 2.3.0"
}
}
cloud {
organization = "CLAMS23"
workspaces {
name = "DEVNET-2097-Demo"
}
}
}
module "merge" {
source = "netascode/nac-merge/utils"
version = "0.1.2"
yaml_strings = [for file in fileset(path.module, "data/*.yaml") : file(file)]
}
module "tenant" {
source = "netascode/nac-tenant/aci"
version = "0.4.2"
for_each = { for tenant in try(module.merge.model.apic.tenants, []) : tenant.name => tenant }
model = module.merge.model
tenant_name = each.value.name
}
resource "local_sensitive_file" "defaults" {
content = yamlencode(module.merge.defaults)
filename = "${path.module}/defaults.yaml"
}