1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getMagicWanIpsecTunnel
Cloudflare v6.0.0 published on Monday, Apr 14, 2025 by Pulumi

cloudflare.getMagicWanIpsecTunnel

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleMagicWanIpsecTunnel = cloudflare.getMagicWanIpsecTunnel({
    accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    ipsecTunnelId: "023e105f4ecef8ad9ca31a8372d0c353",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_magic_wan_ipsec_tunnel = cloudflare.get_magic_wan_ipsec_tunnel(account_id="023e105f4ecef8ad9ca31a8372d0c353",
    ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353")
Copy
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.LookupMagicWanIpsecTunnel(ctx, &cloudflare.LookupMagicWanIpsecTunnelArgs{
			AccountId:     "023e105f4ecef8ad9ca31a8372d0c353",
			IpsecTunnelId: "023e105f4ecef8ad9ca31a8372d0c353",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleMagicWanIpsecTunnel = Cloudflare.GetMagicWanIpsecTunnel.Invoke(new()
    {
        AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
        IpsecTunnelId = "023e105f4ecef8ad9ca31a8372d0c353",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetMagicWanIpsecTunnelArgs;
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) {
        final var exampleMagicWanIpsecTunnel = CloudflareFunctions.getMagicWanIpsecTunnel(GetMagicWanIpsecTunnelArgs.builder()
            .accountId("023e105f4ecef8ad9ca31a8372d0c353")
            .ipsecTunnelId("023e105f4ecef8ad9ca31a8372d0c353")
            .build());

    }
}
Copy
variables:
  exampleMagicWanIpsecTunnel:
    fn::invoke:
      function: cloudflare:getMagicWanIpsecTunnel
      arguments:
        accountId: 023e105f4ecef8ad9ca31a8372d0c353
        ipsecTunnelId: 023e105f4ecef8ad9ca31a8372d0c353
Copy

Using getMagicWanIpsecTunnel

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getMagicWanIpsecTunnel(args: GetMagicWanIpsecTunnelArgs, opts?: InvokeOptions): Promise<GetMagicWanIpsecTunnelResult>
function getMagicWanIpsecTunnelOutput(args: GetMagicWanIpsecTunnelOutputArgs, opts?: InvokeOptions): Output<GetMagicWanIpsecTunnelResult>
Copy
def get_magic_wan_ipsec_tunnel(account_id: Optional[str] = None,
                               ipsec_tunnel_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetMagicWanIpsecTunnelResult
def get_magic_wan_ipsec_tunnel_output(account_id: Optional[pulumi.Input[str]] = None,
                               ipsec_tunnel_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetMagicWanIpsecTunnelResult]
Copy
func LookupMagicWanIpsecTunnel(ctx *Context, args *LookupMagicWanIpsecTunnelArgs, opts ...InvokeOption) (*LookupMagicWanIpsecTunnelResult, error)
func LookupMagicWanIpsecTunnelOutput(ctx *Context, args *LookupMagicWanIpsecTunnelOutputArgs, opts ...InvokeOption) LookupMagicWanIpsecTunnelResultOutput
Copy

> Note: This function is named LookupMagicWanIpsecTunnel in the Go SDK.

public static class GetMagicWanIpsecTunnel 
{
    public static Task<GetMagicWanIpsecTunnelResult> InvokeAsync(GetMagicWanIpsecTunnelArgs args, InvokeOptions? opts = null)
    public static Output<GetMagicWanIpsecTunnelResult> Invoke(GetMagicWanIpsecTunnelInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMagicWanIpsecTunnelResult> getMagicWanIpsecTunnel(GetMagicWanIpsecTunnelArgs args, InvokeOptions options)
public static Output<GetMagicWanIpsecTunnelResult> getMagicWanIpsecTunnel(GetMagicWanIpsecTunnelArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getMagicWanIpsecTunnel:getMagicWanIpsecTunnel
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
Identifier
IpsecTunnelId This property is required. string
Identifier
AccountId This property is required. string
Identifier
IpsecTunnelId This property is required. string
Identifier
accountId This property is required. String
Identifier
ipsecTunnelId This property is required. String
Identifier
accountId This property is required. string
Identifier
ipsecTunnelId This property is required. string
Identifier
account_id This property is required. str
Identifier
ipsec_tunnel_id This property is required. str
Identifier
accountId This property is required. String
Identifier
ipsecTunnelId This property is required. String
Identifier

getMagicWanIpsecTunnel Result

The following output properties are available:

AccountId string
Identifier
Id string
The provider-assigned unique ID for this managed resource.
IpsecTunnel GetMagicWanIpsecTunnelIpsecTunnel
IpsecTunnelId string
Identifier
AccountId string
Identifier
Id string
The provider-assigned unique ID for this managed resource.
IpsecTunnel GetMagicWanIpsecTunnelIpsecTunnel
IpsecTunnelId string
Identifier
accountId String
Identifier
id String
The provider-assigned unique ID for this managed resource.
ipsecTunnel GetMagicWanIpsecTunnelIpsecTunnel
ipsecTunnelId String
Identifier
accountId string
Identifier
id string
The provider-assigned unique ID for this managed resource.
ipsecTunnel GetMagicWanIpsecTunnelIpsecTunnel
ipsecTunnelId string
Identifier
account_id str
Identifier
id str
The provider-assigned unique ID for this managed resource.
ipsec_tunnel GetMagicWanIpsecTunnelIpsecTunnel
ipsec_tunnel_id str
Identifier
accountId String
Identifier
id String
The provider-assigned unique ID for this managed resource.
ipsecTunnel Property Map
ipsecTunnelId String
Identifier

Supporting Types

GetMagicWanIpsecTunnelIpsecTunnel

AllowNullCipher This property is required. bool
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
CloudflareEndpoint This property is required. string
The IP address assigned to the Cloudflare side of the IPsec tunnel.
CreatedOn This property is required. string
The date and time the tunnel was created.
CustomerEndpoint This property is required. string
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
Description This property is required. string
An optional description forthe IPsec tunnel.
HealthCheck This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheck
Id This property is required. string
Tunnel identifier tag.
InterfaceAddress This property is required. string
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.
ModifiedOn This property is required. string
The date and time the tunnel was last modified.
Name This property is required. string
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
PskMetadata This property is required. GetMagicWanIpsecTunnelIpsecTunnelPskMetadata
The PSK metadata that includes when the PSK was generated.
ReplayProtection This property is required. bool
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
AllowNullCipher This property is required. bool
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
CloudflareEndpoint This property is required. string
The IP address assigned to the Cloudflare side of the IPsec tunnel.
CreatedOn This property is required. string
The date and time the tunnel was created.
CustomerEndpoint This property is required. string
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
Description This property is required. string
An optional description forthe IPsec tunnel.
HealthCheck This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheck
Id This property is required. string
Tunnel identifier tag.
InterfaceAddress This property is required. string
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.
ModifiedOn This property is required. string
The date and time the tunnel was last modified.
Name This property is required. string
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
PskMetadata This property is required. GetMagicWanIpsecTunnelIpsecTunnelPskMetadata
The PSK metadata that includes when the PSK was generated.
ReplayProtection This property is required. bool
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
allowNullCipher This property is required. Boolean
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
cloudflareEndpoint This property is required. String
The IP address assigned to the Cloudflare side of the IPsec tunnel.
createdOn This property is required. String
The date and time the tunnel was created.
customerEndpoint This property is required. String
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
description This property is required. String
An optional description forthe IPsec tunnel.
healthCheck This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheck
id This property is required. String
Tunnel identifier tag.
interfaceAddress This property is required. String
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.
modifiedOn This property is required. String
The date and time the tunnel was last modified.
name This property is required. String
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
pskMetadata This property is required. GetMagicWanIpsecTunnelIpsecTunnelPskMetadata
The PSK metadata that includes when the PSK was generated.
replayProtection This property is required. Boolean
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
allowNullCipher This property is required. boolean
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
cloudflareEndpoint This property is required. string
The IP address assigned to the Cloudflare side of the IPsec tunnel.
createdOn This property is required. string
The date and time the tunnel was created.
customerEndpoint This property is required. string
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
description This property is required. string
An optional description forthe IPsec tunnel.
healthCheck This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheck
id This property is required. string
Tunnel identifier tag.
interfaceAddress This property is required. string
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.
modifiedOn This property is required. string
The date and time the tunnel was last modified.
name This property is required. string
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
pskMetadata This property is required. GetMagicWanIpsecTunnelIpsecTunnelPskMetadata
The PSK metadata that includes when the PSK was generated.
replayProtection This property is required. boolean
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
allow_null_cipher This property is required. bool
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
cloudflare_endpoint This property is required. str
The IP address assigned to the Cloudflare side of the IPsec tunnel.
created_on This property is required. str
The date and time the tunnel was created.
customer_endpoint This property is required. str
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
description This property is required. str
An optional description forthe IPsec tunnel.
health_check This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheck
id This property is required. str
Tunnel identifier tag.
interface_address This property is required. str
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.
modified_on This property is required. str
The date and time the tunnel was last modified.
name This property is required. str
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
psk_metadata This property is required. GetMagicWanIpsecTunnelIpsecTunnelPskMetadata
The PSK metadata that includes when the PSK was generated.
replay_protection This property is required. bool
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
allowNullCipher This property is required. Boolean
When true, the tunnel can use a null-cipher (ENCR_NULL) in the ESP tunnel (Phase 2).
cloudflareEndpoint This property is required. String
The IP address assigned to the Cloudflare side of the IPsec tunnel.
createdOn This property is required. String
The date and time the tunnel was created.
customerEndpoint This property is required. String
The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.
description This property is required. String
An optional description forthe IPsec tunnel.
healthCheck This property is required. Property Map
id This property is required. String
Tunnel identifier tag.
interfaceAddress This property is required. String
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.
modifiedOn This property is required. String
The date and time the tunnel was last modified.
name This property is required. String
The name of the IPsec tunnel. The name cannot share a name with other tunnels.
pskMetadata This property is required. Property Map
The PSK metadata that includes when the PSK was generated.
replayProtection This property is required. Boolean
If true, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.

GetMagicWanIpsecTunnelIpsecTunnelHealthCheck

Direction This property is required. string
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
Enabled This property is required. bool
Determines whether to run healthchecks for a tunnel.
Rate This property is required. string
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
Target This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
Type This property is required. string
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
Direction This property is required. string
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
Enabled This property is required. bool
Determines whether to run healthchecks for a tunnel.
Rate This property is required. string
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
Target This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
Type This property is required. string
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
direction This property is required. String
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
enabled This property is required. Boolean
Determines whether to run healthchecks for a tunnel.
rate This property is required. String
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
target This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
type This property is required. String
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
direction This property is required. string
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
enabled This property is required. boolean
Determines whether to run healthchecks for a tunnel.
rate This property is required. string
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
target This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
type This property is required. string
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
direction This property is required. str
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
enabled This property is required. bool
Determines whether to run healthchecks for a tunnel.
rate This property is required. str
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
target This property is required. GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
type This property is required. str
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
direction This property is required. String
The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. Available values: "unidirectional", "bidirectional".
enabled This property is required. Boolean
Determines whether to run healthchecks for a tunnel.
rate This property is required. String
How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
target This property is required. Property Map
The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to customer_gre_endpoint address. This field is ignored for bidirectional healthchecks as the interface*address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.
type This property is required. String
The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".

GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget

Effective This property is required. string
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
Saved This property is required. string
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
Effective This property is required. string
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
Saved This property is required. string
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
effective This property is required. String
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
saved This property is required. String
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
effective This property is required. string
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
saved This property is required. string
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
effective This property is required. str
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
saved This property is required. str
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
effective This property is required. String
The effective health check target. If 'saved' is empty, then this field will be populated with the calculated default value on GET requests. Ignored in POST, PUT, and PATCH requests.
saved This property is required. String
The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.

GetMagicWanIpsecTunnelIpsecTunnelPskMetadata

LastGeneratedOn This property is required. string
The date and time the tunnel was last modified.
LastGeneratedOn This property is required. string
The date and time the tunnel was last modified.
lastGeneratedOn This property is required. String
The date and time the tunnel was last modified.
lastGeneratedOn This property is required. string
The date and time the tunnel was last modified.
last_generated_on This property is required. str
The date and time the tunnel was last modified.
lastGeneratedOn This property is required. String
The date and time the tunnel was last modified.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.