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

Unable to fetch all attachments using data "oci_core_drg_attachments" #2286

Open
cindyteng opened this issue Jan 28, 2025 · 1 comment
Open
Labels
bug In-Progress Terraform Team is working on the reproduce & fix

Comments

@cindyteng
Copy link

cindyteng commented Jan 28, 2025

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 v1.9.8 on windows_386 and Provider Version oracle/oci v6.23.0

Affected Resource(s): oci_core_drg_attachments

Terraform Configuration Files

terraform {
  required_providers {
    oci = {
      source = "oracle/oci"
    }
  }
}

data "oci_core_drg_attachments" "test_drg_attachments" {
    #Required
    compartment_id = "ocid1.compartment.oc1..<remaining_char_for_id_here>"
}
output "drg_attachment" {
    value = data.oci_core_drg_attachments.test_drg_attachments.drg_attachments
}

Output

drg_attachment = tolist([
  {
    "compartment_id" = "ocid1.compartment.oc1..<remaining_char_for_id_here>"
    "defined_tags" = tomap({})
    "display_name" = "iad-vcn-attachment-01"
    "drg_id" = "ocid1.drg.oc1.iad.<remaining_char_for_id_here>"
    "drg_route_table_id" = "ocid1.drgroutetable.oc1.iad.<remaining_char_for_id_here>"   
    "export_drg_route_distribution_id" = ""
    "freeform_tags" = tomap({})
    "id" = "ocid1.drgattachment.oc1.<remaining_char_for_id_here>"
    "is_cross_tenancy" = false
    "network_details" = tolist([
      {
        "id" = "ocid1.vcn.oc1.iad.<remaining_char_for_id_here>"
        "ids" = tolist([])
        "ipsec_connection_id" = ""
        "route_table_id" = "ocid1.routetable.oc1.iad.<remaining_char_for_id_here>"      
        "transport_attachment_id" = ""
        "transport_only_mode" = false
        "type" = "VCN"
        "vcn_route_type" = "VCN_CIDRS"
      },
    ])
    "remove_export_drg_route_distribution_trigger" = false
    "route_table_id" = "ocid1.routetable.oc1.<remaining_char_for_id_here>"
    "state" = "ATTACHED"
    "time_created" = "2025-01-14 11:38:11.197 +0000 UTC"
    "vcn_id" = "ocid1.vcn.oc1.iad.<remaining_char_for_id_here>"
  },
  {
    "compartment_id" = "ocid1.compartment.oc1..<remaining_char_for_id_here>"
    "defined_tags" = tomap({})
    "display_name" = "iad-vcn-attachment-02"
    "drg_id" = "ocid1.drg.oc1.iad.<remaining_char_for_id_here>"
    "drg_route_table_id" = "ocid1.drgroutetable.oc1.iad.<remaining_char_for_id_here>"   
    "export_drg_route_distribution_id" = ""
    "freeform_tags" = tomap({})
    "id" = "ocid1.drgattachment.oc1.iad.<remaining_char_for_id_here>"
    "is_cross_tenancy" = false
    "network_details" = tolist([
      {
        "id" = "ocid1.vcn.oc1.iad.<remaining_char_for_id_here>"
        "ids" = tolist([])
        "ipsec_connection_id" = ""
        "route_table_id" = ""
        "transport_attachment_id" = ""
        "transport_only_mode" = false
        "type" = "VCN"
        "vcn_route_type" = "VCN_CIDRS"
      },
    ])
    "remove_export_drg_route_distribution_trigger" = false
    "route_table_id" = ""
    "state" = "ATTACHED"
    "time_created" = "2024-12-10 14:22:10.094 +0000 UTC"
    "vcn_id" = "ocid1.vcn.oc1.iad.<remaining_char_for_id_here>"
  },
])

Expected Behavior

All drg attachments within the same compartment should be in the output.

Actual Behavior

Only vcn attachments were fetched.

Steps to Reproduce

  1. Place the compartment ID as input for the data block oci_core_drg_attachments.
  2. terraform init
  3. terraform apply

Important Notes

We tried using oci cli to get all drg attachments using this command:
oci network drg get-all-drg-attachments --drg-id ocid1.drg.oc1.iad.<remaining_char_for_id_here>
https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.51.4/oci_cli_docs/cmdref/network/drg/get-all-drg-attachments.html
The output includes all attachments in the included drg id.

@cindyteng cindyteng added the bug label Jan 28, 2025
@tf-oci-pub tf-oci-pub added the In-Progress Terraform Team is working on the reproduce & fix label Jan 28, 2025
@tf-oci-pub
Copy link
Member

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix
Projects
None yet
Development

No branches or pull requests

2 participants