Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with resources containing Read-only (Computed) attributes when migrating to the new Terraform ACI provider which uses plugin framework (DCNE-266) #1307

Open
shrsr opened this issue Dec 4, 2024 · 0 comments
Labels
bug jira-sync Sync this issue to Jira

Comments

@shrsr
Copy link
Collaborator

shrsr commented Dec 4, 2024

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

APIC version and APIC Platform

  • all

Affected Resource(s)

All the resources consisting of read only (Computed) attributes.

Terraform Configuration Files

resource "aci_application_epg" "inherit_epg" {
  application_profile_dn = aci_application_profile.app_profile_for_epg.id
  name                   = "inherit_epg"
  description            = "epg to create relation sec_inherited"
  relation_fv_rs_node_att {
    node_dn              = "topology/pod-1/node-108"
    encap                = "vlan-100"
    description          = "this is desc for static leaf"
    deployment_immediacy = "lazy"
    mode                 = "regular"
  }
}

Debug Output

Panic Output

Expected Behavior

There should no change.

Actual Behavior

 aci_application_epg.inherit_epg will be updated in-place
  ~ resource "aci_application_epg" "inherit_epg" {
        id                                            = "uni/tn-test_tenant/ap-test_ap/epg-inherit_epg"
        name                                          = "inherit_epg"
      ~ pc_tag                                        = "16395" -> (known after apply)
        tags                                          = []
        # (53 unchanged attributes hidden)
    }

Steps to Reproduce

Use an older release of TF ACI ("2.15.0")

  1. terraform init
  2. terraform apply

Upgrade to the new provider

  1. terraform plan

Important Factoids

This issue is currently seen with configurations consisting of older attributes of type block.
Example ->

  relation_fv_rs_node_att {
    node_dn              = "topology/pod-1/node-108"
    encap                = "vlan-100"
    description          = "this is desc for static leaf"
    deployment_immediacy = "lazy"
    mode                 = "regular"
  }

Proposed fix: This issue is not seen if we populate the old type Block attributes with API returned values

References

  • #0000
@shrsr shrsr added bug jira-sync Sync this issue to Jira labels Dec 4, 2024
@github-actions github-actions bot changed the title Issue with resources containing Read-only (Computed) attributes when migrating to the new Terraform ACI provider which uses plugin framework Issue with resources containing Read-only (Computed) attributes when migrating to the new Terraform ACI provider which uses plugin framework (DCNE-266) Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug jira-sync Sync this issue to Jira
Projects
None yet
Development

No branches or pull requests

1 participant