Skip to content

oci_core_drg_route_distribution_statement does not store match_criteria.attachment_type in the statefile #2410

@jirizemanek

Description

@jirizemanek

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 "me too" comments, 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 and Provider Version

Terraform v1.5.7
on linux_amd64

  • provider registry.terraform.io/hashicorp/oci v7.7.0

Affected Resource(s)

  • oci_core_drg_route_distribution_statement

Expected Behavior

After the first apply the next apply should not try to apply the same configuration again

Actual Behavior

plan/apply action tries to update current configuration again because it does not know that it is already set, because in the statefile this information is missing:

  ~ resource "oci_core_drg_route_distribution_statement" "drg_rds" {
        id                        = "redacted"
        # (3 unchanged attributes hidden)

      ~ match_criteria {
          + attachment_type   = "REMOTE_PEERING_CONNECTION"
            # (2 unchanged attributes hidden)
        }
    }

In the state file the attachment_type is set to "":

        "match_criteria": [
          {
            "attachment_type": "",
            "drg_attachment_id": "redacted",
            "match_type": "DRG_ATTACHMENT_ID"
          }
        ],

Steps to Reproduce

Just add oci_core_drg_route_distribution_statement resource with match_criteria.attachment_type, apply and try plan again.

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