Zero Trust Gateway Policy Args
data class ZeroTrustGatewayPolicyArgs(val accountId: Output<String>? = null, val action: Output<String>? = null, val description: Output<String>? = null, val devicePosture: Output<String>? = null, val enabled: Output<Boolean>? = null, val filters: Output<List<String>>? = null, val identity: Output<String>? = null, val name: Output<String>? = null, val precedence: Output<Int>? = null, val ruleSettings: Output<ZeroTrustGatewayPolicyRuleSettingsArgs>? = null, val traffic: Output<String>? = null) : ConvertibleToJava<ZeroTrustGatewayPolicyArgs>
Provides a Cloudflare Teams rule resource. Teams rules comprise secure web gateway policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const example = new cloudflare.ZeroTrustGatewayPolicy("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "office",
description: "desc",
precedence: 1,
action: "block",
filters: ["http"],
traffic: "http.request.uri == \"https://www.example.com/malicious\"",
ruleSettings: {
blockPageEnabled: true,
blockPageReason: "access not permitted",
},
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.ZeroTrustGatewayPolicy("example",
account_id="f037e56e89293a057740de681ac9abbe",
name="office",
description="desc",
precedence=1,
action="block",
filters=["http"],
traffic="http.request.uri == \"https://www.example.com/malicious\"",
rule_settings={
"block_page_enabled": True,
"block_page_reason": "access not permitted",
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var example = new Cloudflare.ZeroTrustGatewayPolicy("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "office",
Description = "desc",
Precedence = 1,
Action = "block",
Filters = new[]
{
"http",
},
Traffic = "http.request.uri == \"https://www.example.com/malicious\"",
RuleSettings = new Cloudflare.Inputs.ZeroTrustGatewayPolicyRuleSettingsArgs
{
BlockPageEnabled = true,
BlockPageReason = "access not permitted",
},
});
});
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.NewZeroTrustGatewayPolicy(ctx, "example", &cloudflare.ZeroTrustGatewayPolicyArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("office"),
Description: pulumi.String("desc"),
Precedence: pulumi.Int(1),
Action: pulumi.String("block"),
Filters: pulumi.StringArray{
pulumi.String("http"),
},
Traffic: pulumi.String("http.request.uri == \"https://www.example.com/malicious\""),
RuleSettings: &cloudflare.ZeroTrustGatewayPolicyRuleSettingsArgs{
BlockPageEnabled: pulumi.Bool(true),
BlockPageReason: pulumi.String("access not permitted"),
},
})
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.ZeroTrustGatewayPolicy;
import com.pulumi.cloudflare.ZeroTrustGatewayPolicyArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustGatewayPolicyRuleSettingsArgs;
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 example = new ZeroTrustGatewayPolicy("example", ZeroTrustGatewayPolicyArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("office")
.description("desc")
.precedence(1)
.action("block")
.filters("http")
.traffic("http.request.uri == \"https://www.example.com/malicious\"")
.ruleSettings(ZeroTrustGatewayPolicyRuleSettingsArgs.builder()
.blockPageEnabled(true)
.blockPageReason("access not permitted")
.build())
.build());
}
}
Content copied to clipboard
resources:
example:
type: cloudflare:ZeroTrustGatewayPolicy
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: office
description: desc
precedence: 1
action: block
filters:
- http
traffic: http.request.uri == "https://www.example.com/malicious"
ruleSettings:
blockPageEnabled: true
blockPageReason: access not permitted
Content copied to clipboard
Import
$ pulumi import cloudflare:index/zeroTrustGatewayPolicy:ZeroTrustGatewayPolicy example <account_id>/<teams_rule_id>
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountId: Output<String>? = null, action: Output<String>? = null, description: Output<String>? = null, devicePosture: Output<String>? = null, enabled: Output<Boolean>? = null, filters: Output<List<String>>? = null, identity: Output<String>? = null, name: Output<String>? = null, precedence: Output<Int>? = null, ruleSettings: Output<ZeroTrustGatewayPolicyRuleSettingsArgs>? = null, traffic: Output<String>? = null)