我正在尝试使用Terraform在Cisco ACI上创建EPG。EPG已创建,但尚未附加Leaf的接口。连接Leaf接口的terraform synthax为:
resource "aci_application_epg" "VLAN-616-EPG" {
...
relation_fv_rs_path_att = ["topology/pod-1/paths-103/pathep-[eth1/1]"]
...
}当我通过ACI web界面或REST API手动执行此操作时,它会起作用
发布于 2020-04-12 02:37:25
我不相信这已经实现了。如果您查看提供程序的代码,就会发现没有对该属性进行测试,我在EPG的示例中找到了这一行。这两件事都让我相信它还没有完成。此外,该特定项目需要使用VLAN/VXLAN或QinQ进行封装,因此,如果要工作,则需要包含该封装。
relation_fv_rs_path_att = ["testpathatt"] 也许你能做的最好的事情就是直接进行REST调用( terraform提供程序中的act_rest),或者使用Ansible提供程序来创建它(我正在研究这一点)。
发布于 2020-04-15 22:18:54
我请求思科支持,他们向我发送了以下解决方案:
resource "aci_application_epg" "terraform-epg" {
application_profile_dn = "${aci_application_profile.terraform-app.id}"
name = "TerraformEPG1"
}
resource "aci_rest" "epg_path_relation" {
path = "api/node/mo/${aci_application_epg.terraform-epg.id}.json"
class_name = "fvRsPathAtt"
content = {
"encap":"vlan-907"
"tDn":"topology/pod-1/paths-101/pathep-[eth1/1]"
}
}发布于 2020-07-23 03:31:56
最新提供程序版本的解决方案是这样做的:
data "aci_physical_domain" "physdom" {
name = "phys"
}
resource "aci_application_epg" "on_prem_epg" {
application_profile_dn = aci_application_profile.on_prem_app.id
name = "db"
relation_fv_rs_dom_att = [data.aci_physical_domain.physdom.id]
}
resource "aci_epg_to_domain" "rs_on_prem_epg_to_physdom" {
application_epg_dn = aci_application_epg.on_prem_epg.id
tdn = data.aci_physical_domain.physdom.id
}
resource "aci_epg_to_static_path" "leaf_101_eth1_23" {
application_epg_dn = aci_application_epg.on_prem_epg.id
tdn = "topology/pod-1/paths-101/pathep-[eth1/23]"
encap = "vlan-1100"
}https://stackoverflow.com/questions/60283744
复制相似问题