https://pulumi.com logo
#general
Title
# general
c

creamy-monkey-35142

12/31/2022, 3:54 AM
Hello, I’m working on Cloudflare at https://www.pulumi.com/registry/packages/cloudflare/api-docs/teamsrule/#teamsrulerulesettingsl4override and can I bypass
TeamsRuleRuleSettingsL4override
required variable `ip, port`since it’s optional from Cloudflare? and the same for
check_session
Copy code
"rule_settings": {
            "add_headers": {},
            "biso_admin_controls": {
                "dcp": false,
                "dcr": false,
                "dd": false,
                "dk": false,
                "dp": false,
                "du": false
            },
            "block_page_enabled": true,
            "block_reason": "",
            "check_session": null,
            "insecure_disable_dnssec_validation": false,
            "ip_categories": false,
            "l4override": null,
            "override_host": "",
            "override_ips": null
        },
also it’s required only when action is
override
and
filters
is
l4
, so if filters is other like dns then it’s optional
the context is I want pre-define a block as below to help other know which key/value should be added at here instead of check on document, and I will add something like
rules['biso_admin_controls']  = cloudflare.TeamsRuleRuleSettingsBisoAdminControlsArgs(**rules['biso_admin_controls'][0])
to convert from mapping to object
Copy code
"rule_settings": [
                {
                    "add_headers": {},
                    "biso_admin_controls": [],
                    "block_page_enabled": false,
                    "block_page_reason": "",
                    "check_session": [],
                    "insecure_disable_dnssec_validation": false,
                    "l4override": [],
                    "override_host": "",
                    "override_ips": [
                        "1.1.1.1"
                    ]
                }
nevermind, I’ll write a loop to remove key which have empty values