ZoneLockdownArgs

data class ZoneLockdownArgs(val configurations: Output<List<ZoneLockdownConfigurationArgs>>? = null, val urls: Output<List<String>>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<ZoneLockdownArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZoneLockdown = new cloudflare.ZoneLockdown("example_zone_lockdown", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
configurations: [{
target: "ip",
value: "198.51.100.4",
}],
urls: ["shop&#46;example&#46;com/*"],
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zone_lockdown = cloudflare.ZoneLockdown("example_zone_lockdown",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
configurations=[{
"target": "ip",
"value": "198.51.100.4",
}],
urls=["shop&#46;example&#46;com/*"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleZoneLockdown = new Cloudflare.ZoneLockdown("example_zone_lockdown", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Configurations = new[]
{
new Cloudflare.Inputs.ZoneLockdownConfigurationArgs
{
Target = "ip",
Value = "198.51.100.4",
},
},
Urls = new[]
{
"shop.example.com/*",
},
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewZoneLockdown(ctx, "example_zone_lockdown", &cloudflare.ZoneLockdownArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Configurations: cloudflare.ZoneLockdownConfigurationArray{
&cloudflare.ZoneLockdownConfigurationArgs{
Target: pulumi.String("ip"),
Value: pulumi.String("198.51.100.4"),
},
},
Urls: pulumi.StringArray{
pulumi.String("shop.example.com/*"),
},
})
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.ZoneLockdown;
import com.pulumi.cloudflare.ZoneLockdownArgs;
import com.pulumi.cloudflare.inputs.ZoneLockdownConfigurationArgs;
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 exampleZoneLockdown = new ZoneLockdown("exampleZoneLockdown", ZoneLockdownArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.configurations(ZoneLockdownConfigurationArgs.builder()
.target("ip")
.value("198.51.100.4")
.build())
.urls("shop.example.com/*")
.build());
}
}
resources:
exampleZoneLockdown:
type: cloudflare:ZoneLockdown
name: example_zone_lockdown
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
configurations:
- target: ip
value: 198.51.100.4
urls:
- shop.example.com/*

Import

$ pulumi import cloudflare:index/zoneLockdown:ZoneLockdown example '<zone_id>/<lock_downs_id>'

Constructors

Link copied to clipboard
constructor(configurations: Output<List<ZoneLockdownConfigurationArgs>>? = null, urls: Output<List<String>>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard

A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.

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

The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.

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

Identifier //////

Functions

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