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

Enable Human-Readable Resource Lookups in OCI Terraform Data Sources #2290

Open
prashantkalkar opened this issue Feb 8, 2025 · 0 comments
Open

Comments

@prashantkalkar
Copy link

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

Description

Currently, the OCI Terraform provider’s data sources primarily require the use of OCIDs to lookup resources, which can make Terraform configurations less readable and more error-prone. This feature request proposes enhancing data sources to support resource lookups based on human-readable properties such as resource names. Using names (and other relevant properties) would simplify configuration, improve clarity, and reduce mistakes that can arise when managing long and complex OCIDs.

Enhancements could include:

  • Allowing users to specify resource names (e.g., for VCNs, subnets, etc.) instead of only OCIDs.
  • Supporting additional human-readable attributes to uniquely identify resources.
  • Improving error messages and documentation when a lookup based on these properties fails.

New or Affected Resource(s)

  • Data sources such as:
    • oci_core_vcn
    • oci_core_subnet
    • Other OCI data sources where resource lookups are performed using OCIDs

Potential Terraform Configuration

data "oci_core_vcn" "example" {
  name = "my_vcn_name"
  # Optionally, additional parameters may be added for disambiguation
}

data "oci_core_subnet" "example" {
  vcn_name = "my_vcn_name"  # Lookup VCN by name instead of OCID
  name     = "my_subnet_name"
  # Additional parameters may be required to ensure a unique match
}

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant