terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

data source in oci_network_load_balancer_network_load_balancers should have attribute reference items before accessing any attributes internal to network_load_balancer_collection

Open hjain28 opened this issue 2 months ago • 2 comments

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

Affected Resource(s)

data "oci_network_load_balancer_network_load_balancers" "name" { #Required compartment_id = abc display_name = "xyz" state = "ACTIVE" }

for ip address to refer it should be data.oci_network_load_balancer_network_load_balancers.network_load_balancers_ips.network_load_balancer_collection[0].items[*].ip_addresses

rather than data.oci_network_load_balancer_network_load_balancers.network_load_balancers_ips.network_load_balancer_collection[0].ip_addresses

items attribute was missing

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. 
# Please remove any sensitive information from configuration files before sharing them. 

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

hjain28 avatar May 03 '24 06:05 hjain28

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

tf-oci-pub avatar May 03 '24 06:05 tf-oci-pub

@hjain28 , I want to understand the concern here:

  1. data.oci_network_load_balancer_network_load_balancers.network_load_balancers_ips.network_load_balancer_collection[0].ip_addresses is this working and you are suggesting that structure is incorrect? why do you think that structure is incorrect?
  2. data.oci_network_load_balancer_network_load_balancers.network_load_balancers_ips.network_load_balancer_collection[0].ip_addresses with this ip address fetch is failing?

aseerapu avatar May 03 '24 10:05 aseerapu