Cloudflare
CustomHostname
Provides a Cloudflare custom hostname (also known as SSL for SaaS) resource.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var exampleHostname = new Cloudflare.CustomHostname("exampleHostname", new Cloudflare.CustomHostnameArgs
{
Hostname = "hostname.example.com",
Ssls =
{
new Cloudflare.Inputs.CustomHostnameSslArgs
{
Method = "txt",
},
},
ZoneId = "d41d8cd98f00b204e9800998ecf8427e",
});
}
}
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewCustomHostname(ctx, "exampleHostname", &cloudflare.CustomHostnameArgs{
Hostname: pulumi.String("hostname.example.com"),
Ssls: CustomHostnameSslArray{
&CustomHostnameSslArgs{
Method: pulumi.String("txt"),
},
},
ZoneId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_cloudflare as cloudflare
example_hostname = cloudflare.CustomHostname("exampleHostname",
hostname="hostname.example.com",
ssls=[cloudflare.CustomHostnameSslArgs(
method="txt",
)],
zone_id="d41d8cd98f00b204e9800998ecf8427e")
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleHostname = new cloudflare.CustomHostname("example_hostname", {
hostname: "hostname.example.com",
ssls: [{
method: "txt",
}],
zoneId: "d41d8cd98f00b204e9800998ecf8427e",
});
Coming soon!
Create a CustomHostname Resource
new CustomHostname(name: string, args: CustomHostnameArgs, opts?: CustomResourceOptions);
@overload
def CustomHostname(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_origin_server: Optional[str] = None,
custom_origin_sni: Optional[str] = None,
hostname: Optional[str] = None,
ssls: Optional[Sequence[CustomHostnameSslArgs]] = None,
zone_id: Optional[str] = None)
@overload
def CustomHostname(resource_name: str,
args: CustomHostnameArgs,
opts: Optional[ResourceOptions] = None)
func NewCustomHostname(ctx *Context, name string, args CustomHostnameArgs, opts ...ResourceOption) (*CustomHostname, error)
public CustomHostname(string name, CustomHostnameArgs args, CustomResourceOptions? opts = null)
public CustomHostname(String name, CustomHostnameArgs args)
public CustomHostname(String name, CustomHostnameArgs args, CustomResourceOptions options)
type: cloudflare:CustomHostname
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomHostnameArgs
- 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 CustomHostnameArgs
- 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 CustomHostnameArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomHostnameArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomHostnameArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CustomHostname 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 CustomHostname resource accepts the following input properties:
- Hostname string
Hostname you intend to request a certificate for.
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- Custom
Origin stringServer The custom origin server used for certificates.
- Custom
Origin stringSni The custom origin SNI used for certificates.
- Ssls
List<Custom
Hostname Ssl Args> SSL configuration of the certificate. See further notes below.
- Hostname string
Hostname you intend to request a certificate for.
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- Custom
Origin stringServer The custom origin server used for certificates.
- Custom
Origin stringSni The custom origin SNI used for certificates.
- Ssls
[]Custom
Hostname Ssl Args SSL configuration of the certificate. See further notes below.
- hostname String
Hostname you intend to request a certificate for.
- zone
Id String The DNS zone ID where the custom hostname should be assigned.
- custom
Origin StringServer The custom origin server used for certificates.
- custom
Origin StringSni The custom origin SNI used for certificates.
- ssls
List
Hostname Ssl Args> SSL configuration of the certificate. See further notes below.
- hostname string
Hostname you intend to request a certificate for.
- zone
Id string The DNS zone ID where the custom hostname should be assigned.
- custom
Origin stringServer The custom origin server used for certificates.
- custom
Origin stringSni The custom origin SNI used for certificates.
- ssls
Custom
Hostname Ssl Args[] SSL configuration of the certificate. See further notes below.
- hostname str
Hostname you intend to request a certificate for.
- zone_
id str The DNS zone ID where the custom hostname should be assigned.
- custom_
origin_ strserver The custom origin server used for certificates.
- custom_
origin_ strsni The custom origin SNI used for certificates.
- ssls
Sequence[Custom
Hostname Ssl Args] SSL configuration of the certificate. See further notes below.
- hostname String
Hostname you intend to request a certificate for.
- zone
Id String The DNS zone ID where the custom hostname should be assigned.
- custom
Origin StringServer The custom origin server used for certificates.
- custom
Origin StringSni The custom origin SNI used for certificates.
- ssls
List
SSL configuration of the certificate. See further notes below.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomHostname resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Ownership
Verification Dictionary<string, string> - Ownership
Verification Dictionary<string, string>Http - Status string
- Id string
The provider-assigned unique ID for this managed resource.
- Ownership
Verification map[string]string - Ownership
Verification map[string]stringHttp - Status string
- id String
The provider-assigned unique ID for this managed resource.
- ownership
Verification Map - ownership
Verification MapHttp - status String
- id string
The provider-assigned unique ID for this managed resource.
- ownership
Verification {[key: string]: string} - ownership
Verification {[key: string]: string}Http - status string
- id str
The provider-assigned unique ID for this managed resource.
- ownership_
verification Mapping[str, str] - ownership_
verification_ Mapping[str, str]http - status str
- id String
The provider-assigned unique ID for this managed resource.
- ownership
Verification Map - ownership
Verification MapHttp - status String
Look up an Existing CustomHostname Resource
Get an existing CustomHostname 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?: CustomHostnameState, opts?: CustomResourceOptions): CustomHostname
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_origin_server: Optional[str] = None,
custom_origin_sni: Optional[str] = None,
hostname: Optional[str] = None,
ownership_verification: Optional[Mapping[str, str]] = None,
ownership_verification_http: Optional[Mapping[str, str]] = None,
ssls: Optional[Sequence[CustomHostnameSslArgs]] = None,
status: Optional[str] = None,
zone_id: Optional[str] = None) -> CustomHostname
func GetCustomHostname(ctx *Context, name string, id IDInput, state *CustomHostnameState, opts ...ResourceOption) (*CustomHostname, error)
public static CustomHostname Get(string name, Input<string> id, CustomHostnameState? state, CustomResourceOptions? opts = null)
public static CustomHostname get(String name, Output<String> id, CustomHostnameState 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.
- Custom
Origin stringServer The custom origin server used for certificates.
- Custom
Origin stringSni The custom origin SNI used for certificates.
- Hostname string
Hostname you intend to request a certificate for.
- Ownership
Verification Dictionary<string, string> - Ownership
Verification Dictionary<string, string>Http - Ssls
List<Custom
Hostname Ssl Args> SSL configuration of the certificate. See further notes below.
- Status string
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- Custom
Origin stringServer The custom origin server used for certificates.
- Custom
Origin stringSni The custom origin SNI used for certificates.
- Hostname string
Hostname you intend to request a certificate for.
- Ownership
Verification map[string]string - Ownership
Verification map[string]stringHttp - Ssls
[]Custom
Hostname Ssl Args SSL configuration of the certificate. See further notes below.
- Status string
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- custom
Origin StringServer The custom origin server used for certificates.
- custom
Origin StringSni The custom origin SNI used for certificates.
- hostname String
Hostname you intend to request a certificate for.
- ownership
Verification Map - ownership
Verification MapHttp - ssls
List
Hostname Ssl Args> SSL configuration of the certificate. See further notes below.
- status String
- zone
Id String The DNS zone ID where the custom hostname should be assigned.
- custom
Origin stringServer The custom origin server used for certificates.
- custom
Origin stringSni The custom origin SNI used for certificates.
- hostname string
Hostname you intend to request a certificate for.
- ownership
Verification {[key: string]: string} - ownership
Verification {[key: string]: string}Http - ssls
Custom
Hostname Ssl Args[] SSL configuration of the certificate. See further notes below.
- status string
- zone
Id string The DNS zone ID where the custom hostname should be assigned.
- custom_
origin_ strserver The custom origin server used for certificates.
- custom_
origin_ strsni The custom origin SNI used for certificates.
- hostname str
Hostname you intend to request a certificate for.
- ownership_
verification Mapping[str, str] - ownership_
verification_ Mapping[str, str]http - ssls
Sequence[Custom
Hostname Ssl Args] SSL configuration of the certificate. See further notes below.
- status str
- zone_
id str The DNS zone ID where the custom hostname should be assigned.
- custom
Origin StringServer The custom origin server used for certificates.
- custom
Origin StringSni The custom origin SNI used for certificates.
- hostname String
Hostname you intend to request a certificate for.
- ownership
Verification Map - ownership
Verification MapHttp - ssls
List
SSL configuration of the certificate. See further notes below.
- status String
- zone
Id String The DNS zone ID where the custom hostname should be assigned.
Supporting Types
CustomHostnameSsl
- string
- Custom
Certificate string If a custom uploaded certificate is used.
- Custom
Key string The key for a custom uploaded certificate.
- Method string
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- Settings
List<Custom
Hostname Ssl Setting> SSL/TLS settings for the certificate. See further notes below.
- Status string
- Type string
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- Validation
Errors List<CustomHostname Ssl Validation Error> - Validation
Records List<CustomHostname Ssl Validation Record> - Wildcard bool
Indicates whether the certificate covers a wildcard.
- string
- Custom
Certificate string If a custom uploaded certificate is used.
- Custom
Key string The key for a custom uploaded certificate.
- Method string
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- Settings
[]Custom
Hostname Ssl Setting SSL/TLS settings for the certificate. See further notes below.
- Status string
- Type string
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- Validation
Errors []CustomHostname Ssl Validation Error - Validation
Records []CustomHostname Ssl Validation Record - Wildcard bool
Indicates whether the certificate covers a wildcard.
- String
- custom
Certificate String If a custom uploaded certificate is used.
- custom
Key String The key for a custom uploaded certificate.
- method String
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- settings
List
Hostname Ssl Setting> SSL/TLS settings for the certificate. See further notes below.
- status String
- type String
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- validation
Errors ListHostname Ssl Validation Error> - validation
Records ListHostname Ssl Validation Record> - wildcard Boolean
Indicates whether the certificate covers a wildcard.
- string
- custom
Certificate string If a custom uploaded certificate is used.
- custom
Key string The key for a custom uploaded certificate.
- method string
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- settings
Custom
Hostname Ssl Setting[] SSL/TLS settings for the certificate. See further notes below.
- status string
- type string
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- validation
Errors CustomHostname Ssl Validation Error[] - validation
Records CustomHostname Ssl Validation Record[] - wildcard boolean
Indicates whether the certificate covers a wildcard.
- str
- custom_
certificate str If a custom uploaded certificate is used.
- custom_
key str The key for a custom uploaded certificate.
- method str
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- settings
Sequence[Custom
Hostname Ssl Setting] SSL/TLS settings for the certificate. See further notes below.
- status str
- type str
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- validation_
errors Sequence[CustomHostname Ssl Validation Error] - validation_
records Sequence[CustomHostname Ssl Validation Record] - wildcard bool
Indicates whether the certificate covers a wildcard.
- String
- custom
Certificate String If a custom uploaded certificate is used.
- custom
Key String The key for a custom uploaded certificate.
- method String
Domain control validation (DCV) method used for this hostname. Valid values are
"txt"
,"http"
and"email"
.- settings
List
SSL/TLS settings for the certificate. See further notes below.
- status String
- type String
Level of validation to be used for this hostname. Domain validation ("dv") must be used.
- validation
Errors List - validation
Records List - wildcard Boolean
Indicates whether the certificate covers a wildcard.
CustomHostnameSslSetting
- Ciphers List<string>
List of SSL/TLS ciphers to associate with this certificate.
- Early
Hints string Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- Http2 string
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- Min
Tls stringVersion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- Tls13 string
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
- Ciphers []string
List of SSL/TLS ciphers to associate with this certificate.
- Early
Hints string Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- Http2 string
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- Min
Tls stringVersion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- Tls13 string
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
- ciphers
List
List of SSL/TLS ciphers to associate with this certificate.
- early
Hints String Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- http2 String
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- min
Tls StringVersion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- tls13 String
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
- ciphers string[]
List of SSL/TLS ciphers to associate with this certificate.
- early
Hints string Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- http2 string
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- min
Tls stringVersion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- tls13 string
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
- ciphers Sequence[str]
List of SSL/TLS ciphers to associate with this certificate.
- early_
hints str Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- http2 str
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- min_
tls_ strversion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- tls13 str
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
- ciphers
List
List of SSL/TLS ciphers to associate with this certificate.
- early
Hints String Whether or not early hints should be supported. Valid values are
"on"
or"off"
.- http2 String
Whether or not HTTP2 should be supported. Valid values are
"on"
or"off"
.- min
Tls StringVersion Lowest version of TLS this certificate should support. Valid values are
"1.0"
,"1.1"
,"1.2"
and"1.3"
.- tls13 String
Whether or not TLSv1.3 should be supported. Valid values are
"on"
or"off"
.
CustomHostnameSslValidationError
- Message string
- Message string
- message String
- message string
- message str
- message String
CustomHostnameSslValidationRecord
- cname_
name str - cname_
target str - emails Sequence[str]
- http_
body str - http_
url str - txt_
name str - txt_
value str
Import
Custom hostname certificates can be imported using a composite ID formed of the zone ID and hostname ID, separated by a “/” e.g.
$ pulumi import cloudflare:index/customHostname:CustomHostname example d41d8cd98f00b204e9800998ecf8427e/0d89c70d-ad9f-4843-b99f-6cc0252067e9
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
cloudflare
Terraform Provider.