Mastercard / terraform-provider-restapi

A terraform provider to manage objects in a RESTful API
Other
808 stars 217 forks source link

do not require search_key and search_value #149

Open fawaf opened 3 years ago

fawaf commented 3 years ago

the data source can just return the full object and can be processed elsewhere in terraform config. use case is that i want to loop over some specific attribute/value of the entire array and use it in some way.

e.g.

[
  {
    "att1": {
      "name": "name1"
    }
  },
  {
    "att2": {
      "name": "name2"
    }
  }
]
DRuggeri commented 2 years ago

Hi, @fawaf - apologies for the super long delay getting back to you. Somehow I missed this issue when it was opened and it was marked read!

I'll need to think about this. The vision of the provider is to manage a single object/etc so the data source was constructed to support that kind of use case. Perhaps a new data source would be needed...

muresan commented 2 years ago

Maybe add data.restapi_objects (plural) that just does a fetch and store the result in the state?

kevcube commented 5 months ago

Bumping this - this would be great to have. I will use http provider in the meantime to grab unspecified data.