cloudflare.GreTunnel
Explore with Pulumi AI
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",
name: "GRE_1",
customerGreEndpoint: "203.0.113.1",
cloudflareGreEndpoint: "203.0.113.2",
interfaceAddress: "192.0.2.0/31",
description: "Tunnel for ISP X",
ttl: 64,
mtu: 1476,
healthCheckEnabled: true,
healthCheckTarget: "203.0.113.1",
healthCheckType: "reply",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.GreTunnel("example",
account_id="f037e56e89293a057740de681ac9abbe",
name="GRE_1",
customer_gre_endpoint="203.0.113.1",
cloudflare_gre_endpoint="203.0.113.2",
interface_address="192.0.2.0/31",
description="Tunnel for ISP X",
ttl=64,
mtu=1476,
health_check_enabled=True,
health_check_target="203.0.113.1",
health_check_type="reply")
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"),
Name: pulumi.String("GRE_1"),
CustomerGreEndpoint: pulumi.String("203.0.113.1"),
CloudflareGreEndpoint: pulumi.String("203.0.113.2"),
InterfaceAddress: pulumi.String("192.0.2.0/31"),
Description: pulumi.String("Tunnel for ISP X"),
Ttl: pulumi.Int(64),
Mtu: pulumi.Int(1476),
HealthCheckEnabled: pulumi.Bool(true),
HealthCheckTarget: pulumi.String("203.0.113.1"),
HealthCheckType: pulumi.String("reply"),
})
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",
Name = "GRE_1",
CustomerGreEndpoint = "203.0.113.1",
CloudflareGreEndpoint = "203.0.113.2",
InterfaceAddress = "192.0.2.0/31",
Description = "Tunnel for ISP X",
Ttl = 64,
Mtu = 1476,
HealthCheckEnabled = true,
HealthCheckTarget = "203.0.113.1",
HealthCheckType = "reply",
});
});
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")
.name("GRE_1")
.customerGreEndpoint("203.0.113.1")
.cloudflareGreEndpoint("203.0.113.2")
.interfaceAddress("192.0.2.0/31")
.description("Tunnel for ISP X")
.ttl(64)
.mtu(1476)
.healthCheckEnabled(true)
.healthCheckTarget("203.0.113.1")
.healthCheckType("reply")
.build());
}
}
resources:
example:
type: cloudflare:GreTunnel
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: GRE_1
customerGreEndpoint: 203.0.113.1
cloudflareGreEndpoint: 203.0.113.2
interfaceAddress: 192.0.2.0/31
description: Tunnel for ISP X
ttl: 64
mtu: 1476
healthCheckEnabled: true
healthCheckTarget: 203.0.113.1
healthCheckType: reply
Create GreTunnel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GreTunnel(name: string, args: GreTunnelArgs, opts?: CustomResourceOptions);
@overload
def GreTunnel(resource_name: str,
args: GreTunnelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GreTunnel(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloudflare_gre_endpoint: Optional[str] = None,
customer_gre_endpoint: Optional[str] = None,
interface_address: Optional[str] = None,
name: Optional[str] = None,
account_id: 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,
mtu: Optional[int] = None,
ttl: Optional[int] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var greTunnelResource = new Cloudflare.GreTunnel("greTunnelResource", new()
{
CloudflareGreEndpoint = "string",
CustomerGreEndpoint = "string",
InterfaceAddress = "string",
Name = "string",
AccountId = "string",
Description = "string",
HealthCheckEnabled = false,
HealthCheckTarget = "string",
HealthCheckType = "string",
Mtu = 0,
Ttl = 0,
});
example, err := cloudflare.NewGreTunnel(ctx, "greTunnelResource", &cloudflare.GreTunnelArgs{
CloudflareGreEndpoint: pulumi.String("string"),
CustomerGreEndpoint: pulumi.String("string"),
InterfaceAddress: pulumi.String("string"),
Name: pulumi.String("string"),
AccountId: pulumi.String("string"),
Description: pulumi.String("string"),
HealthCheckEnabled: pulumi.Bool(false),
HealthCheckTarget: pulumi.String("string"),
HealthCheckType: pulumi.String("string"),
Mtu: pulumi.Int(0),
Ttl: pulumi.Int(0),
})
var greTunnelResource = new GreTunnel("greTunnelResource", GreTunnelArgs.builder()
.cloudflareGreEndpoint("string")
.customerGreEndpoint("string")
.interfaceAddress("string")
.name("string")
.accountId("string")
.description("string")
.healthCheckEnabled(false)
.healthCheckTarget("string")
.healthCheckType("string")
.mtu(0)
.ttl(0)
.build());
gre_tunnel_resource = cloudflare.GreTunnel("greTunnelResource",
cloudflare_gre_endpoint="string",
customer_gre_endpoint="string",
interface_address="string",
name="string",
account_id="string",
description="string",
health_check_enabled=False,
health_check_target="string",
health_check_type="string",
mtu=0,
ttl=0)
const greTunnelResource = new cloudflare.GreTunnel("greTunnelResource", {
cloudflareGreEndpoint: "string",
customerGreEndpoint: "string",
interfaceAddress: "string",
name: "string",
accountId: "string",
description: "string",
healthCheckEnabled: false,
healthCheckTarget: "string",
healthCheckType: "string",
mtu: 0,
ttl: 0,
});
type: cloudflare:GreTunnel
properties:
accountId: string
cloudflareGreEndpoint: string
customerGreEndpoint: string
description: string
healthCheckEnabled: false
healthCheckTarget: string
healthCheckType: string
interfaceAddress: string
mtu: 0
name: string
ttl: 0
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:
- Cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- Customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- Interface
Address 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.
- Account
Id 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.
- Health
Check boolEnabled - Specifies if ICMP tunnel health checks are enabled.
- Health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- Health
Check stringType - 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.
- Cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- Customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- Interface
Address 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.
- Account
Id 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.
- Health
Check boolEnabled - Specifies if ICMP tunnel health checks are enabled.
- Health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- Health
Check stringType - 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.
- cloudflare
Gre StringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre StringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- interface
Address 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.
- account
Id 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.
- health
Check BooleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check StringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check StringType - 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.
- cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- interface
Address 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.
- account
Id 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.
- health
Check booleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check stringType - 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_ strendpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer_
gre_ strendpoint - 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_ boolenabled - Specifies if ICMP tunnel health checks are enabled.
- health_
check_ strtarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health_
check_ strtype - 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.
- cloudflare
Gre StringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre StringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- interface
Address 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.
- account
Id 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.
- health
Check BooleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check StringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check StringType - 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.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- Customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- Description string
- Description of the GRE tunnel intent.
- Health
Check boolEnabled - Specifies if ICMP tunnel health checks are enabled.
- Health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- Health
Check stringType - Specifies the ICMP echo type for the health check. Available values:
request
,reply
. - Interface
Address 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.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- Customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- Description string
- Description of the GRE tunnel intent.
- Health
Check boolEnabled - Specifies if ICMP tunnel health checks are enabled.
- Health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- Health
Check stringType - Specifies the ICMP echo type for the health check. Available values:
request
,reply
. - Interface
Address 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.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- cloudflare
Gre StringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre StringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- description String
- Description of the GRE tunnel intent.
- health
Check BooleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check StringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check StringType - Specifies the ICMP echo type for the health check. Available values:
request
,reply
. - interface
Address 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.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- cloudflare
Gre stringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre stringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- description string
- Description of the GRE tunnel intent.
- health
Check booleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check stringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check stringType - Specifies the ICMP echo type for the health check. Available values:
request
,reply
. - interface
Address 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_ strendpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer_
gre_ strendpoint - The IP address assigned to the customer side of the GRE tunnel.
- description str
- Description of the GRE tunnel intent.
- health_
check_ boolenabled - Specifies if ICMP tunnel health checks are enabled.
- health_
check_ strtarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health_
check_ strtype - 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.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- cloudflare
Gre StringEndpoint - The IP address assigned to the Cloudflare side of the GRE tunnel.
- customer
Gre StringEndpoint - The IP address assigned to the customer side of the GRE tunnel.
- description String
- Description of the GRE tunnel intent.
- health
Check BooleanEnabled - Specifies if ICMP tunnel health checks are enabled.
- health
Check StringTarget - The IP address of the customer endpoint that will receive tunnel health checks.
- health
Check StringType - Specifies the ICMP echo type for the health check. Available values:
request
,reply
. - interface
Address 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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.