Cloudflare

Pulumi Official
Package maintained by Pulumi
v4.6.0 published on Tuesday, Apr 5, 2022 by Pulumi

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.

ZoneId string

The DNS zone ID where the custom hostname should be assigned.

CustomOriginServer string

The custom origin server used for certificates.

CustomOriginSni string

The custom origin SNI used for certificates.

Ssls List<CustomHostnameSslArgs>

SSL configuration of the certificate. See further notes below.

Hostname string

Hostname you intend to request a certificate for.

ZoneId string

The DNS zone ID where the custom hostname should be assigned.

CustomOriginServer string

The custom origin server used for certificates.

CustomOriginSni string

The custom origin SNI used for certificates.

Ssls []CustomHostnameSslArgs

SSL configuration of the certificate. See further notes below.

hostname String

Hostname you intend to request a certificate for.

zoneId String

The DNS zone ID where the custom hostname should be assigned.

customOriginServer String

The custom origin server used for certificates.

customOriginSni String

The custom origin SNI used for certificates.

ssls ListHostnameSslArgs>

SSL configuration of the certificate. See further notes below.

hostname string

Hostname you intend to request a certificate for.

zoneId string

The DNS zone ID where the custom hostname should be assigned.

customOriginServer string

The custom origin server used for certificates.

customOriginSni string

The custom origin SNI used for certificates.

ssls CustomHostnameSslArgs[]

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_server str

The custom origin server used for certificates.

custom_origin_sni str

The custom origin SNI used for certificates.

ssls Sequence[CustomHostnameSslArgs]

SSL configuration of the certificate. See further notes below.

hostname String

Hostname you intend to request a certificate for.

zoneId String

The DNS zone ID where the custom hostname should be assigned.

customOriginServer String

The custom origin server used for certificates.

customOriginSni String

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.

OwnershipVerification Dictionary<string, string>
OwnershipVerificationHttp Dictionary<string, string>
Status string
Id string

The provider-assigned unique ID for this managed resource.

OwnershipVerification map[string]string
OwnershipVerificationHttp map[string]string
Status string
id String

The provider-assigned unique ID for this managed resource.

ownershipVerification Map
ownershipVerificationHttp Map
status String
id string

The provider-assigned unique ID for this managed resource.

ownershipVerification {[key: string]: string}
ownershipVerificationHttp {[key: string]: string}
status string
id str

The provider-assigned unique ID for this managed resource.

ownership_verification Mapping[str, str]
ownership_verification_http Mapping[str, str]
status str
id String

The provider-assigned unique ID for this managed resource.

ownershipVerification Map
ownershipVerificationHttp Map
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.
The following state arguments are supported:
CustomOriginServer string

The custom origin server used for certificates.

CustomOriginSni string

The custom origin SNI used for certificates.

Hostname string

Hostname you intend to request a certificate for.

OwnershipVerification Dictionary<string, string>
OwnershipVerificationHttp Dictionary<string, string>
Ssls List<CustomHostnameSslArgs>

SSL configuration of the certificate. See further notes below.

Status string
ZoneId string

The DNS zone ID where the custom hostname should be assigned.

CustomOriginServer string

The custom origin server used for certificates.

CustomOriginSni string

The custom origin SNI used for certificates.

Hostname string

Hostname you intend to request a certificate for.

OwnershipVerification map[string]string
OwnershipVerificationHttp map[string]string
Ssls []CustomHostnameSslArgs

SSL configuration of the certificate. See further notes below.

Status string
ZoneId string

The DNS zone ID where the custom hostname should be assigned.

customOriginServer String

The custom origin server used for certificates.

customOriginSni String

The custom origin SNI used for certificates.

hostname String

Hostname you intend to request a certificate for.

ownershipVerification Map
ownershipVerificationHttp Map
ssls ListHostnameSslArgs>

SSL configuration of the certificate. See further notes below.

status String
zoneId String

The DNS zone ID where the custom hostname should be assigned.

customOriginServer string

The custom origin server used for certificates.

customOriginSni string

The custom origin SNI used for certificates.

hostname string

Hostname you intend to request a certificate for.

ownershipVerification {[key: string]: string}
ownershipVerificationHttp {[key: string]: string}
ssls CustomHostnameSslArgs[]

SSL configuration of the certificate. See further notes below.

status string
zoneId string

The DNS zone ID where the custom hostname should be assigned.

custom_origin_server str

The custom origin server used for certificates.

custom_origin_sni str

The custom origin SNI used for certificates.

hostname str

Hostname you intend to request a certificate for.

ownership_verification Mapping[str, str]
ownership_verification_http Mapping[str, str]
ssls Sequence[CustomHostnameSslArgs]

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.

customOriginServer String

The custom origin server used for certificates.

customOriginSni String

The custom origin SNI used for certificates.

hostname String

Hostname you intend to request a certificate for.

ownershipVerification Map
ownershipVerificationHttp Map
ssls List

SSL configuration of the certificate. See further notes below.

status String
zoneId String

The DNS zone ID where the custom hostname should be assigned.

Supporting Types

CustomHostnameSsl

CertificateAuthority string
CustomCertificate string

If a custom uploaded certificate is used.

CustomKey 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<CustomHostnameSslSetting>

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.

ValidationErrors List<CustomHostnameSslValidationError>
ValidationRecords List<CustomHostnameSslValidationRecord>
Wildcard bool

Indicates whether the certificate covers a wildcard.

CertificateAuthority string
CustomCertificate string

If a custom uploaded certificate is used.

CustomKey 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 []CustomHostnameSslSetting

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.

ValidationErrors []CustomHostnameSslValidationError
ValidationRecords []CustomHostnameSslValidationRecord
Wildcard bool

Indicates whether the certificate covers a wildcard.

certificateAuthority String
customCertificate String

If a custom uploaded certificate is used.

customKey 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 ListHostnameSslSetting>

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.

validationErrors ListHostnameSslValidationError>
validationRecords ListHostnameSslValidationRecord>
wildcard Boolean

Indicates whether the certificate covers a wildcard.

certificateAuthority string
customCertificate string

If a custom uploaded certificate is used.

customKey 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 CustomHostnameSslSetting[]

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.

validationErrors CustomHostnameSslValidationError[]
validationRecords CustomHostnameSslValidationRecord[]
wildcard boolean

Indicates whether the certificate covers a wildcard.

certificate_authority 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[CustomHostnameSslSetting]

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[CustomHostnameSslValidationError]
validation_records Sequence[CustomHostnameSslValidationRecord]
wildcard bool

Indicates whether the certificate covers a wildcard.

certificateAuthority String
customCertificate String

If a custom uploaded certificate is used.

customKey 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.

validationErrors List
validationRecords List
wildcard Boolean

Indicates whether the certificate covers a wildcard.

CustomHostnameSslSetting

Ciphers List<string>

List of SSL/TLS ciphers to associate with this certificate.

EarlyHints 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".

MinTlsVersion string

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.

EarlyHints 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".

MinTlsVersion string

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.

earlyHints 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".

minTlsVersion String

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.

earlyHints 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".

minTlsVersion string

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_version str

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.

earlyHints 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".

minTlsVersion String

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 String

CustomHostnameSslValidationRecord

CnameName string
CnameTarget string
Emails List<string>
HttpBody string
HttpUrl string
TxtName string
TxtValue string
CnameName string
CnameTarget string
Emails []string
HttpBody string
HttpUrl string
TxtName string
TxtValue string
cnameName String
cnameTarget String
emails List
httpBody String
httpUrl String
txtName String
txtValue String
cnameName string
cnameTarget string
emails string[]
httpBody string
httpUrl string
txtName string
txtValue string
cnameName String
cnameTarget String
emails List
httpBody String
httpUrl String
txtName String
txtValue String

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.