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

do not require search_key and search_value

Open fawaf opened this issue 4 years ago • 4 comments

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"
    }
  }
]

fawaf avatar Sep 10 '21 00:09 fawaf

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...

DRuggeri avatar Apr 07 '22 20:04 DRuggeri

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

muresan avatar Jun 30 '22 14:06 muresan

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

kevcube avatar May 09 '24 13:05 kevcube