lord-kyron / terraform-provider-phpipam

Terrform provider for PHPIPAM
https://registry.terraform.io/providers/lord-kyron/phpipam/latest
Apache License 2.0
54 stars 30 forks source link

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

Closed JonTheNiceGuy closed 5 months ago

JonTheNiceGuy commented 1 year ago

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)

lord-kyron commented 1 year ago

@pavel-z1

pavel-z1 commented 1 year ago

This is the duplicate of https://github.com/lord-kyron/terraform-provider-phpipam/issues/75 PHPIMAP has tools controller that need to be created for PHPIPAM GO SDK and here.

lord-kyron commented 5 months ago

Closing for long inactivity.