Cloudflare v6.1.2 published on Monday, Apr 28, 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",
});
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:
- Account
Id string - Identifier
- Ipsec
Tunnel stringId - Identifier
- Account
Id string - Identifier
- Ipsec
Tunnel stringId - Identifier
- account
Id String - Identifier
- ipsec
Tunnel StringId - Identifier
- account
Id string - Identifier
- ipsec
Tunnel stringId - Identifier
- account_
id str - Identifier
- ipsec_
tunnel_ strid - Identifier
- account
Id String - Identifier
- ipsec
Tunnel StringId - Identifier
getMagicWanIpsecTunnel Result
The following output properties are available:
- Account
Id string - Identifier
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipsec
Tunnel GetMagic Wan Ipsec Tunnel Ipsec Tunnel - Ipsec
Tunnel stringId - Identifier
- Account
Id string - Identifier
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipsec
Tunnel GetMagic Wan Ipsec Tunnel Ipsec Tunnel - Ipsec
Tunnel stringId - Identifier
- account
Id String - Identifier
- id String
- The provider-assigned unique ID for this managed resource.
- ipsec
Tunnel GetMagic Wan Ipsec Tunnel Ipsec Tunnel - ipsec
Tunnel StringId - Identifier
- account
Id string - Identifier
- id string
- The provider-assigned unique ID for this managed resource.
- ipsec
Tunnel GetMagic Wan Ipsec Tunnel Ipsec Tunnel - ipsec
Tunnel stringId - Identifier
- account_
id str - Identifier
- id str
- The provider-assigned unique ID for this managed resource.
- ipsec_
tunnel GetMagic Wan Ipsec Tunnel Ipsec Tunnel - ipsec_
tunnel_ strid - Identifier
- account
Id String - Identifier
- id String
- The provider-assigned unique ID for this managed resource.
- ipsec
Tunnel Property Map - ipsec
Tunnel StringId - Identifier
Supporting Types
GetMagicWanIpsecTunnelIpsecTunnel
- Allow
Null boolCipher - When
true
, the tunnel can use a null-cipher (ENCR_NULL
) in the ESP tunnel (Phase 2). - Cloudflare
Endpoint string - The IP address assigned to the Cloudflare side of the IPsec tunnel.
- Created
On string - The date and time the tunnel was created.
- Customer
Endpoint 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.
- Health
Check GetMagic Wan Ipsec Tunnel Ipsec Tunnel Health Check - Id string
- Tunnel identifier tag.
- Interface
Address 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.
- Modified
On 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.
- Psk
Metadata GetMagic Wan Ipsec Tunnel Ipsec Tunnel Psk Metadata - 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.
- Allow
Null boolCipher - When
true
, the tunnel can use a null-cipher (ENCR_NULL
) in the ESP tunnel (Phase 2). - Cloudflare
Endpoint string - The IP address assigned to the Cloudflare side of the IPsec tunnel.
- Created
On string - The date and time the tunnel was created.
- Customer
Endpoint 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.
- Health
Check GetMagic Wan Ipsec Tunnel Ipsec Tunnel Health Check - Id string
- Tunnel identifier tag.
- Interface
Address 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.
- Modified
On 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.
- Psk
Metadata GetMagic Wan Ipsec Tunnel Ipsec Tunnel Psk Metadata - 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.
- allow
Null BooleanCipher - When
true
, the tunnel can use a null-cipher (ENCR_NULL
) in the ESP tunnel (Phase 2). - cloudflare
Endpoint String - The IP address assigned to the Cloudflare side of the IPsec tunnel.
- created
On String - The date and time the tunnel was created.
- customer
Endpoint 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.
- health
Check GetMagic Wan Ipsec Tunnel Ipsec Tunnel Health Check - id String
- Tunnel identifier tag.
- interface
Address 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.
- modified
On 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.
- psk
Metadata GetMagic Wan Ipsec Tunnel Ipsec Tunnel Psk Metadata - The PSK metadata that includes when the PSK was generated.
- replay
Protection Boolean - If
true
, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
- allow
Null booleanCipher - When
true
, the tunnel can use a null-cipher (ENCR_NULL
) in the ESP tunnel (Phase 2). - cloudflare
Endpoint string - The IP address assigned to the Cloudflare side of the IPsec tunnel.
- created
On string - The date and time the tunnel was created.
- customer
Endpoint 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.
- health
Check GetMagic Wan Ipsec Tunnel Ipsec Tunnel Health Check - id string
- Tunnel identifier tag.
- interface
Address 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.
- modified
On 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.
- psk
Metadata GetMagic Wan Ipsec Tunnel Ipsec Tunnel Psk Metadata - The PSK metadata that includes when the PSK was generated.
- replay
Protection boolean - If
true
, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.
- allow_
null_ boolcipher - 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 GetMagic Wan Ipsec Tunnel Ipsec Tunnel Health Check - 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 GetMagic Wan Ipsec Tunnel Ipsec Tunnel Psk Metadata - 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.
- allow
Null BooleanCipher - When
true
, the tunnel can use a null-cipher (ENCR_NULL
) in the ESP tunnel (Phase 2). - cloudflare
Endpoint String - The IP address assigned to the Cloudflare side of the IPsec tunnel.
- created
On String - The date and time the tunnel was created.
- customer
Endpoint 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.
- health
Check Property Map - id String
- Tunnel identifier tag.
- interface
Address 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.
- modified
On 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.
- psk
Metadata Property Map - The PSK metadata that includes when the PSK was generated.
- replay
Protection 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
Get
Magic Wan Ipsec Tunnel Ipsec Tunnel Health Check Target - 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
Get
Magic Wan Ipsec Tunnel Ipsec Tunnel Health Check Target - 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
Get
Magic Wan Ipsec Tunnel Ipsec Tunnel Health Check Target - 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
Get
Magic Wan Ipsec Tunnel Ipsec Tunnel Health Check Target - 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
Get
Magic Wan Ipsec Tunnel Ipsec Tunnel Health Check Target - 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
- Last
Generated stringOn - The date and time the tunnel was last modified.
- Last
Generated stringOn - The date and time the tunnel was last modified.
- last
Generated StringOn - The date and time the tunnel was last modified.
- last
Generated stringOn - The date and time the tunnel was last modified.
- last_
generated_ stron - The date and time the tunnel was last modified.
- last
Generated StringOn - 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.