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

cloudflare.getMagicWanGreTunnel

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 exampleMagicWanGreTunnel = cloudflare.getMagicWanGreTunnel({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        greTunnelId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_magic_wan_gre_tunnel = cloudflare.get_magic_wan_gre_tunnel(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        gre_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.LookupMagicWanGreTunnel(ctx, &cloudflare.LookupMagicWanGreTunnelArgs{
    			AccountId:   "023e105f4ecef8ad9ca31a8372d0c353",
    			GreTunnelId: "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 exampleMagicWanGreTunnel = Cloudflare.GetMagicWanGreTunnel.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            GreTunnelId = "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.GetMagicWanGreTunnelArgs;
    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 exampleMagicWanGreTunnel = CloudflareFunctions.getMagicWanGreTunnel(GetMagicWanGreTunnelArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .greTunnelId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    variables:
      exampleMagicWanGreTunnel:
        fn::invoke:
          function: cloudflare:getMagicWanGreTunnel
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            greTunnelId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Using getMagicWanGreTunnel

    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 getMagicWanGreTunnel(args: GetMagicWanGreTunnelArgs, opts?: InvokeOptions): Promise<GetMagicWanGreTunnelResult>
    function getMagicWanGreTunnelOutput(args: GetMagicWanGreTunnelOutputArgs, opts?: InvokeOptions): Output<GetMagicWanGreTunnelResult>
    def get_magic_wan_gre_tunnel(account_id: Optional[str] = None,
                                 gre_tunnel_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetMagicWanGreTunnelResult
    def get_magic_wan_gre_tunnel_output(account_id: Optional[pulumi.Input[str]] = None,
                                 gre_tunnel_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetMagicWanGreTunnelResult]
    func LookupMagicWanGreTunnel(ctx *Context, args *LookupMagicWanGreTunnelArgs, opts ...InvokeOption) (*LookupMagicWanGreTunnelResult, error)
    func LookupMagicWanGreTunnelOutput(ctx *Context, args *LookupMagicWanGreTunnelOutputArgs, opts ...InvokeOption) LookupMagicWanGreTunnelResultOutput

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

    public static class GetMagicWanGreTunnel 
    {
        public static Task<GetMagicWanGreTunnelResult> InvokeAsync(GetMagicWanGreTunnelArgs args, InvokeOptions? opts = null)
        public static Output<GetMagicWanGreTunnelResult> Invoke(GetMagicWanGreTunnelInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMagicWanGreTunnelResult> getMagicWanGreTunnel(GetMagicWanGreTunnelArgs args, InvokeOptions options)
    public static Output<GetMagicWanGreTunnelResult> getMagicWanGreTunnel(GetMagicWanGreTunnelArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getMagicWanGreTunnel:getMagicWanGreTunnel
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier
    GreTunnelId string
    Identifier
    AccountId string
    Identifier
    GreTunnelId string
    Identifier
    accountId String
    Identifier
    greTunnelId String
    Identifier
    accountId string
    Identifier
    greTunnelId string
    Identifier
    account_id str
    Identifier
    gre_tunnel_id str
    Identifier
    accountId String
    Identifier
    greTunnelId String
    Identifier

    getMagicWanGreTunnel Result

    The following output properties are available:

    AccountId string
    Identifier
    GreTunnel GetMagicWanGreTunnelGreTunnel
    GreTunnelId string
    Identifier
    Id string
    The provider-assigned unique ID for this managed resource.
    AccountId string
    Identifier
    GreTunnel GetMagicWanGreTunnelGreTunnel
    GreTunnelId string
    Identifier
    Id string
    The provider-assigned unique ID for this managed resource.
    accountId String
    Identifier
    greTunnel GetMagicWanGreTunnelGreTunnel
    greTunnelId String
    Identifier
    id String
    The provider-assigned unique ID for this managed resource.
    accountId string
    Identifier
    greTunnel GetMagicWanGreTunnelGreTunnel
    greTunnelId string
    Identifier
    id string
    The provider-assigned unique ID for this managed resource.
    account_id str
    Identifier
    gre_tunnel GetMagicWanGreTunnelGreTunnel
    gre_tunnel_id str
    Identifier
    id str
    The provider-assigned unique ID for this managed resource.
    accountId String
    Identifier
    greTunnel Property Map
    greTunnelId String
    Identifier
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetMagicWanGreTunnelGreTunnel

    CloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    CreatedOn string
    The date and time the tunnel was created.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    Description string
    An optional description of the GRE tunnel.
    HealthCheck GetMagicWanGreTunnelGreTunnelHealthCheck
    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.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    Name string
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    Ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    CloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    CreatedOn string
    The date and time the tunnel was created.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    Description string
    An optional description of the GRE tunnel.
    HealthCheck GetMagicWanGreTunnelGreTunnelHealthCheck
    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.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    Name string
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    Ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    cloudflareGreEndpoint String
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    createdOn String
    The date and time the tunnel was created.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    description String
    An optional description of the GRE tunnel.
    healthCheck GetMagicWanGreTunnelGreTunnelHealthCheck
    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.
    mtu Integer
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    name String
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    ttl Integer
    Time To Live (TTL) in number of hops of the GRE tunnel.
    cloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    createdOn string
    The date and time the tunnel was created.
    customerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    description string
    An optional description of the GRE tunnel.
    healthCheck GetMagicWanGreTunnelGreTunnelHealthCheck
    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.
    mtu number
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    name string
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    ttl number
    Time To Live (TTL) in number of hops of the GRE tunnel.
    cloudflare_gre_endpoint str
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    created_on str
    The date and time the tunnel was created.
    customer_gre_endpoint str
    The IP address assigned to the customer side of the GRE tunnel.
    description str
    An optional description of the GRE tunnel.
    health_check GetMagicWanGreTunnelGreTunnelHealthCheck
    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.
    mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    name str
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    cloudflareGreEndpoint String
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    createdOn String
    The date and time the tunnel was created.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    description String
    An optional description of the GRE 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.
    mtu Number
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.
    name String
    The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.
    ttl Number
    Time To Live (TTL) in number of hops of the GRE tunnel.

    GetMagicWanGreTunnelGreTunnelHealthCheck

    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 GetMagicWanGreTunnelGreTunnelHealthCheckTarget
    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 GetMagicWanGreTunnelGreTunnelHealthCheckTarget
    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 GetMagicWanGreTunnelGreTunnelHealthCheckTarget
    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 GetMagicWanGreTunnelGreTunnelHealthCheckTarget
    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 GetMagicWanGreTunnelGreTunnelHealthCheckTarget
    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".

    GetMagicWanGreTunnelGreTunnelHealthCheckTarget

    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.

    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