Leaked Credential Check Rule Args
data class LeakedCredentialCheckRuleArgs(val password: Output<String>? = null, val username: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<LeakedCredentialCheckRuleArgs>
Provides a Cloudflare Leaked Credential Check Rule resource for managing user-defined Leaked Credential detection patterns within a specific zone.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
// Enable the Leaked Credentials Check detection before trying
// to add detections.
const example = new cloudflare.LeakedCredentialCheck("example", {
zoneId: "399c6f4950c01a5a141b99ff7fbcbd8b",
enabled: true,
});
const exampleLeakedCredentialCheckRule = new cloudflare.LeakedCredentialCheckRule("example", {
zoneId: example.zoneId,
username: "lookup_json_string(http.request.body.raw, \"user\")",
password: "lookup_json_string(http.request.body.raw, \"pass\")",
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
# Enable the Leaked Credentials Check detection before trying
# to add detections.
example = cloudflare.LeakedCredentialCheck("example",
zone_id="399c6f4950c01a5a141b99ff7fbcbd8b",
enabled=True)
example_leaked_credential_check_rule = cloudflare.LeakedCredentialCheckRule("example",
zone_id=example.zone_id,
username="lookup_json_string(http.request.body.raw, \"user\")",
password="lookup_json_string(http.request.body.raw, \"pass\")")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
// Enable the Leaked Credentials Check detection before trying
// to add detections.
var example = new Cloudflare.LeakedCredentialCheck("example", new()
{
ZoneId = "399c6f4950c01a5a141b99ff7fbcbd8b",
Enabled = true,
});
var exampleLeakedCredentialCheckRule = new Cloudflare.LeakedCredentialCheckRule("example", new()
{
ZoneId = example.ZoneId,
Username = "lookup_json_string(http.request.body.raw, \"user\")",
Password = "lookup_json_string(http.request.body.raw, \"pass\")",
});
});
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 {
// Enable the Leaked Credentials Check detection before trying
// to add detections.
example, err := cloudflare.NewLeakedCredentialCheck(ctx, "example", &cloudflare.LeakedCredentialCheckArgs{
ZoneId: pulumi.String("399c6f4950c01a5a141b99ff7fbcbd8b"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = cloudflare.NewLeakedCredentialCheckRule(ctx, "example", &cloudflare.LeakedCredentialCheckRuleArgs{
ZoneId: example.ZoneId,
Username: pulumi.String("lookup_json_string(http.request.body.raw, \"user\")"),
Password: pulumi.String("lookup_json_string(http.request.body.raw, \"pass\")"),
})
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.LeakedCredentialCheck;
import com.pulumi.cloudflare.LeakedCredentialCheckArgs;
import com.pulumi.cloudflare.LeakedCredentialCheckRule;
import com.pulumi.cloudflare.LeakedCredentialCheckRuleArgs;
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) {
// Enable the Leaked Credentials Check detection before trying
// to add detections.
var example = new LeakedCredentialCheck("example", LeakedCredentialCheckArgs.builder()
.zoneId("399c6f4950c01a5a141b99ff7fbcbd8b")
.enabled(true)
.build());
var exampleLeakedCredentialCheckRule = new LeakedCredentialCheckRule("exampleLeakedCredentialCheckRule", LeakedCredentialCheckRuleArgs.builder()
.zoneId(example.zoneId())
.username("lookup_json_string(http.request.body.raw, \"user\")")
.password("lookup_json_string(http.request.body.raw, \"pass\")")
.build());
}
}
Content copied to clipboard
resources:
# Enable the Leaked Credentials Check detection before trying
# to add detections.
example:
type: cloudflare:LeakedCredentialCheck
properties:
zoneId: 399c6f4950c01a5a141b99ff7fbcbd8b
enabled: true
exampleLeakedCredentialCheckRule:
type: cloudflare:LeakedCredentialCheckRule
name: example
properties:
zoneId: ${example.zoneId}
username: lookup_json_string(http.request.body.raw, "user")
password: lookup_json_string(http.request.body.raw, "pass")
Content copied to clipboard
Import
$ pulumi import cloudflare:index/leakedCredentialCheckRule:LeakedCredentialCheckRule example <zone_id>/<resource_id>
Content copied to clipboard