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

cloudflare.getMagicWanIpsecTunnel

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleMagicWanIpsecTunnel = cloudflare.getMagicWanIpsecTunnel({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        ipsecTunnelId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      exampleMagicWanIpsecTunnel:
        fn::invoke:
          function: cloudflare:getMagicWanIpsecTunnel
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            ipsecTunnelId: 023e105f4ecef8ad9ca31a8372d0c353
    

    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>
    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]
    func LookupMagicWanIpsecTunnel(ctx *Context, args *LookupMagicWanIpsecTunnelArgs, opts ...InvokeOption) (*LookupMagicWanIpsecTunnelResult, error)
    func LookupMagicWanIpsecTunnelOutput(ctx *Context, args *LookupMagicWanIpsecTunnelOutputArgs, opts ...InvokeOption) LookupMagicWanIpsecTunnelResultOutput

    > 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)
    }
    public static CompletableFuture<GetMagicWanIpsecTunnelResult> getMagicWanIpsecTunnel(GetMagicWanIpsecTunnelArgs args, InvokeOptions options)
    public static Output<GetMagicWanIpsecTunnelResult> getMagicWanIpsecTunnel(GetMagicWanIpsecTunnelArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getMagicWanIpsecTunnel:getMagicWanIpsecTunnel
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    GetMagicWanIpsecTunnelIpsecTunnelHealthCheck

    Direction 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 bool
    Determines whether to run healthchecks for a tunnel.
    Rate string
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    Target 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 string
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
    Direction 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 bool
    Determines whether to run healthchecks for a tunnel.
    Rate string
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    Target 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 string
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
    direction 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 Boolean
    Determines whether to run healthchecks for a tunnel.
    rate String
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    target 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 String
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
    direction 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 boolean
    Determines whether to run healthchecks for a tunnel.
    rate string
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    target 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 string
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
    direction 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 bool
    Determines whether to run healthchecks for a tunnel.
    rate str
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    target 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 str
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".
    direction 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 Boolean
    Determines whether to run healthchecks for a tunnel.
    rate String
    How frequent the health check is run. The default value is mid. Available values: "low", "mid", "high".
    target 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 String
    The type of healthcheck to run, reply or request. The default value is reply. Available values: "reply", "request".

    GetMagicWanIpsecTunnelIpsecTunnelHealthCheckTarget

    Effective 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 string
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
    Effective 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 string
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
    effective 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 String
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
    effective 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 string
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
    effective 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 str
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.
    effective 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 String
    The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.

    GetMagicWanIpsecTunnelIpsecTunnelPskMetadata

    LastGeneratedOn string
    The date and time the tunnel was last modified.
    LastGeneratedOn string
    The date and time the tunnel was last modified.
    lastGeneratedOn String
    The date and time the tunnel was last modified.
    lastGeneratedOn string
    The date and time the tunnel was last modified.
    last_generated_on str
    The date and time the tunnel was last modified.
    lastGeneratedOn 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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi