Skip to content

Unsupported attribute error when creating layer 2 port-channel #25

@tdorssers

Description

@tdorssers

Trying to apply this YAML results in an error:

nxos:
  devices:
    - name: Switch
      url: https://a.b.c.d
      configuration:
        interfaces:
          port_channels:
            - id: 3715
              port_channel_mode: active
              admin_state: true
              access_vlan: 3715
          ethernets:
            - id: 1/15
              admin_state: true
              access_vlan: 3715
              port_channel: 3715
│ Error: Unsupported attribute
│ 
│   on .terraform/modules/nxos/nxos_ospf.tf line 102, in resource "nxos_ospf_interface" "ospf_interface":
│  102:   for_each              = { for v in local.ospf_interfaces : v.key => v if v.ospf_process_name != null }
│ 
│ This object does not have an attribute named "ospf_process_name".

Changing v.ospf_process_name into try(v.ospf_process_name, null) will fix this and gives the next error:

│ Error: Unsupported attribute
│ 
│   on .terraform/modules/nxos/nxos_ospf.tf line 119, in resource "nxos_ospf_authentication" "ospf_authentication":
│  119:   for_each            = { for v in local.ospf_interfaces : v.key => v if v.ospf_authentication_type == "simple" || v.ospf_authentication_type == "md5" }
│ 
│ This object does not have an attribute named "ospf_authentication_type".

Which can be solved similarly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions