oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
758 stars 680 forks source link

Documentation Error: data-sources/core-private-ips #1845

Open jstadt opened 1 year ago

jstadt commented 1 year ago

Community Note

Terraform Version and Provider Version

N/A - public documentation

Affected Resource(s)

"oci_core_private_ips" (data source)

See #1338 which originally describes this documentation error (still present) but appears to have been bulk-closed due to age.

Per https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/core_private_ips one example is

# Filter on private IP address and Subnet OCID
data "oci_core_private_ips" "test_private_ips_by_ip_address" {
    #Optional
    ip_address = var.private_ip_ip_address
    subnet_id = oci_core_subnet.test_subnet.id
    vlan_id = oci_core_vlan.test_vlan.id
    vnic_id = oci_core_vnic_attachment.test_vnic_attachment.id
}

In this example, the VNIC Attachment ID is provided as the vnic_id to the data source, but this will cause a GET failure against the vnics endpoint because a vnicattachment ID is provided.

Instead, the relevant line of the example should read:

    vnic_id = oci_core_vnic_attachment.test_vnic_attachment.vnic_id

per the attributes reference of https://registry.terraform.io/providers/hashicorp/oci/latest/docs/resources/core_vnic_attachment

tf-oci-pub commented 1 year ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.