ZoneLockdownArgs

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

Provides a Cloudflare Zone Lockdown resource. Zone Lockdown allows you to define one or more URLs (with wildcard matching on the domain or path) that will only permit access if the request originates from an IP address that matches a safelist of one or more IP addresses and/or IP ranges.

Example Usage

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 example = new ZoneLockdown("example", ZoneLockdownArgs.builder()
.configurations(ZoneLockdownConfigurationArgs.builder()
.target("ip_range")
.value("192.0.2.0/24")
.build())
.description("Restrict access to these endpoints to requests from a known IP address range")
.paused("false")
.urls("api.mysite.com/some/endpoint*")
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.build());
}
}

Import

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

Constructors

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

Properties

Link copied to clipboard

A list of IP addresses or IP ranges to match the request against specified in target, value pairs.

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

A description about the lockdown entry. Typically used as a reminder or explanation for the lockdown.

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

Boolean of whether this zone lockdown is currently paused. Defaults to false.

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

A list of simple wildcard patterns to match requests against. The order of the urls is unimportant.

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

The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.

Functions

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