Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new resource and data-source for External EPG contracts - Classes: "fvRsProv" "fvRsCons" #1023

Closed
cla-azzarello opened this issue Mar 8, 2023 · 6 comments
Assignees

Comments

@cla-azzarello
Copy link

API Information:
Class: "fvRsProv"
Distinguised Name: "uni/tn-${aci_tenant}/out-${aci_l3_outside}/instP-${aci_external_network_instance_profile}/rsprov-${aci_contract}"

Class: "fvRsCons"
Distinguised Name: "uni/tn-${aci_tenant}/out-${aci_l3_outside}/instP-${aci_external_network_instance_profile}/rscons-${aci_contract}"

GUI Location:
Tenants > {tenant} > Networking > L3Outs > {l3out} > External EPGs > {ext_epg}: Contracts

@lhercot
Copy link
Member

lhercot commented Mar 9, 2023

Hi @cla-azzarello

You can configure the contracts by using the relation_fv_rs_prov and relation_fv_rs_cons in https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/external_network_instance_profile
If you want a separate resource you can also use https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/epg_to_contract and pass the DN / id of the external EPG in the application_epg_dn attribute.

@lhercot lhercot self-assigned this Mar 9, 2023
@cla-azzarello
Copy link
Author

Hi @lhercot,

Thanks for your answer.

I had tried using the aci_epg_to_contract resource, but something went wrong.

After applying the configuration, if I ran a terraform plan without any changes, the contracts were removed.

I'm trying to reproduce the problem, but I can't. There was probably something wrong in my status file. It's strange, because I had also tried removing every file except the tf files and reinitializing the plan and the problem remained. I can't explain it.

Sorry for the trouble and thank you.

@lhercot
Copy link
Member

lhercot commented Mar 10, 2023

Thanks for the response. I will be closing this issue as you mentioned it is solved.

@lhercot lhercot closed this as completed Mar 10, 2023
@cla-azzarello
Copy link
Author

Thank you @lhercot .

I just would suggest to mention this use case in the documentaion on Terraform Registry portal.

The aci_epg_to_contract resource and datasource are documented only in "Application Management" section and the Example Usage states:

application_epg_dn = aci_application_epg.demo.id

It is not clear that this is usable for external EPGs too.

No mention on it neither on the L3Out section.

@lhercot lhercot reopened this Mar 10, 2023
@lhercot
Copy link
Member

lhercot commented Mar 10, 2023

Good point. Let me reopen it and find a way to fix that documentation part.

@akinross
Copy link
Collaborator

akinross commented Jul 3, 2024

Hi @cla-azzarello,

The PR #1223 includes generic resources for fvRsCons and fvRsProv. These resources will be available in the next release. See below links for a preview of the resource documentation.

  1. https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/docs/resources/relation_to_consumed_contract.md
  2. https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/docs/resources/relation_to_provided_contract.md

I will close this issue, feel free to reach in case you have any additional questions.

@akinross akinross closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants