Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

SpectrumApplication

Provides a Cloudflare Spectrum Application. You can extend the power of Cloudflare’s DDoS, TLS, and IP Firewall to your other TCP-based services.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        // Define a spectrum application proxies ssh traffic
        var sshProxy = new Cloudflare.SpectrumApplication("sshProxy", new Cloudflare.SpectrumApplicationArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Protocol = "tcp/22",
            TrafficType = "direct",
            Dns = new Cloudflare.Inputs.SpectrumApplicationDnsArgs
            {
                Type = "CNAME",
                Name = "ssh.example.com",
            },
            OriginDirects = 
            {
                "tcp://109.151.40.129:22",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewSpectrumApplication(ctx, "sshProxy", &cloudflare.SpectrumApplicationArgs{
            ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
            Protocol:    pulumi.String("tcp/22"),
            TrafficType: pulumi.String("direct"),
            Dns: &cloudflare.SpectrumApplicationDnsArgs{
                Type: pulumi.String("CNAME"),
                Name: pulumi.String("ssh.example.com"),
            },
            OriginDirects: pulumi.StringArray{
                pulumi.String("tcp://109.151.40.129:22"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

# Define a spectrum application proxies ssh traffic
ssh_proxy = cloudflare.SpectrumApplication("sshProxy",
    zone_id=var["cloudflare_zone_id"],
    protocol="tcp/22",
    traffic_type="direct",
    dns=cloudflare.SpectrumApplicationDnsArgs(
        type="CNAME",
        name="ssh.example.com",
    ),
    origin_directs=["tcp://109.151.40.129:22"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

// Define a spectrum application proxies ssh traffic
const sshProxy = new cloudflare.SpectrumApplication("sshProxy", {
    zoneId: _var.cloudflare_zone_id,
    protocol: "tcp/22",
    trafficType: "direct",
    dns: {
        type: "CNAME",
        name: "ssh.example.com",
    },
    originDirects: ["tcp://109.151.40.129:22"],
});

Create a SpectrumApplication Resource

new SpectrumApplication(name: string, args: SpectrumApplicationArgs, opts?: CustomResourceOptions);
def SpectrumApplication(resource_name: str, opts: Optional[ResourceOptions] = None, argo_smart_routing: Optional[bool] = None, dns: Optional[SpectrumApplicationDnsArgs] = None, edge_ip_connectivity: Optional[str] = None, edge_ips: Optional[Sequence[str]] = None, ip_firewall: Optional[bool] = None, origin_directs: Optional[Sequence[str]] = None, origin_dns: Optional[SpectrumApplicationOriginDnsArgs] = None, origin_port: Optional[int] = None, origin_port_range: Optional[SpectrumApplicationOriginPortRangeArgs] = None, protocol: Optional[str] = None, proxy_protocol: Optional[str] = None, tls: Optional[str] = None, traffic_type: Optional[str] = None, zone_id: Optional[str] = None)
func NewSpectrumApplication(ctx *Context, name string, args SpectrumApplicationArgs, opts ...ResourceOption) (*SpectrumApplication, error)
public SpectrumApplication(string name, SpectrumApplicationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SpectrumApplicationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SpectrumApplicationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SpectrumApplicationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SpectrumApplication Resource Properties

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

Inputs

The SpectrumApplication resource accepts the following input properties:

Dns SpectrumApplicationDnsArgs

The name and type of DNS record for the Spectrum application. Fields documented below.

Protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

ZoneId string

The DNS zone ID to add the application to

ArgoSmartRouting bool

. Enables Argo Smart Routing. Defaults to false.

EdgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

EdgeIps List<string>

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

IpFirewall bool

Enables the IP Firewall for this application. Defaults to true.

OriginDirects List<string>

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

OriginDns SpectrumApplicationOriginDnsArgs

A destination DNS addresses to the origin. Fields documented below.

OriginPort int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

OriginPortRange SpectrumApplicationOriginPortRangeArgs

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

ProxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

Tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

TrafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

Dns SpectrumApplicationDns

The name and type of DNS record for the Spectrum application. Fields documented below.

Protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

ZoneId string

The DNS zone ID to add the application to

ArgoSmartRouting bool

. Enables Argo Smart Routing. Defaults to false.

EdgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

EdgeIps []string

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

IpFirewall bool

Enables the IP Firewall for this application. Defaults to true.

OriginDirects []string

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

OriginDns SpectrumApplicationOriginDns

A destination DNS addresses to the origin. Fields documented below.

OriginPort int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

OriginPortRange SpectrumApplicationOriginPortRange

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

ProxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

Tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

TrafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

dns SpectrumApplicationDns

The name and type of DNS record for the Spectrum application. Fields documented below.

protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

zoneId string

The DNS zone ID to add the application to

argoSmartRouting boolean

. Enables Argo Smart Routing. Defaults to false.

edgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

edgeIps string[]

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

ipFirewall boolean

Enables the IP Firewall for this application. Defaults to true.

originDirects string[]

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

originDns SpectrumApplicationOriginDns

A destination DNS addresses to the origin. Fields documented below.

originPort number

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

originPortRange SpectrumApplicationOriginPortRange

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

proxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

trafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

dns SpectrumApplicationDnsArgs

The name and type of DNS record for the Spectrum application. Fields documented below.

protocol str

The port configuration at Cloudflare’s edge. e.g. tcp/22.

zone_id str

The DNS zone ID to add the application to

argo_smart_routing bool

. Enables Argo Smart Routing. Defaults to false.

edge_ip_connectivity str

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

edge_ips Sequence[str]

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

ip_firewall bool

Enables the IP Firewall for this application. Defaults to true.

origin_directs Sequence[str]

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

origin_dns SpectrumApplicationOriginDnsArgs

A destination DNS addresses to the origin. Fields documented below.

origin_port int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

origin_port_range SpectrumApplicationOriginPortRangeArgs

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

proxy_protocol str

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

tls str

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

traffic_type str

Sets application type. Valid values are: direct, http, https. Defaults to direct.

Outputs

All input properties are implicitly available as output properties. Additionally, the SpectrumApplication 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing SpectrumApplication Resource

Get an existing SpectrumApplication 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?: SpectrumApplicationState, opts?: CustomResourceOptions): SpectrumApplication
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, argo_smart_routing: Optional[bool] = None, dns: Optional[SpectrumApplicationDnsArgs] = None, edge_ip_connectivity: Optional[str] = None, edge_ips: Optional[Sequence[str]] = None, ip_firewall: Optional[bool] = None, origin_directs: Optional[Sequence[str]] = None, origin_dns: Optional[SpectrumApplicationOriginDnsArgs] = None, origin_port: Optional[int] = None, origin_port_range: Optional[SpectrumApplicationOriginPortRangeArgs] = None, protocol: Optional[str] = None, proxy_protocol: Optional[str] = None, tls: Optional[str] = None, traffic_type: Optional[str] = None, zone_id: Optional[str] = None) -> SpectrumApplication
func GetSpectrumApplication(ctx *Context, name string, id IDInput, state *SpectrumApplicationState, opts ...ResourceOption) (*SpectrumApplication, error)
public static SpectrumApplication Get(string name, Input<string> id, SpectrumApplicationState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ArgoSmartRouting bool

. Enables Argo Smart Routing. Defaults to false.

Dns SpectrumApplicationDnsArgs

The name and type of DNS record for the Spectrum application. Fields documented below.

EdgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

EdgeIps List<string>

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

IpFirewall bool

Enables the IP Firewall for this application. Defaults to true.

OriginDirects List<string>

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

OriginDns SpectrumApplicationOriginDnsArgs

A destination DNS addresses to the origin. Fields documented below.

OriginPort int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

OriginPortRange SpectrumApplicationOriginPortRangeArgs

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

Protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

ProxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

Tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

TrafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

ZoneId string

The DNS zone ID to add the application to

ArgoSmartRouting bool

. Enables Argo Smart Routing. Defaults to false.

Dns SpectrumApplicationDns

The name and type of DNS record for the Spectrum application. Fields documented below.

EdgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

EdgeIps []string

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

IpFirewall bool

Enables the IP Firewall for this application. Defaults to true.

OriginDirects []string

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

OriginDns SpectrumApplicationOriginDns

A destination DNS addresses to the origin. Fields documented below.

OriginPort int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

OriginPortRange SpectrumApplicationOriginPortRange

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

Protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

ProxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

Tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

TrafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

ZoneId string

The DNS zone ID to add the application to

argoSmartRouting boolean

. Enables Argo Smart Routing. Defaults to false.

dns SpectrumApplicationDns

The name and type of DNS record for the Spectrum application. Fields documented below.

edgeIpConnectivity string

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

edgeIps string[]

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

ipFirewall boolean

Enables the IP Firewall for this application. Defaults to true.

originDirects string[]

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

originDns SpectrumApplicationOriginDns

A destination DNS addresses to the origin. Fields documented below.

originPort number

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

originPortRange SpectrumApplicationOriginPortRange

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

protocol string

The port configuration at Cloudflare’s edge. e.g. tcp/22.

proxyProtocol string

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

tls string

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

trafficType string

Sets application type. Valid values are: direct, http, https. Defaults to direct.

zoneId string

The DNS zone ID to add the application to

argo_smart_routing bool

. Enables Argo Smart Routing. Defaults to false.

dns SpectrumApplicationDnsArgs

The name and type of DNS record for the Spectrum application. Fields documented below.

edge_ip_connectivity str

. Choose which types of IP addresses will be provisioned for this subdomain. Valid values are: all, ipv4, ipv6. Defaults to all.

edge_ips Sequence[str]

. A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.

ip_firewall bool

Enables the IP Firewall for this application. Defaults to true.

origin_directs Sequence[str]

A list of destination addresses to the origin. e.g. tcp://192.0.2.1:22.

origin_dns SpectrumApplicationOriginDnsArgs

A destination DNS addresses to the origin. Fields documented below.

origin_port int

If using origin_dns and not origin_port_range, this is a required attribute. Origin port to proxy traffice to e.g. 22.

origin_port_range SpectrumApplicationOriginPortRangeArgs

If using origin_dns and not origin_port, this is a required attribute. Origin port range to proxy traffice to. When using a range, the protocol field must also specify a range, e.g. tcp/22-23. Fields documented below.

protocol str

The port configuration at Cloudflare’s edge. e.g. tcp/22.

proxy_protocol str

Enables a proxy protocol to the origin. Valid values are: off, v1, v2, and simple. Defaults to off.

tls str

TLS configuration option for Cloudflare to connect to your origin. Valid values are: off, flexible, full and strict. Defaults to off.

traffic_type str

Sets application type. Valid values are: direct, http, https. Defaults to direct.

zone_id str

The DNS zone ID to add the application to

Supporting Types

SpectrumApplicationDns

Name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

Type string

The type of DNS record associated with the application. Valid values: CNAME.

Name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

Type string

The type of DNS record associated with the application. Valid values: CNAME.

name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

type string

The type of DNS record associated with the application. Valid values: CNAME.

name str

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

type str

The type of DNS record associated with the application. Valid values: CNAME.

SpectrumApplicationOriginDns

Name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

Name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

name string

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

name str

Fully qualified domain name of the origin e.g. origin-ssh.example.com.

SpectrumApplicationOriginPortRange

End int

Upper bound of the origin port range, e.g. 2000

Start int

Lower bound of the origin port range, e.g. 1000

End int

Upper bound of the origin port range, e.g. 2000

Start int

Lower bound of the origin port range, e.g. 1000

end number

Upper bound of the origin port range, e.g. 2000

start number

Lower bound of the origin port range, e.g. 1000

end int

Upper bound of the origin port range, e.g. 2000

start int

Lower bound of the origin port range, e.g. 1000

Import

Spectrum resource can be imported using a zone ID and Application ID, e.g.

 $ pulumi import cloudflare:index/spectrumApplication:SpectrumApplication example d41d8cd98f00b204e9800998ecf8427e/9a7806061c88ada191ed06f989cc3dac

where* d41d8cd98f00b204e9800998ecf8427e - zone ID, as returned from API * 9a7806061c88ada191ed06f989cc3dac - Application ID

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.