cloudfoundry / terraform-provider-cloudfoundry

Terraform provider to manage Cloud Foundry resources using v3 APIs
https://registry.terraform.io/providers/cloudfoundry/cloudfoundry/latest
Apache License 2.0
6 stars 3 forks source link

[FEATURE] Add data sources for listing resources #17

Open lechnerc77 opened 2 weeks ago

lechnerc77 commented 2 weeks ago

What area do you want to see improved?

terraform provider

Is your feature request related to a problem? Please describe.

Currently only a read for one instance for a resource is available. However a list of available instances of a resource is not available as a data source.

Example: cloudfoundry_app is available as data source, but I cannot list all apps via cloudfoundry_apps

The corresponding API endpoints on CF side are available see e.g., https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#apps

Describe the solution you would like

Add data sources should support the fetching of a list of resources not only one dedicated resource.

Describe alternatives you have considered

n/a

Additional context

n/a

github-actions[bot] commented 2 weeks ago

Thanks for the feature request. We evaluate it and update the issue accordingly.

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

lechnerc77 commented 2 weeks ago

Here a list of data sources that should offer a list operation

Resource Proposed Name of Data Source Link to CF V3 API
Apps cloudfoundry_apps https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-apps
Domain cloudfoundry_domains https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-domains
Isolation Segment cloudfoundry_isolation_segments https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-isolation-segments
Orgs cloudfoundry_orgs https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-organizations
Org Quota cloudfoundry_org_quotas https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-organization-quotas
Role cloudfoundry_roles https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-roles
Routes cloudfoundry_routes https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-routes
Security Group cloudfoundry_security_groups https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-security-groups
Service cloudfoundry_services https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-service-offerings
Service Credential Binding cloudfoundry_service_credential_bindings https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-service-credential-bindings
Service Instance cloudfoundry_service_instances https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-service-instances
Space cloudfoundry_spaces https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-spaces
Space Quota cloudfoundry_space_quotas https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-space-quotas
Space Stack cloudfoundry_stacks <https://v3-apidocs.cloudfoundry.org/version/3.179.0/index.html#list-stacks >
lechnerc77 commented 2 weeks ago

For MTA see https://github.com/cloudfoundry/terraform-provider-cloudfoundry/issues/25