Juniper / terraform-provider-mist

Terraform Provider for Juniper Mist
https://registry.terraform.io/providers/Juniper/mist/latest
Apache License 2.0
3 stars 3 forks source link

Fix site_setting.gateway_mgmt.app_probing.custom_apps #34

Closed tmunzer closed 1 day ago

tmunzer commented 4 days ago

example of configuration done from the UI:

{
    "gateway_mgmt": {
        "app_probing": {
            "custom_apps": [
                {
                    "name": "test1",
                    "protocol": "http",
                    "app_type": "",
                    "key": "http://test.com/",
                    "hostnames": [
                        "http://test.com/"
                    ]
                },
                {
                    "name": "test2",
                    "protocol": "icmp",
                    "app_type": "",
                    "key": "1.2.3.4",
                    "hostnames": [
                        "1.2.3.4"
                    ],
                    "address": "1.2.3.4",
                    "packetSize": "123"
                },
                {
                    "name": "test3",
                    "protocol": "http",
                    "app_type": "",
                    "key": "https://test.com/",
                    "hostnames": [
                        "https://test.com/"
                    ]
                }
            ],
            "enabled": true
        }
    },
zbuchheit commented 4 days ago

is Name expected to be required in the latest release for CustomApp ? In my testing, I hit the following error

Property 'name' is missing in type '{ hostnames: string[]; protocol: string; url: string; }' but required in type 'SettingGatewayMgmtAppProbingCustomApp'.

tmunzer commented 4 days ago

Yes, I changed a bit how to configure it to make it simpler and being able to generate the configuration expected by Mist (which is a bit weird IMO). All the three fields are required:

The other fields are automatically generated by the Provider.

zbuchheit commented 4 days ago

ah got it, I will adjust the tests. Thanks!

zbuchheit commented 1 day ago

this can be closed given it was an intended change