Zero Trust Device Posture Rule Args
data class ZeroTrustDevicePostureRuleArgs(val accountId: Output<String>? = null, val description: Output<String>? = null, val expiration: Output<String>? = null, val inputs: Output<List<ZeroTrustDevicePostureRuleInputArgs>>? = null, val matches: Output<List<ZeroTrustDevicePostureRuleMatchArgs>>? = null, val name: Output<String>? = null, val schedule: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<ZeroTrustDevicePostureRuleArgs>
Provides a Cloudflare Device Posture Rule resource. Device posture rules configure security policies for device posture checks.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const eaxmple = new cloudflare.ZeroTrustDevicePostureRule("eaxmple", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "Corporate devices posture rule",
type: "os_version",
description: "Device posture rule for corporate devices.",
schedule: "24h",
expiration: "24h",
matches: [{
platform: "linux",
}],
inputs: [{
id: corporateDevices.id,
version: "1.0.0",
operator: "<",
osDistroName: "ubuntu",
osDistroRevision: "1.0.0",
osVersionExtra: "(a)",
}],
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
eaxmple = cloudflare.ZeroTrustDevicePostureRule("eaxmple",
account_id="f037e56e89293a057740de681ac9abbe",
name="Corporate devices posture rule",
type="os_version",
description="Device posture rule for corporate devices.",
schedule="24h",
expiration="24h",
matches=[{
"platform": "linux",
}],
inputs=[{
"id": corporate_devices["id"],
"version": "1.0.0",
"operator": "<",
"os_distro_name": "ubuntu",
"os_distro_revision": "1.0.0",
"os_version_extra": "(a)",
}])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var eaxmple = new Cloudflare.ZeroTrustDevicePostureRule("eaxmple", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "Corporate devices posture rule",
Type = "os_version",
Description = "Device posture rule for corporate devices.",
Schedule = "24h",
Expiration = "24h",
Matches = new[]
{
new Cloudflare.Inputs.ZeroTrustDevicePostureRuleMatchArgs
{
Platform = "linux",
},
},
Inputs = new[]
{
new Cloudflare.Inputs.ZeroTrustDevicePostureRuleInputArgs
{
Id = corporateDevices.Id,
Version = "1.0.0",
Operator = "<",
OsDistroName = "ubuntu",
OsDistroRevision = "1.0.0",
OsVersionExtra = "(a)",
},
},
});
});
Content copied to clipboard
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.NewZeroTrustDevicePostureRule(ctx, "eaxmple", &cloudflare.ZeroTrustDevicePostureRuleArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("Corporate devices posture rule"),
Type: pulumi.String("os_version"),
Description: pulumi.String("Device posture rule for corporate devices."),
Schedule: pulumi.String("24h"),
Expiration: pulumi.String("24h"),
Matches: cloudflare.ZeroTrustDevicePostureRuleMatchArray{
&cloudflare.ZeroTrustDevicePostureRuleMatchArgs{
Platform: pulumi.String("linux"),
},
},
Inputs: cloudflare.ZeroTrustDevicePostureRuleInputTypeArray{
&cloudflare.ZeroTrustDevicePostureRuleInputTypeArgs{
Id: pulumi.Any(corporateDevices.Id),
Version: pulumi.String("1.0.0"),
Operator: pulumi.String("<"),
OsDistroName: pulumi.String("ubuntu"),
OsDistroRevision: pulumi.String("1.0.0"),
OsVersionExtra: pulumi.String("(a)"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustDevicePostureRule;
import com.pulumi.cloudflare.ZeroTrustDevicePostureRuleArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustDevicePostureRuleMatchArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustDevicePostureRuleInputArgs;
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 eaxmple = new ZeroTrustDevicePostureRule("eaxmple", ZeroTrustDevicePostureRuleArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("Corporate devices posture rule")
.type("os_version")
.description("Device posture rule for corporate devices.")
.schedule("24h")
.expiration("24h")
.matches(ZeroTrustDevicePostureRuleMatchArgs.builder()
.platform("linux")
.build())
.inputs(ZeroTrustDevicePostureRuleInputArgs.builder()
.id(corporateDevices.id())
.version("1.0.0")
.operator("<")
.osDistroName("ubuntu")
.osDistroRevision("1.0.0")
.osVersionExtra("(a)")
.build())
.build());
}
}
Content copied to clipboard
resources:
eaxmple:
type: cloudflare:ZeroTrustDevicePostureRule
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: Corporate devices posture rule
type: os_version
description: Device posture rule for corporate devices.
schedule: 24h
expiration: 24h
matches:
- platform: linux
inputs:
- id: ${corporateDevices.id}
version: 1.0.0
operator: <
osDistroName: ubuntu
osDistroRevision: 1.0.0
osVersionExtra: (a)
Content copied to clipboard
Import
$ pulumi import cloudflare:index/zeroTrustDevicePostureRule:ZeroTrustDevicePostureRule example <account_id>/<device_posture_rule_id>
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountId: Output<String>? = null, description: Output<String>? = null, expiration: Output<String>? = null, inputs: Output<List<ZeroTrustDevicePostureRuleInputArgs>>? = null, matches: Output<List<ZeroTrustDevicePostureRuleMatchArgs>>? = null, name: Output<String>? = null, schedule: Output<String>? = null, type: Output<String>? = null)
Properties
Link copied to clipboard
Link copied to clipboard
Expire posture results after the specified amount of time. Must be in the format 1h
or 30m
. Valid units are h
and m
.
Link copied to clipboard
Required for all rule types except warp
, gateway
, and tanium
.
Link copied to clipboard
The conditions that the client must match to run the rule.
Link copied to clipboard
The device posture rule type. Available values: serial_number
, file
, application
, gateway
, warp
, domain_joined
, os_version
, disk_encryption
, firewall
, client_certificate
, client_certificate_v2
, workspace_one
, unique_client_id
, crowdstrike_s2s
, sentinelone
, kolide
, tanium_s2s
, intune
, sentinelone_s2s
, custom_s2s
.