Skip to content

Import for mso_schema_template_contract imports deprecated attributes #390

@juchowan

Description

@juchowan

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

Terraform Version

1.13.4

MSO version

  • V 4.4

APIC version and APIC Platform for Site Level Resources

  • V 6.1

Affected Resource(s)

  • mso_schema_template_contract

Terraform Configuration Files

data "mso_site" "KACI-Site1" {
    name = "KACI-Site-1"
}

data "mso_schema" "SCHEMA1" {
    name = "SCHEMA1"
}

data "mso_schema_template" "template1" {
    schema_id = data.mso_schema.SCHEMA1.id
    name      = "template1"
}

resource "mso_schema_template_contract" "CONTRACT2" {
}

Debug Output

Panic Output

Expected Behavior

Running terraform import mso_schema_template_contract.CONTRACT2 66acd473551690c031be6448/templates/template1/contracts/CONTRACT2 should import only the supported attributes and filter_relationship

Actual Behavior

It imports every attribute, both filter_relationship and filter_relationships and directives which is deprecated

resource "mso_schema_template_contract" "CONTRACT2" {
    contract_name        = "CONTRACT2"
    description          = null
    directives           = [
        "log",
        "no_stats",
    ]
    display_name         = "CONTRACT2"
    filter_relationships = {
        "filter_name"          = "FILTER1"
        "filter_schema_id"     = "66acd473551690c031be6448"
        "filter_template_name" = "template1"
    }
    filter_type          = "bothWay"
    id                   = "66acd473551690c031be6448/templates/template1/contracts/CONTRACT2"
    priority             = "unspecified"
    schema_id            = "66acd473551690c031be6448"
    scope                = "context"
    target_dscp          = "unspecified"
    template_name        = "template1"

    filter_relationship {
        action               = "permit"
        directives           = [
            "log",
            "no_stats",
        ]
        filter_name          = "FILTER1"
        filter_schema_id     = "66acd473551690c031be6448"
        filter_template_name = "template1"
        filter_type          = "bothWay"
        priority             = "default"
    }
}

Steps to Reproduce

  1. terraform import mso_schema_template_contract.CONTRACT2 66acd473551690c031be6448/templates/template1/contracts/CONTRACT2

Important Factoids

References

  • #0000

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