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

Potential lack of API for Manipulating "Template Groups" #52

Open
Almujalled opened this issue Jun 10, 2024 · 1 comment
Open

Potential lack of API for Manipulating "Template Groups" #52

Almujalled opened this issue Jun 10, 2024 · 1 comment

Comments

@Almujalled
Copy link

I have encountered a potential gap in the available resources. It appears that there is no API or Terraform resource available for manipulating "Template Groups" that are under "Provisioning Templates" and not to be confused with "CLI Template Groups".

I have attempted to debug the FortiManager CLI while creating a template group through the GUI, but I was unable to identify the URL for the corresponding endpoint.

Could you please confirm if my observation is correct? If there is indeed an endpoint for this operation, could you kindly point me to the correct URL or even better to the corresponding Terrafrom resource?

Here is a screenshot of the GUI where I am trying to create a template group:

Template Group GUI

I appreciate your assistance and look forward to your response.

Thank you.

@MaxxLiu22
Copy link

Hi @Almujalled ,

Thank you for bringing this issue to our attention. At the moment, we don't support that resource because the API team hasn't made it publicly available. I have submitted an internal ticket to request this information from them. As a temporary solution, we can use fortimanager_json_generic_api to address this need. Please let me know if you have any further questions or concerns.

resource "fortimanager_json_generic_api" "tfname" {
  json_content = <<JSON
{
    "method": "add",
    "params": [
        {
            "url": "pm/tmplgrp/adom/root",
            "data": [
                {
                    "name": "test",
                    "type": "tmplgrp",
                    "scope member": [],
                    "template group setting": {
                        "description": "",
                        "cliprofs": [],
                        "wtpprofs": [],
                        "fspprofs": [],
                        "fxtprofs": [],
                        "templates": []
                    }
                }
            ]
        }
    ]
}
JSON
}

Thanks,
Maxx

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

2 participants