1. Packages
  2. Cloudflare
  3. API Docs
  4. GreTunnel
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

cloudflare.GreTunnel

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

    Provides a resource, that manages GRE tunnels for Magic Transit.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.GreTunnel("example", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        cloudflareGreEndpoint: "203.0.113.2",
        customerGreEndpoint: "203.0.113.1",
        description: "Tunnel for ISP X",
        healthCheckEnabled: true,
        healthCheckTarget: "203.0.113.1",
        healthCheckType: "reply",
        interfaceAddress: "192.0.2.0/31",
        mtu: 1476,
        name: "GRE_1",
        ttl: 64,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.GreTunnel("example",
        account_id="f037e56e89293a057740de681ac9abbe",
        cloudflare_gre_endpoint="203.0.113.2",
        customer_gre_endpoint="203.0.113.1",
        description="Tunnel for ISP X",
        health_check_enabled=True,
        health_check_target="203.0.113.1",
        health_check_type="reply",
        interface_address="192.0.2.0/31",
        mtu=1476,
        name="GRE_1",
        ttl=64)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewGreTunnel(ctx, "example", &cloudflare.GreTunnelArgs{
    			AccountId:             pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			CloudflareGreEndpoint: pulumi.String("203.0.113.2"),
    			CustomerGreEndpoint:   pulumi.String("203.0.113.1"),
    			Description:           pulumi.String("Tunnel for ISP X"),
    			HealthCheckEnabled:    pulumi.Bool(true),
    			HealthCheckTarget:     pulumi.String("203.0.113.1"),
    			HealthCheckType:       pulumi.String("reply"),
    			InterfaceAddress:      pulumi.String("192.0.2.0/31"),
    			Mtu:                   pulumi.Int(1476),
    			Name:                  pulumi.String("GRE_1"),
    			Ttl:                   pulumi.Int(64),
    		})
    		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 example = new Cloudflare.GreTunnel("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            CloudflareGreEndpoint = "203.0.113.2",
            CustomerGreEndpoint = "203.0.113.1",
            Description = "Tunnel for ISP X",
            HealthCheckEnabled = true,
            HealthCheckTarget = "203.0.113.1",
            HealthCheckType = "reply",
            InterfaceAddress = "192.0.2.0/31",
            Mtu = 1476,
            Name = "GRE_1",
            Ttl = 64,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.GreTunnel;
    import com.pulumi.cloudflare.GreTunnelArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new GreTunnel("example", GreTunnelArgs.builder()        
                .accountId("f037e56e89293a057740de681ac9abbe")
                .cloudflareGreEndpoint("203.0.113.2")
                .customerGreEndpoint("203.0.113.1")
                .description("Tunnel for ISP X")
                .healthCheckEnabled(true)
                .healthCheckTarget("203.0.113.1")
                .healthCheckType("reply")
                .interfaceAddress("192.0.2.0/31")
                .mtu(1476)
                .name("GRE_1")
                .ttl(64)
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:GreTunnel
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          cloudflareGreEndpoint: 203.0.113.2
          customerGreEndpoint: 203.0.113.1
          description: Tunnel for ISP X
          healthCheckEnabled: true
          healthCheckTarget: 203.0.113.1
          healthCheckType: reply
          interfaceAddress: 192.0.2.0/31
          mtu: 1476
          name: GRE_1
          ttl: 64
    

    Create GreTunnel Resource

    new GreTunnel(name: string, args: GreTunnelArgs, opts?: CustomResourceOptions);
    @overload
    def GreTunnel(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[str] = None,
                  cloudflare_gre_endpoint: Optional[str] = None,
                  customer_gre_endpoint: Optional[str] = None,
                  description: Optional[str] = None,
                  health_check_enabled: Optional[bool] = None,
                  health_check_target: Optional[str] = None,
                  health_check_type: Optional[str] = None,
                  interface_address: Optional[str] = None,
                  mtu: Optional[int] = None,
                  name: Optional[str] = None,
                  ttl: Optional[int] = None)
    @overload
    def GreTunnel(resource_name: str,
                  args: GreTunnelArgs,
                  opts: Optional[ResourceOptions] = None)
    func NewGreTunnel(ctx *Context, name string, args GreTunnelArgs, opts ...ResourceOption) (*GreTunnel, error)
    public GreTunnel(string name, GreTunnelArgs args, CustomResourceOptions? opts = null)
    public GreTunnel(String name, GreTunnelArgs args)
    public GreTunnel(String name, GreTunnelArgs args, CustomResourceOptions options)
    
    type: cloudflare:GreTunnel
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GreTunnelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GreTunnelArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GreTunnelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GreTunnelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GreTunnelArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    GreTunnel Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GreTunnel resource accepts the following input properties:

    CloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    InterfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    Name string
    Name of the GRE tunnel.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Description string
    Description of the GRE tunnel intent.
    HealthCheckEnabled bool
    Specifies if ICMP tunnel health checks are enabled.
    HealthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    HealthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the 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.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    InterfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    Name string
    Name of the GRE tunnel.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    Description string
    Description of the GRE tunnel intent.
    HealthCheckEnabled bool
    Specifies if ICMP tunnel health checks are enabled.
    HealthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    HealthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the 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.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    interfaceAddress String
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    name String
    Name of the GRE tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    description String
    Description of the GRE tunnel intent.
    healthCheckEnabled Boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget String
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType String
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    mtu Integer
    Maximum Transmission Unit (MTU) in bytes for the 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.
    customerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    interfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    name string
    Name of the GRE tunnel.
    accountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    description string
    Description of the GRE tunnel intent.
    healthCheckEnabled boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    mtu number
    Maximum Transmission Unit (MTU) in bytes for the 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.
    customer_gre_endpoint str
    The IP address assigned to the customer side of the GRE tunnel.
    interface_address str
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    name str
    Name of the GRE tunnel.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    description str
    Description of the GRE tunnel intent.
    health_check_enabled bool
    Specifies if ICMP tunnel health checks are enabled.
    health_check_target str
    The IP address of the customer endpoint that will receive tunnel health checks.
    health_check_type str
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    mtu int
    Maximum Transmission Unit (MTU) in bytes for the 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.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    interfaceAddress String
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    name String
    Name of the GRE tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    description String
    Description of the GRE tunnel intent.
    healthCheckEnabled Boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget String
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType String
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    mtu Number
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    ttl Number
    Time To Live (TTL) in number of hops of the GRE tunnel.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GreTunnel resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GreTunnel Resource

    Get an existing GreTunnel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GreTunnelState, opts?: CustomResourceOptions): GreTunnel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            cloudflare_gre_endpoint: Optional[str] = None,
            customer_gre_endpoint: Optional[str] = None,
            description: Optional[str] = None,
            health_check_enabled: Optional[bool] = None,
            health_check_target: Optional[str] = None,
            health_check_type: Optional[str] = None,
            interface_address: Optional[str] = None,
            mtu: Optional[int] = None,
            name: Optional[str] = None,
            ttl: Optional[int] = None) -> GreTunnel
    func GetGreTunnel(ctx *Context, name string, id IDInput, state *GreTunnelState, opts ...ResourceOption) (*GreTunnel, error)
    public static GreTunnel Get(string name, Input<string> id, GreTunnelState? state, CustomResourceOptions? opts = null)
    public static GreTunnel get(String name, Output<String> id, GreTunnelState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    CloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    Description string
    Description of the GRE tunnel intent.
    HealthCheckEnabled bool
    Specifies if ICMP tunnel health checks are enabled.
    HealthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    HealthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    InterfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    Name string
    Name of the GRE tunnel.
    Ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    CloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    CustomerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    Description string
    Description of the GRE tunnel intent.
    HealthCheckEnabled bool
    Specifies if ICMP tunnel health checks are enabled.
    HealthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    HealthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    InterfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    Mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    Name string
    Name of the GRE tunnel.
    Ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cloudflareGreEndpoint String
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    description String
    Description of the GRE tunnel intent.
    healthCheckEnabled Boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget String
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType String
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    interfaceAddress String
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    mtu Integer
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    name String
    Name of the GRE tunnel.
    ttl Integer
    Time To Live (TTL) in number of hops of the GRE tunnel.
    accountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cloudflareGreEndpoint string
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    customerGreEndpoint string
    The IP address assigned to the customer side of the GRE tunnel.
    description string
    Description of the GRE tunnel intent.
    healthCheckEnabled boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget string
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType string
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    interfaceAddress string
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    mtu number
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    name string
    Name of the GRE tunnel.
    ttl number
    Time To Live (TTL) in number of hops of the GRE tunnel.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cloudflare_gre_endpoint str
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    customer_gre_endpoint str
    The IP address assigned to the customer side of the GRE tunnel.
    description str
    Description of the GRE tunnel intent.
    health_check_enabled bool
    Specifies if ICMP tunnel health checks are enabled.
    health_check_target str
    The IP address of the customer endpoint that will receive tunnel health checks.
    health_check_type str
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    interface_address str
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    mtu int
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    name str
    Name of the GRE tunnel.
    ttl int
    Time To Live (TTL) in number of hops of the GRE tunnel.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    cloudflareGreEndpoint String
    The IP address assigned to the Cloudflare side of the GRE tunnel.
    customerGreEndpoint String
    The IP address assigned to the customer side of the GRE tunnel.
    description String
    Description of the GRE tunnel intent.
    healthCheckEnabled Boolean
    Specifies if ICMP tunnel health checks are enabled.
    healthCheckTarget String
    The IP address of the customer endpoint that will receive tunnel health checks.
    healthCheckType String
    Specifies the ICMP echo type for the health check. Available values: request, reply.
    interfaceAddress String
    31-bit prefix (/31 in CIDR notation) supporting 2 hosts, one for each side of the tunnel.
    mtu Number
    Maximum Transmission Unit (MTU) in bytes for the GRE tunnel.
    name String
    Name of the GRE tunnel.
    ttl Number
    Time To Live (TTL) in number of hops of the GRE tunnel.

    Import

    $ pulumi import cloudflare:index/greTunnel:GreTunnel example <account_id>/<tunnel_id>
    

    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 v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi