CiscoDevNet / terraform-provider-fmc

Terraform Provider for FMC
https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs
Mozilla Public License 2.0
16 stars 31 forks source link

Modified to Correctly use API Call for POST/GET Functions for Nwk Grp Objs and Prt Grp Objs #120

Closed jellyBeanz2019 closed 1 year ago

jellyBeanz2019 commented 1 year ago

This MR does 2 things: 1) The API call being used to "GET" network group objects needed to be tweaked. The function is trying to get the resource by the resource's name but the query was pulling a full list of all the types requested. This code updates the call to use the name attribute already collected by the function. 2) Line 51 of the port group objects file was correctly updated to return a full set of data, but the increased limit piece was causing the "POST" function to fail. Line 52 copies line 51 but removes the limit so the "POST" function works correctly. Line 52 is then used in conjunction with other variables received by the function to correctly create ("POST") a new port object group on line 57 which now includes the correct url needed to interact with the API.