-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepg.tf
101 lines (86 loc) · 3.18 KB
/
epg.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
Creating EPG
*/
# EPG
resource "aci_application_epg" "epg_one_provider" {
application_profile_dn = aci_application_profile.application_profile.id
name = local.first_epg
relation_fv_rs_bd = aci_bridge_domain.web_server_bd.id
count = local.provider_epg == local.first_epg ? 1 : 0
relation_fv_rs_prov = [aci_contract.contract.id]
lifecycle {
ignore_changes = all
}
}
resource "aci_application_epg" "epg_two_consumer" {
application_profile_dn = aci_application_profile.application_profile.id
name = local.second_epg
relation_fv_rs_bd = aci_bridge_domain.web_server_bd.id
count = local.provider_epg == local.first_epg ? 1 : 0
relation_fv_rs_cons = [aci_contract.contract.id]
lifecycle {
ignore_changes = all
}
}
resource "aci_application_epg" "epg_two_provider" {
application_profile_dn = aci_application_profile.application_profile.id
name = local.second_epg
relation_fv_rs_bd = aci_bridge_domain.web_server_bd.id
count = local.provider_epg != local.first_epg ? 0 : 1
relation_fv_rs_prov = [aci_contract.contract.id]
lifecycle {
ignore_changes = all
}
}
resource "aci_application_epg" "epg_one_consumer" {
application_profile_dn = aci_application_profile.application_profile.id
name = local.first_epg
relation_fv_rs_bd = aci_bridge_domain.web_server_bd.id
count = local.provider_epg != local.first_epg ? 0 : 1
relation_fv_rs_cons = [aci_contract.contract.id]
lifecycle {
ignore_changes = all
}
}
resource "aci_epg_to_static_path" "second_epg_vlan_path_pro" {
application_epg_dn = aci_application_epg.epg_two_provider[0].id
tdn = local.second_path_name
annotation = "annotation"
encap = local.second_epg_vlan
count = local.provider_epg != local.first_epg ? 0 : 1
lifecycle {
ignore_changes = all
}
}
resource "aci_epg_to_static_path" "second_epg_vlan_path_cons" {
application_epg_dn = aci_application_epg.epg_two_consumer[0].id
tdn = local.second_path_name
annotation = "annotation"
encap = local.second_epg_vlan
count = local.provider_epg == local.first_epg ? 1 : 0
lifecycle {
ignore_changes = all
}
}
resource "aci_epg_to_static_path" "first_epg_vlan_path_pro" {
application_epg_dn = aci_application_epg.epg_one_provider[0].id
tdn = local.first_path_name
# tdn = "${topology / pod-1 / paths-local.leaf_one / pathep-[eth1/18]"
annotation = "annotation"
encap = local.first_epg_vlan
count = local.provider_epg == local.first_epg ? 1 : 0
lifecycle {
ignore_changes = all
}
}
resource "aci_epg_to_static_path" "first_epg_vlan_path_cons" {
application_epg_dn = aci_application_epg.epg_one_consumer[0].id
tdn = local.first_path_name
# tdn = "${topology / pod-1 / paths-local.leaf_one / pathep-[eth1/18]"
annotation = "annotation"
encap = local.first_epg_vlan
count = local.provider_epg != local.first_epg ? 0 : 1
lifecycle {
ignore_changes = all
}
}