MagicWanIpsecTunnel

class MagicWanIpsecTunnel : KotlinCustomResource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleMagicWanIpsecTunnel = new cloudflare.MagicWanIpsecTunnel("example_magic_wan_ipsec_tunnel", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
cloudflareEndpoint: "203.0.113.1",
interfaceAddress: "192.0.2.0/31",
name: "IPsec_1",
customerEndpoint: "203.0.113.1",
description: "Tunnel for ISP X",
healthCheck: {
direction: "bidirectional",
enabled: true,
rate: "low",
target: {
saved: "203.0.113.1",
},
type: "request",
},
psk: "O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replayProtection: false,
});
import pulumi
import pulumi_cloudflare as cloudflare
example_magic_wan_ipsec_tunnel = cloudflare.MagicWanIpsecTunnel("example_magic_wan_ipsec_tunnel",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
cloudflare_endpoint="203.0.113.1",
interface_address="192.0.2.0/31",
name="IPsec_1",
customer_endpoint="203.0.113.1",
description="Tunnel for ISP X",
health_check={
"direction": "bidirectional",
"enabled": True,
"rate": "low",
"target": {
"saved": "203.0.113.1",
},
"type": "request",
},
psk="O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
replay_protection=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleMagicWanIpsecTunnel = new Cloudflare.MagicWanIpsecTunnel("example_magic_wan_ipsec_tunnel", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
CloudflareEndpoint = "203.0.113.1",
InterfaceAddress = "192.0.2.0/31",
Name = "IPsec_1",
CustomerEndpoint = "203.0.113.1",
Description = "Tunnel for ISP X",
HealthCheck = new Cloudflare.Inputs.MagicWanIpsecTunnelHealthCheckArgs
{
Direction = "bidirectional",
Enabled = true,
Rate = "low",
Target = new Cloudflare.Inputs.MagicWanIpsecTunnelHealthCheckTargetArgs
{
Saved = "203.0.113.1",
},
Type = "request",
},
Psk = "O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy",
ReplayProtection = false,
});
});
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.NewMagicWanIpsecTunnel(ctx, "example_magic_wan_ipsec_tunnel", &cloudflare.MagicWanIpsecTunnelArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
CloudflareEndpoint: pulumi.String("203.0.113.1"),
InterfaceAddress: pulumi.String("192.0.2.0/31"),
Name: pulumi.String("IPsec_1"),
CustomerEndpoint: pulumi.String("203.0.113.1"),
Description: pulumi.String("Tunnel for ISP X"),
HealthCheck: &cloudflare.MagicWanIpsecTunnelHealthCheckArgs{
Direction: pulumi.String("bidirectional"),
Enabled: pulumi.Bool(true),
Rate: pulumi.String("low"),
Target: &cloudflare.MagicWanIpsecTunnelHealthCheckTargetArgs{
Saved: pulumi.String("203.0.113.1"),
},
Type: pulumi.String("request"),
},
Psk: pulumi.String("O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy"),
ReplayProtection: pulumi.Bool(false),
})
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.MagicWanIpsecTunnel;
import com.pulumi.cloudflare.MagicWanIpsecTunnelArgs;
import com.pulumi.cloudflare.inputs.MagicWanIpsecTunnelHealthCheckArgs;
import com.pulumi.cloudflare.inputs.MagicWanIpsecTunnelHealthCheckTargetArgs;
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 exampleMagicWanIpsecTunnel = new MagicWanIpsecTunnel("exampleMagicWanIpsecTunnel", MagicWanIpsecTunnelArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.cloudflareEndpoint("203.0.113.1")
.interfaceAddress("192.0.2.0/31")
.name("IPsec_1")
.customerEndpoint("203.0.113.1")
.description("Tunnel for ISP X")
.healthCheck(MagicWanIpsecTunnelHealthCheckArgs.builder()
.direction("bidirectional")
.enabled(true)
.rate("low")
.target(MagicWanIpsecTunnelHealthCheckTargetArgs.builder()
.saved("203.0.113.1")
.build())
.type("request")
.build())
.psk("O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy")
.replayProtection(false)
.build());
}
}
resources:
exampleMagicWanIpsecTunnel:
type: cloudflare:MagicWanIpsecTunnel
name: example_magic_wan_ipsec_tunnel
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
cloudflareEndpoint: 203.0.113.1
interfaceAddress: 192.0.2.0/31
name: IPsec_1
customerEndpoint: 203.0.113.1
description: Tunnel for ISP X
healthCheck:
direction: bidirectional
enabled: true
rate: low
target:
saved: 203.0.113.1
type: request
psk: O3bwKSjnaoCxDoUxjcq4Rk8ZKkezQUiy
replayProtection: false

Import

$ pulumi import cloudflare:index/magicWanIpsecTunnel:MagicWanIpsecTunnel example '<account_id>/<ipsec_tunnel_id>'

Properties

Link copied to clipboard
val accountId: Output<String>

Identifier

Link copied to clipboard

When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).

Link copied to clipboard

The IP address assigned to the Cloudflare side of the IPsec tunnel.

Link copied to clipboard
val createdOn: Output<String>

The date and time the tunnel was created.

Link copied to clipboard
val customerEndpoint: Output<String>?

The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.

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

An optional description forthe IPsec tunnel.

Link copied to clipboard
Link copied to clipboard
val id: Output<String>
Link copied to clipboard

A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.

Link copied to clipboard
Link copied to clipboard
val modified: Output<Boolean>
Link copied to clipboard
val modifiedOn: Output<String>

The date and time the tunnel was last modified.

Link copied to clipboard
val name: Output<String>

The name of the IPsec tunnel. The name cannot share a name with other tunnels.

Link copied to clipboard
val psk: Output<String>?

A randomly generated or provided string for use in the IPsec tunnel.

Link copied to clipboard

The PSK metadata that includes when the PSK was generated.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.

Link copied to clipboard
val urn: Output<String>