Closed mmaciejc closed 10 months ago
May I know which FMC version you are working with. I ran some tests on 7.3 and it worked fine. Also when I ran the example config script that you provided above, I encountered getting port group objects:
wrong status code: 400, error │ category: FRAMEWORK, error severity: ERROR, error messages: [{The group should have atleast one object reference or a literal as override is not enabled.}]
This was expected because there aren't any objects being provided in the group. But I didn't get the "Invalid query param", so it might be an issue with the version.
I tested it on the 7.2.5
My config:
resource "fmc_port_objects" "ProtocolPortObject1" {
name = "ProtocolPortObject1"
port = "8007"
protocol = "TCP"
}
resource "fmc_port_group_objects" "PortObjectGroup1" {
name = "PortObjectGroup1"
description = "Terraform port object group"
objects {
id = fmc_port_objects.ProtocolPortObject1.id
type = fmc_port_objects.ProtocolPortObject1.type
}
depends_on = [
fmc_port_objects.ProtocolPortObject1
]
}
I see, this happens to be a minor bug in an api call which is already patched. It will be merged from develop into the main branch soon.
This should be fixed in version 1.4.6 which will become available in the next hour.
This should be fixed in version 1.4.6 which will become available in the next hour.
@jeroenwittock can you confirm the fix is inside 1.4.6? Currently using 1.4.6 to use the port groups, but the issue still exists.
@jeroenwittock fix still not in 1.4.6 nor 1.4.8 I have found in develop branch there is correct URL in line 51
url := fmt.Sprintf("%s/object/portobjectgroups", v.domainBaseURL)
however main has URL that causes the issue
url := fmt.Sprintf("%s/object/portobjectgroups?limit=1000", v.domainBaseURL)
Portgroup cannot be created.
Example config: resource "fmc_port_group_objects" "portgroup" { name = "API_PortGroup" }
wrong status code: 400, error │ category: FRAMEWORK, error severity: ERROR, error messages: [{Invalid query parameter for the POST operation.}]