Terraform to export contracts in ACI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 01:23 AM
Please can someone point to resource group or attribute that can be used to export contracts in ACI for inter-vrf communication
- Labels:
-
Cisco ACI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 01:55 AM - edited 02-24-2021 01:56 AM
Hi @zaifisafi
I do not think there is already an existing resource for it, but you can use the aci_rest.
This is how the rest call looks like:
method: POST url: https://apic1/api/node/mo/uni/tn-destination_tenant/cif-exported_ctr_name.json payload: { "vzCPIf": { "attributes": { "dn": "uni/tn-destination_tenant/cif-exported_ctr_name", "name": "exported_ctr_name", "status": "created,modified" }, "children": [ { "vzRsIf": { "attributes": { "tDn": "uni/tn-source_tenant/source_tenant-ctr_name", "status": "created,modified" }, "children": [] } } ] } }
You can adapt the above data into the aci_rest: https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest
Stay safe,
Sergiu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:34 AM - edited 10-30-2023 11:35 AM
I know this is an old thread but I found the solution with the 'aci_imported_contract'.
resource "aci_imported_contract" "example" {
tenant_dn = aci_tenant.tenant_that_is_importing_contract.id
name = "name_of_imported_contract"
relation_vz_rs_if = aci_contract.exported_contract.id
}
