DeviceSettingsPolicyArgs

data class DeviceSettingsPolicyArgs(val accountId: Output<String>? = null, val allowModeSwitch: Output<Boolean>? = null, val allowUpdates: Output<Boolean>? = null, val allowedToLeave: Output<Boolean>? = null, val autoConnect: Output<Int>? = null, val captivePortal: Output<Int>? = null, val default: Output<Boolean>? = null, val description: Output<String>? = null, val disableAutoFallback: Output<Boolean>? = null, val enabled: Output<Boolean>? = null, val excludeOfficeIps: Output<Boolean>? = null, val match: Output<String>? = null, val name: Output<String>? = null, val precedence: Output<Int>? = null, val serviceModeV2Mode: Output<String>? = null, val serviceModeV2Port: Output<Int>? = null, val supportUrl: Output<String>? = null, val switchLocked: Output<Boolean>? = null, val tunnelProtocol: Output<String>? = null) : ConvertibleToJava<DeviceSettingsPolicyArgs>

Provides a Cloudflare Device Settings Policy resource. Device policies configure settings applied to WARP devices.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const developerWarpPolicy = new cloudflare.DeviceSettingsPolicy("developer_warp_policy", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "Developers WARP settings policy",
description: "Developers WARP settings policy description",
precedence: 10,
match: "any(identity.groups.name[*] in {\"Developers\"})",
"default": false,
enabled: true,
allowModeSwitch: true,
allowUpdates: true,
allowedToLeave: true,
autoConnect: 0,
captivePortal: 5,
disableAutoFallback: true,
supportUrl: "https://cloudflare.com",
switchLocked: true,
serviceModeV2Mode: "warp",
serviceModeV2Port: 3000,
excludeOfficeIps: false,
tunnelProtocol: "wireguard",
});
import pulumi
import pulumi_cloudflare as cloudflare
developer_warp_policy = cloudflare.DeviceSettingsPolicy("developer_warp_policy",
account_id="f037e56e89293a057740de681ac9abbe",
name="Developers WARP settings policy",
description="Developers WARP settings policy description",
precedence=10,
match="any(identity.groups.name[*] in {\"Developers\"})",
default=False,
enabled=True,
allow_mode_switch=True,
allow_updates=True,
allowed_to_leave=True,
auto_connect=0,
captive_portal=5,
disable_auto_fallback=True,
support_url="https://cloudflare.com",
switch_locked=True,
service_mode_v2_mode="warp",
service_mode_v2_port=3000,
exclude_office_ips=False,
tunnel_protocol="wireguard")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var developerWarpPolicy = new Cloudflare.DeviceSettingsPolicy("developer_warp_policy", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "Developers WARP settings policy",
Description = "Developers WARP settings policy description",
Precedence = 10,
Match = "any(identity.groups.name[*] in {\"Developers\"})",
Default = false,
Enabled = true,
AllowModeSwitch = true,
AllowUpdates = true,
AllowedToLeave = true,
AutoConnect = 0,
CaptivePortal = 5,
DisableAutoFallback = true,
SupportUrl = "https://cloudflare.com",
SwitchLocked = true,
ServiceModeV2Mode = "warp",
ServiceModeV2Port = 3000,
ExcludeOfficeIps = false,
TunnelProtocol = "wireguard",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewDeviceSettingsPolicy(ctx, "developer_warp_policy", &cloudflare.DeviceSettingsPolicyArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("Developers WARP settings policy"),
Description: pulumi.String("Developers WARP settings policy description"),
Precedence: pulumi.Int(10),
Match: pulumi.String("any(identity.groups.name[*] in {\"Developers\"})"),
Default: pulumi.Bool(false),
Enabled: pulumi.Bool(true),
AllowModeSwitch: pulumi.Bool(true),
AllowUpdates: pulumi.Bool(true),
AllowedToLeave: pulumi.Bool(true),
AutoConnect: pulumi.Int(0),
CaptivePortal: pulumi.Int(5),
DisableAutoFallback: pulumi.Bool(true),
SupportUrl: pulumi.String("https://cloudflare.com"),
SwitchLocked: pulumi.Bool(true),
ServiceModeV2Mode: pulumi.String("warp"),
ServiceModeV2Port: pulumi.Int(3000),
ExcludeOfficeIps: pulumi.Bool(false),
TunnelProtocol: pulumi.String("wireguard"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.DeviceSettingsPolicy;
import com.pulumi.cloudflare.DeviceSettingsPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var developerWarpPolicy = new DeviceSettingsPolicy("developerWarpPolicy", DeviceSettingsPolicyArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("Developers WARP settings policy")
.description("Developers WARP settings policy description")
.precedence(10)
.match("any(identity.groups.name[*] in {\"Developers\"})")
.default_(false)
.enabled(true)
.allowModeSwitch(true)
.allowUpdates(true)
.allowedToLeave(true)
.autoConnect(0)
.captivePortal(5)
.disableAutoFallback(true)
.supportUrl("https://cloudflare.com")
.switchLocked(true)
.serviceModeV2Mode("warp")
.serviceModeV2Port(3000)
.excludeOfficeIps(false)
.tunnelProtocol("wireguard")
.build());
}
}
resources:
developerWarpPolicy:
type: cloudflare:DeviceSettingsPolicy
name: developer_warp_policy
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: Developers WARP settings policy
description: Developers WARP settings policy description
precedence: 10
match: any(identity.groups.name[*] in {"Developers"})
default: false
enabled: true
allowModeSwitch: true
allowUpdates: true
allowedToLeave: true
autoConnect: 0
captivePortal: 5
disableAutoFallback: true
supportUrl: https://cloudflare.com
switchLocked: true
serviceModeV2Mode: warp
serviceModeV2Port: 3000
excludeOfficeIps: false
tunnelProtocol: wireguard

Import

For default device settings policies you must use "default" as the policy ID.

$ pulumi import cloudflare:index/deviceSettingsPolicy:DeviceSettingsPolicy example <account_id>/<device_policy_id>

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, allowModeSwitch: Output<Boolean>? = null, allowUpdates: Output<Boolean>? = null, allowedToLeave: Output<Boolean>? = null, autoConnect: Output<Int>? = null, captivePortal: Output<Int>? = null, default: Output<Boolean>? = null, description: Output<String>? = null, disableAutoFallback: Output<Boolean>? = null, enabled: Output<Boolean>? = null, excludeOfficeIps: Output<Boolean>? = null, match: Output<String>? = null, name: Output<String>? = null, precedence: Output<Int>? = null, serviceModeV2Mode: Output<String>? = null, serviceModeV2Port: Output<Int>? = null, supportUrl: Output<String>? = null, switchLocked: Output<Boolean>? = null, tunnelProtocol: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account identifier to target for the resource.

Link copied to clipboard
val allowedToLeave: Output<Boolean>? = null

Whether to allow devices to leave the organization. Defaults to true.

Link copied to clipboard
val allowModeSwitch: Output<Boolean>? = null

Whether to allow mode switch for this policy.

Link copied to clipboard
val allowUpdates: Output<Boolean>? = null

Whether to allow updates under this policy.

Link copied to clipboard
val autoConnect: Output<Int>? = null

The amount of time in seconds to reconnect after having been disabled.

Link copied to clipboard
val captivePortal: Output<Int>? = null

The captive portal value for this policy. Defaults to 180.

Link copied to clipboard
val default: Output<Boolean>? = null

Whether the policy refers to the default account policy.

Link copied to clipboard
val description: Output<String>? = null

Description of Policy.

Link copied to clipboard
val disableAutoFallback: Output<Boolean>? = null

Whether to disable auto fallback for this policy.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether the policy is enabled (cannot be set for default policies). Defaults to true.

Link copied to clipboard
val excludeOfficeIps: Output<Boolean>? = null

Whether to add Microsoft IPs to split tunnel exclusions.

Link copied to clipboard
val match: Output<String>? = null

Wirefilter expression to match a device against when evaluating whether this policy should take effect for that device.

Link copied to clipboard
val name: Output<String>? = null

Name of the policy.

Link copied to clipboard
val precedence: Output<Int>? = null

The precedence of the policy. Lower values indicate higher precedence.

Link copied to clipboard
val serviceModeV2Mode: Output<String>? = null

The service mode. Available values: 1dot1, warp, proxy, posture_only, warp_tunnel_only. Defaults to warp.

Link copied to clipboard
val serviceModeV2Port: Output<Int>? = null

The port to use for the proxy service mode. Required when using service_mode_v2_mode.

Link copied to clipboard
val supportUrl: Output<String>? = null

The support URL that will be opened when sending feedback.

Link copied to clipboard
val switchLocked: Output<Boolean>? = null

Enablement of the ZT client switch lock.

Link copied to clipboard
val tunnelProtocol: Output<String>? = null

Determines which tunnel protocol to use. Available values: "", wireguard, masque. Defaults to wireguard.

Functions

Link copied to clipboard
open override fun toJava(): DeviceSettingsPolicyArgs