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/v2/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v2/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: cloudflare.CustomHostnameSslArray{
&cloudflare.CustomHostnameSslArgs{
Method: pulumi.String("txt"),
},
},
ZoneId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
})
if err != nil {
return err
}
return nil
})
}
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",
});
Create a CustomHostname Resource
new CustomHostname(name: string, args: CustomHostnameArgs, opts?: CustomResourceOptions);
def CustomHostname(resource_name: str, opts: Optional[ResourceOptions] = None, custom_origin_server: Optional[str] = None, hostname: Optional[str] = None, ssls: Optional[Sequence[CustomHostnameSslArgs]] = None, zone_id: Optional[str] = None)
func NewCustomHostname(ctx *Context, name string, args CustomHostnameArgs, opts ...ResourceOption) (*CustomHostname, error)
public CustomHostname(string name, CustomHostnameArgs args, CustomResourceOptions? opts = null)
- 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.
- 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 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.
CustomHostname Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The CustomHostname resource accepts the following input properties:
- Hostname string
Hostname you intend to request a certificate for.
- Ssls
List<Custom
Hostname Ssl Args> SSL configuration of the certificate. See further notes below.
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- Custom
Origin stringServer The custom origin server used for certificates.
- Hostname string
Hostname you intend to request a certificate for.
- Ssls
[]Custom
Hostname Ssl SSL configuration of the certificate. See further notes below.
- Zone
Id string The DNS zone ID where the custom hostname should be assigned.
- Custom
Origin stringServer The custom origin server used for certificates.
- hostname string
Hostname you intend to request a certificate for.
- ssls
Custom
Hostname Ssl[] SSL configuration of the certificate. See further notes below.
- zone
Id string The DNS zone ID where the custom hostname should be assigned.
- custom
Origin stringServer The custom origin server used for certificates.
- hostname str
Hostname you intend to request a certificate for.
- ssls
Sequence[Custom
Hostname Ssl Args] SSL configuration of the certificate. See further notes below.
- zone_
id str The DNS zone ID where the custom hostname should be assigned.
- custom_
origin_ strserver The custom origin server used for certificates.
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 CustomHostname Ownership Verification - Ownership
Verification CustomHttp Hostname Ownership Verification Http - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ownership
Verification CustomHostname Ownership Verification - Ownership
Verification CustomHttp Hostname Ownership Verification Http - Status string
- id string
- The provider-assigned unique ID for this managed resource.
- ownership
Verification CustomHostname Ownership Verification - ownership
Verification CustomHttp Hostname Ownership Verification Http - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ownership_
verification CustomHostname Ownership Verification - ownership_
verification_ Customhttp Hostname Ownership Verification Http - status str
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, hostname: Optional[str] = None, ownership_verification: Optional[CustomHostnameOwnershipVerificationArgs] = None, ownership_verification_http: Optional[CustomHostnameOwnershipVerificationHttpArgs] = 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)
- 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:
- Custom
Origin stringServer The custom origin server used for certificates.
- Hostname string
Hostname you intend to request a certificate for.
- Ownership
Verification CustomHostname Ownership Verification Args - Ownership
Verification CustomHttp Hostname Ownership Verification Http Args - 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.
- Hostname string
Hostname you intend to request a certificate for.
- Ownership
Verification CustomHostname Ownership Verification - Ownership
Verification CustomHttp Hostname Ownership Verification Http - Ssls
[]Custom
Hostname Ssl 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.
- hostname string
Hostname you intend to request a certificate for.
- ownership
Verification CustomHostname Ownership Verification - ownership
Verification CustomHttp Hostname Ownership Verification Http - ssls
Custom
Hostname Ssl[] 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.
- hostname str
Hostname you intend to request a certificate for.
- ownership_
verification CustomHostname Ownership Verification Args - ownership_
verification_ Customhttp Hostname Ownership Verification Http Args - 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.
Supporting Types
CustomHostnameOwnershipVerification
CustomHostnameOwnershipVerificationHttp
CustomHostnameSsl
- string
- Cname
Name string - Cname
Target 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 Args> 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.
- Wildcard bool
Indicates whether the certificate covers a wildcard.
- string
- Cname
Name string - Cname
Target 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.
- Wildcard bool
Indicates whether the certificate covers a wildcard.
- string
- cname
Name string - cname
Target 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.
- wildcard boolean
Indicates whether the certificate covers a wildcard.
- str
- cname_
name str - cname_
target 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 Args] 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.
- wildcard bool
Indicates whether the certificate covers a wildcard.
CustomHostnameSslSetting
- Ciphers List<string>
List of SSL/TLS ciphers to associate with this certificate.
- 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.
- 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.
- 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.
- 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"
.
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.