lord-kyron/terraform-provider-phpipam

Feature Request: Please implement new phpipam_scanagent data source (resource optional)

JonTheNiceGuy opened this issue · 3 comments

It would be useful to be able to look up the scan agent from the PHPIPAM service.

API endpoint is: /api/<API_NAME>/tools/scanagents/. e.g.

curl https://phpipam.example.org/api/terraform/tools/scanagents/ -H "token: DECAFBAD1234567890abcdefghijklmnopq"
{"code":200,"success":true,"data":[{"id":"1","name":"localhost","description":"Scanning from local machine","type":"direct","code":null,"last_access":"2023-06-08 09:00:00"},{"id":"2","name":"eu-west-1a","description":"Scanner for eu-west-1a","type":"mysql","code":"abcdefghijklmnopqrstuvwxyz123456","last_access":"2023-06-06 06:53:24"}],"time":0.004}

I personally am ambivalent about adding this as a resource too, but if it's not too much work, it could be useful.

In that case, the available fields would be name, description and type (one of "code" and "mysql" currently)

This is the duplicate of #75
PHPIMAP has tools controller that need to be created for PHPIPAM GO SDK and here.

Closing for long inactivity.