netascode / terraform-provider-fmc

Mozilla Public License 2.0
2 stars 7 forks source link

Add `fmc_sgt` resource and data source #93

Closed danischm closed 1 month ago

danischm commented 1 month ago

API: /api/fmc_config/v1/domain/{domainUUID}/object/securitygrouptags

Note: looks like not all API endpoints are documented in 7.2 apidocs, though existing provider indicates those exist

jabielecki commented 1 month ago

Closing for now, can be re-opened after verification.

Existing provider code:

type SecurityGroupTag struct {
    Type        string `json:"type"`
    Name        string `json:"name"`
    Description string `json:"description"`
    Tag         string `json:"tag"`
}

However on my lab its always HTTP 405:


2024/07/17 15:16:13 [DEBUG] HTTP Request: POST, https://x/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/object/securitygrouptags, {
                        "name": "sgt_7",
                        "tag": "42",
                        "description": "My SGT",
                        "type": "SecurityGroupTag"
                }
2024/07/17 15:16:14 [DEBUG] HTTP Response: {"error":{"category":"FRAMEWORK","messages":[{"description":"Read only resource."}],"severity":"ERROR"}}
jabielecki commented 1 month ago

To start working on this, it would be best to upgrade CI/lab to 7.4.1 and Michal is recommending such approach.