Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portgroup problem still present (should be fixed in 1.4.6) #152

Open
pboertje opened this issue Nov 15, 2023 · 3 comments
Open

Portgroup problem still present (should be fixed in 1.4.6) #152

pboertje opened this issue Nov 15, 2023 · 3 comments

Comments

@pboertje
Copy link

pboertje commented Nov 15, 2023

The port group problem, available before version 1.4.6 seems still present.

Original issue in #132 (comment)

{
    "resource": {
      "fmc_port_objects": {
        "TCP-443": {
          "name": "TCP-443",
          "port": 443,
          "protocol": "TCP"
        }
      }
    }
  },
  {
    "resource": {
      "fmc_port_objects": {
        "TCP-80": {
          "name": "TCP-80",
          "port": 80,
          "protocol": "TCP"
        }
      }
    }
  },
  {
    "resource": {
      "fmc_port_group_objects": {
        "Web": {
          "name": "Web",
          "description": "Web poorten",
          "objects": [
            {
              "id": "${fmc_port_objects.TCP-443.id}",
              "type": "${fmc_port_objects.TCP-443.type}"
            },
            {
              "id": "${fmc_port_objects.TCP-80.id}",
              "type": "${fmc_port_objects.TCP-80.type}"
            }
          ]
        }
      }
    }
  }
╷
│ Error: unable to create port group object
│ 
│   with fmc_port_group_objects.Web,
│   on fmcObjects.tf.json line 76, in [6].resource.fmc_port_group_objects.Web:
│   76:         }
│ 
│ getting port group objects: https://10.192.13.100/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/object/portobjectgroups?limit=1000 - wrong status code: 400, error category:
│ FRAMEWORK, error severity: ERROR, error messages: [{Invalid query parameter for the POST operation.}]
╵
@mike-guy
Copy link

mike-guy commented Mar 28, 2024

Same issue for me - blocking planned client work.

Testing using dCloud on FMC version 7.2.0 (build 82)

@mxkrzak
Copy link

mxkrzak commented Jun 14, 2024

@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)
POST method seems to not support limit

@mxkrzak
Copy link

mxkrzak commented Jun 17, 2024

there is yet another issue related to that, in datasource fmc_port_group_object is working incorrectly when there are more than 25 groups in FMC, this is comes from the fact that function GetFmcPortGroupObjectByName does not take into consideration paging or returned objects limits. By default GetFmcPortGroupObjectByName returns 25 objects so something like limit=1000 would be required at least

tomvrugt added a commit to tomvrugt/terraform-provider-fmc that referenced this issue Jul 5, 2024
@tomvrugt tomvrugt mentioned this issue Jul 5, 2024
bsv9 pushed a commit to bsv9/terraform-provider-fmc that referenced this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants