Zone Lockdown
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.example.com/*"],
});
Content copied to clipboard
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.example.com/*"])
Content copied to clipboard
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/*",
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
resources:
exampleZoneLockdown:
type: cloudflare:ZoneLockdown
name: example_zone_lockdown
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
configurations:
- target: ip
value: 198.51.100.4
urls:
- shop.example.com/*
Content copied to clipboard
Import
$ pulumi import cloudflare:index/zoneLockdown:ZoneLockdown example '<zone_id>/<lock_downs_id>'
Content copied to clipboard
//////
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
An informative summary of the rule.
Link copied to clipboard
The timestamp of when the rule was last modified.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard