Closed Leopol123 closed 2 years ago
@pavel-z1 - what do you think of this one?
I have phpIPAM version 1.4.2
phpIPAM API does not return information about gateway. Example:
curl -X GET http://localhost/api/terraform/subnets/cidr/10.10.1.0/24/ --header "token:*******" | jq
{
"code": 200,
"success": true,
"data": [
{
"id": "3",
"subnet": "10.10.1.0",
"mask": "24",
"sectionId": "1",
"description": "Customer 1",
"linked_subnet": null,
"firewallAddressObject": null,
"vrfId": "0",
"masterSubnetId": "2",
"allowRequests": "1",
"vlanId": "0",
"showName": "1",
"device": "0",
"permissions": "{\"3\":\"1\",\"2\":\"2\"}",
"pingSubnet": "0",
"discoverSubnet": "0",
"resolveDNS": "0",
"DNSrecursive": "0",
"DNSrecords": "0",
"nameserverId": "0",
"scanAgent": "0",
"customer_id": null,
"isFolder": "0",
"isFull": "0",
"tag": "2",
"threshold": "0",
"location": "0",
"editDate": "2020-06-30 18:51:16",
"lastScan": null,
"lastDiscovery": null,
"custom_CustomTestSubnets": ""
}
],
"time": 0.005
}
Seems phpIPAM has bugs, related to gateway:
Affected Resource(s)
phpipam_subnet data
Terraform Version: 1.1.9 Provider Version: 1.2.12 Ipam: 1.4.4
Issue: Get gateway_id the datasource using subnet_address/subnet_mask
Terraform code
Output:
Expected Behavior
Receive gateway_id for this subnet.
This is working using "description match" :
Output: