Skip to content

allow_existing_on_create conflicts with auto-created objects (DCNE-565)Β #1394

@danischm

Description

@danischm

Community Note

  • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

In some instances APIC "auto-creates" some of the objects in the backend, eg. when creating a new interface policy group (infraAccGrp) it automatically creates child objects like infraRsCdpIfPol. When allow_existing_on_create is set to false you can no longer set/update those placeholder objects.

One possible solution could be to introduce an allow_existing_on_create resource level flag in addition to the global flag, allowing one to selectively relax the requirement for those instances.

New or Affected Resource(s) + ACI Class(es):

  • aci_rest_managed

APIC version and APIC Platform

all versions

Potential Terraform Configuration

provider "aci" {
  allow_existing_on_create = false
}

resource "aci_rest_managed" "infraAccGrp" {
  dn         = "uni/infra/funcprof/accportgrp-IPG1"
  content = {
    name      = "IPG1"
  }
}

resource "aci_rest_managed" "infraRsCdpIfPol" {
  dn         = "${aci_rest_managed.infraAccGrp.dn}/rscdpIfPol"
  class_name = "infraRsCdpIfPol"
  content = {
    tnCdpIfPolName = "CDP1"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions