QuestionQ379

Infrastructure and Automation

Drag the code snippets below into the Terraform code boxes to create a new application profile and EPG. Not every code snippet is used.

Drag & Drop
provider
resource
aci_tenant.id
aci_application_profile
aci_application_epg
aci_tenant.aci_tenant.id
 "aci_tenant" "aci_tenant" {
  name        = var.aci_tenant
}

resource "aci_application_profile" "myWebsite" {
  tenant_dn = 
  name      = "my_website"
}

resource "" "web" {
  application_profile_dn = aci_application_profile.myWebsite.id
  name                   = "web"
  name_alias             = "web"
  description            = "this is the web epg created by terraform"

  flood_on_encap         = local.flood_on_encap
  fwd_ctrl               = local.fwd_ctrl
  shutdown               = local.shutdown
}
Explanation

Terraform resource blocks begin with the resource keyword. An ACI application profile requires the distinguished name of its parent tenant; a tenant resource exports this as id, referenced here as aci_tenant.aci_tenant.id. An application EPG is created with the aci_application_epg resource, whose application_profile_dn is the parent application profile’s distinguished name. The provider documentation for the matching resource version shows application_profile_dn and the EPG attributes used here.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!