<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ACI / Terraform error: unknown property value in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/aci-terraform-error-unknown-property-value/m-p/4432241#M84</link>
    <description>&lt;P&gt;Hi *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a rookie trying to get TF and ACI working - I've been trying to get my head around this for a cpuple of hours now and am still stuck. Maybe someone has an idea how to solve this error and point me into the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of servers that should be connected to their leafs (1201, 1202), going with a map holding all the details about the servers seemed to be a good idea to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my variables.tf looks like this (extracted the interesting bits):&lt;/P&gt;&lt;PRE&gt;variable "MAP_leaf_interface_profiles" {&lt;BR /&gt; type = map(any)&lt;BR /&gt; default = {&lt;BR /&gt;  "IP_LEAF-1201" = { name="IP_LEAF-1201", name_alias="", description="IP_LEAF-1201"}&lt;BR /&gt;  "IP_LEAF-1202" = { name="IP_LEAF-1202", name_alias="", description="IP_LEAF-1202"}&lt;BR /&gt;  "IP_LEAF-2401" = { name="IP_LEAF-2401", name_alias="", description="IP_LEAF-2401"}&lt;BR /&gt;  "IP_LEAF-2402" = { name="IP_LEAF-2402", name_alias="", description="IP_LEAF-2402"}&lt;BR /&gt;  "IP_LEAF-1201-1202" = { name="IP_LEAF-1201-1202", name_alias="", description="IP_LEAF-1201-1202"}&lt;BR /&gt;  "IP_LEAF-2401-2402" = { name="IP_LEAF-2401-2402", name_alias="", description="IP_LEAF-2401-2402"}&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;variable "MAP_VxRail_hostnames-TEST" {&lt;BR /&gt; type = map(any)&lt;BR /&gt; default = {&lt;BR /&gt; "XX123456789012-1201" = { hostname="XX123456789012", dc_location="DC1", VPC_PRD_DATA_interface="eth1/25", VPC_PRD_DATA_IP_tdn="uni/infra/accportprof-IP_LEAF-1201", VPC_PRD_DATA_IP="IP_LEAF-1201"},&lt;BR /&gt; "XX123456789012-1202" = { hostname="XX123456789012", dc_location="DC1", VPC_PRD_DATA_interface="eth1/25", VPC_PRD_DATA_IP_tdn="uni/infra/accportprof-IP_LEAF-1202", VPC_PRD_DATA_IP="IP_LEAF-1202"}&lt;BR /&gt; }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;I am able to create the interface profiles "IP_LEAF-XXXX" with this snippet just fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;resource "aci_leaf_interface_profile" "IP_LEAF-Profiles" {&lt;BR /&gt; for_each = var.MAP_leaf_interface_profiles&lt;BR /&gt;  description = each.value.description&lt;BR /&gt;  name = each.value.name&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;As a next step I would like to create the acces_port_selector for each server with this piece of code:&lt;/P&gt;&lt;PRE&gt;resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN" {&lt;BR /&gt; for_each = var.MAP_VxRail_hostnames-TEST&lt;BR /&gt;  name = "IS_${each.value.dc_location}-PRD_VxRail-DATA-${each.key}"&lt;BR /&gt;  leaf_interface_profile_dn = "aci_leaf_interface_profile.IP_LEAF-Profiles.${each.value.VPC_PRD_DATA_IP}.id"&lt;BR /&gt;  description = "${each.value.hostname}"&lt;BR /&gt;  access_port_selector_type = "range"&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;which is failing big time with the following error:&lt;/P&gt;&lt;PRE&gt;│ Error: unknown property value aci_leaf_interface_profile.IP_LEAF-Profiles.IP_LEAF-1201.id/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1201-typ-range, name dn, class infraHPortS [(Dn0)] Dn0=,&lt;BR /&gt;│&lt;BR /&gt;│ with aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"],&lt;BR /&gt;│ on main.tf line 67, in resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN":&lt;BR /&gt;│ 67: resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN" {&lt;BR /&gt;│&lt;/PRE&gt;&lt;P&gt;However when changing the following line (like hard-coding the tdn)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;leaf_interface_profile_dn = "${each.value.VPC_PRD_DATA_IP_tdn}"&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;everything just works fine:&lt;/P&gt;&lt;PRE&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1202"]: Creating...&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"]: Creating...&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"]: Creation complete after 1s [id=uni/infra/accportprof-IP_LEAF-1201/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1201-typ-range]&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1202"]: Creation complete after 1s [id=uni/infra/accportprof-IP_LEAF-1202/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1202-typ-range]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to fix this? I would like to avoid using the tDN in the map. Or is there even a better approach on doing this?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2021 12:28:21 GMT</pubDate>
    <dc:creator>Lennart Jung</dc:creator>
    <dc:date>2021-07-13T12:28:21Z</dc:date>
    <item>
      <title>ACI / Terraform error: unknown property value</title>
      <link>https://community.cisco.com/t5/controllers/aci-terraform-error-unknown-property-value/m-p/4432241#M84</link>
      <description>&lt;P&gt;Hi *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a rookie trying to get TF and ACI working - I've been trying to get my head around this for a cpuple of hours now and am still stuck. Maybe someone has an idea how to solve this error and point me into the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of servers that should be connected to their leafs (1201, 1202), going with a map holding all the details about the servers seemed to be a good idea to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my variables.tf looks like this (extracted the interesting bits):&lt;/P&gt;&lt;PRE&gt;variable "MAP_leaf_interface_profiles" {&lt;BR /&gt; type = map(any)&lt;BR /&gt; default = {&lt;BR /&gt;  "IP_LEAF-1201" = { name="IP_LEAF-1201", name_alias="", description="IP_LEAF-1201"}&lt;BR /&gt;  "IP_LEAF-1202" = { name="IP_LEAF-1202", name_alias="", description="IP_LEAF-1202"}&lt;BR /&gt;  "IP_LEAF-2401" = { name="IP_LEAF-2401", name_alias="", description="IP_LEAF-2401"}&lt;BR /&gt;  "IP_LEAF-2402" = { name="IP_LEAF-2402", name_alias="", description="IP_LEAF-2402"}&lt;BR /&gt;  "IP_LEAF-1201-1202" = { name="IP_LEAF-1201-1202", name_alias="", description="IP_LEAF-1201-1202"}&lt;BR /&gt;  "IP_LEAF-2401-2402" = { name="IP_LEAF-2401-2402", name_alias="", description="IP_LEAF-2401-2402"}&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;variable "MAP_VxRail_hostnames-TEST" {&lt;BR /&gt; type = map(any)&lt;BR /&gt; default = {&lt;BR /&gt; "XX123456789012-1201" = { hostname="XX123456789012", dc_location="DC1", VPC_PRD_DATA_interface="eth1/25", VPC_PRD_DATA_IP_tdn="uni/infra/accportprof-IP_LEAF-1201", VPC_PRD_DATA_IP="IP_LEAF-1201"},&lt;BR /&gt; "XX123456789012-1202" = { hostname="XX123456789012", dc_location="DC1", VPC_PRD_DATA_interface="eth1/25", VPC_PRD_DATA_IP_tdn="uni/infra/accportprof-IP_LEAF-1202", VPC_PRD_DATA_IP="IP_LEAF-1202"}&lt;BR /&gt; }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;I am able to create the interface profiles "IP_LEAF-XXXX" with this snippet just fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;resource "aci_leaf_interface_profile" "IP_LEAF-Profiles" {&lt;BR /&gt; for_each = var.MAP_leaf_interface_profiles&lt;BR /&gt;  description = each.value.description&lt;BR /&gt;  name = each.value.name&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;As a next step I would like to create the acces_port_selector for each server with this piece of code:&lt;/P&gt;&lt;PRE&gt;resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN" {&lt;BR /&gt; for_each = var.MAP_VxRail_hostnames-TEST&lt;BR /&gt;  name = "IS_${each.value.dc_location}-PRD_VxRail-DATA-${each.key}"&lt;BR /&gt;  leaf_interface_profile_dn = "aci_leaf_interface_profile.IP_LEAF-Profiles.${each.value.VPC_PRD_DATA_IP}.id"&lt;BR /&gt;  description = "${each.value.hostname}"&lt;BR /&gt;  access_port_selector_type = "range"&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;which is failing big time with the following error:&lt;/P&gt;&lt;PRE&gt;│ Error: unknown property value aci_leaf_interface_profile.IP_LEAF-Profiles.IP_LEAF-1201.id/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1201-typ-range, name dn, class infraHPortS [(Dn0)] Dn0=,&lt;BR /&gt;│&lt;BR /&gt;│ with aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"],&lt;BR /&gt;│ on main.tf line 67, in resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN":&lt;BR /&gt;│ 67: resource "aci_access_port_selector" "IS_FRx-PRD_VxRail-DATA-SN" {&lt;BR /&gt;│&lt;/PRE&gt;&lt;P&gt;However when changing the following line (like hard-coding the tdn)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;leaf_interface_profile_dn = "${each.value.VPC_PRD_DATA_IP_tdn}"&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;everything just works fine:&lt;/P&gt;&lt;PRE&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1202"]: Creating...&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"]: Creating...&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1201"]: Creation complete after 1s [id=uni/infra/accportprof-IP_LEAF-1201/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1201-typ-range]&lt;BR /&gt;aci_access_port_selector.IS_FRx-PRD_VxRail-DATA-SN["XX123456789012-1202"]: Creation complete after 1s [id=uni/infra/accportprof-IP_LEAF-1202/hports-IS_FR2-PRD_VxRail-DATA-XX123456789012-1202-typ-range]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to fix this? I would like to avoid using the tDN in the map. Or is there even a better approach on doing this?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 12:28:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-terraform-error-unknown-property-value/m-p/4432241#M84</guid>
      <dc:creator>Lennart Jung</dc:creator>
      <dc:date>2021-07-13T12:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: ACI / Terraform error: unknown property value</title>
      <link>https://community.cisco.com/t5/controllers/aci-terraform-error-unknown-property-value/m-p/4437947#M85</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello Lennart!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;We opened a &lt;A href="https://community.cisco.com/t5/discussions-de-data-center/d%C3%A9couvrez-cisco-aci-avec-francesco-molino-et-apprenez-en/m-p/4437615#M107" target="_self"&gt;forum in French&lt;/A&gt; with an ACI expert &amp;amp; VIP of the community&amp;nbsp;&lt;A href="https://community.cisco.com/t5/user/viewprofilepage/user-id/321306" target="_self"&gt;Francesco Molino&lt;/A&gt; who answered your question. Please validate his reply as "accepted solution" in our &lt;A href="https://community.cisco.com/t5/discussions-de-data-center/d%C3%A9couvrez-cisco-aci-avec-francesco-molino-et-apprenez-en/m-p/4437615#M107" target="_self"&gt;forum&lt;/A&gt; and here!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/166565"&gt;@Lennart Jung&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can replace the following line in your aci_access_port_selector resource&lt;/P&gt;
&lt;PRE&gt;leaf_interface_profile_dn = "aci_leaf_interface_profile.IP_LEAF-Profiles.${each.value.VPC_PRD_DATA_IP}.id"&lt;/PRE&gt;
&lt;P&gt;by&lt;/P&gt;
&lt;PRE&gt;leaf_interface_profile_dn = aci_leaf_interface_profile.IP_LEAF-Profiles[each.value.VPC_PRD_DATA_IP].id&lt;/PRE&gt;
&lt;P&gt;It should work depending on what you're trying to achieve as a goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 17:06:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-terraform-error-unknown-property-value/m-p/4437947#M85</guid>
      <dc:creator>Jimena Saez</dc:creator>
      <dc:date>2021-07-23T17:06:08Z</dc:date>
    </item>
  </channel>
</rss>

