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
Spectrum
Application Dns Args 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
.- Zone
Id string The DNS zone ID to add the application to
- Argo
Smart boolRouting . Enables Argo Smart Routing. Defaults to
false
.- Edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- Edge
Ips List<string> . 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 List<string> A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- Origin
Dns SpectrumApplication Origin Dns Args A destination DNS addresses to the origin. Fields documented below.
- Origin
Port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- Origin
Port SpectrumRange Application Origin Port Range Args If using
origin_dns
and notorigin_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 string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- Tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- Traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.
- Dns
Spectrum
Application Dns 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
.- Zone
Id string The DNS zone ID to add the application to
- Argo
Smart boolRouting . Enables Argo Smart Routing. Defaults to
false
.- Edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- Edge
Ips []string . 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 []string A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- Origin
Dns SpectrumApplication Origin Dns A destination DNS addresses to the origin. Fields documented below.
- Origin
Port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- Origin
Port SpectrumRange Application Origin Port Range If using
origin_dns
and notorigin_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 string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- Tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- Traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.
- dns
Spectrum
Application Dns 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
.- zone
Id string The DNS zone ID to add the application to
- argo
Smart booleanRouting . Enables Argo Smart Routing. Defaults to
false
.- edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- edge
Ips string[] . A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.
- ip
Firewall boolean Enables the IP Firewall for this application. Defaults to
true
.- origin
Directs string[] A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- origin
Dns SpectrumApplication Origin Dns A destination DNS addresses to the origin. Fields documented below.
- origin
Port number If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- origin
Port SpectrumRange Application Origin Port Range If using
origin_dns
and notorigin_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 string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.
- dns
Spectrum
Application Dns Args 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_ boolrouting . Enables Argo Smart Routing. Defaults to
false
.- edge_
ip_ strconnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- 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 SpectrumApplication Origin Dns Args A destination DNS addresses to the origin. Fields documented below.
- origin_
port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- origin_
port_ Spectrumrange Application Origin Port Range Args If using
origin_dns
and notorigin_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
, andsimple
. Defaults tooff
.- tls str
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- traffic_
type str Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.
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:
- Argo
Smart boolRouting . Enables Argo Smart Routing. Defaults to
false
.- Dns
Spectrum
Application Dns Args The name and type of DNS record for the Spectrum application. Fields documented below.
- Edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- Edge
Ips List<string> . 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 List<string> A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- Origin
Dns SpectrumApplication Origin Dns Args A destination DNS addresses to the origin. Fields documented below.
- Origin
Port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- Origin
Port SpectrumRange Application Origin Port Range Args If using
origin_dns
and notorigin_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
.- Proxy
Protocol string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- Tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- Traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.- Zone
Id string The DNS zone ID to add the application to
- Argo
Smart boolRouting . Enables Argo Smart Routing. Defaults to
false
.- Dns
Spectrum
Application Dns The name and type of DNS record for the Spectrum application. Fields documented below.
- Edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- Edge
Ips []string . 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 []string A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- Origin
Dns SpectrumApplication Origin Dns A destination DNS addresses to the origin. Fields documented below.
- Origin
Port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- Origin
Port SpectrumRange Application Origin Port Range If using
origin_dns
and notorigin_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
.- Proxy
Protocol string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- Tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- Traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.- Zone
Id string The DNS zone ID to add the application to
- argo
Smart booleanRouting . Enables Argo Smart Routing. Defaults to
false
.- dns
Spectrum
Application Dns The name and type of DNS record for the Spectrum application. Fields documented below.
- edge
Ip stringConnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- edge
Ips string[] . A list of edge IPs (IPv4 and/or IPv6) to configure Spectrum application to. Requires Bring Your Own IP provisioned.
- ip
Firewall boolean Enables the IP Firewall for this application. Defaults to
true
.- origin
Directs string[] A list of destination addresses to the origin. e.g.
tcp://192.0.2.1:22
.- origin
Dns SpectrumApplication Origin Dns A destination DNS addresses to the origin. Fields documented below.
- origin
Port number If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- origin
Port SpectrumRange Application Origin Port Range If using
origin_dns
and notorigin_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
.- proxy
Protocol string Enables a proxy protocol to the origin. Valid values are:
off
,v1
,v2
, andsimple
. Defaults tooff
.- tls string
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- traffic
Type string Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.- zone
Id string The DNS zone ID to add the application to
- argo_
smart_ boolrouting . Enables Argo Smart Routing. Defaults to
false
.- dns
Spectrum
Application Dns Args The name and type of DNS record for the Spectrum application. Fields documented below.
- edge_
ip_ strconnectivity . Choose which types of IP addresses will be provisioned for this subdomain. Valid values are:
all
,ipv4
,ipv6
. Defaults toall
.- 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 SpectrumApplication Origin Dns Args A destination DNS addresses to the origin. Fields documented below.
- origin_
port int If using
origin_dns
and notorigin_port_range
, this is a required attribute. Origin port to proxy traffice to e.g.22
.- origin_
port_ Spectrumrange Application Origin Port Range Args If using
origin_dns
and notorigin_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
, andsimple
. Defaults tooff
.- tls str
TLS configuration option for Cloudflare to connect to your origin. Valid values are:
off
,flexible
,full
andstrict
. Defaults tooff
.- traffic_
type str Sets application type. Valid values are:
direct
,http
,https
. Defaults todirect
.- zone_
id str The DNS zone ID to add the application to
Supporting Types
SpectrumApplicationDns
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
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.