Cloudflare
CustomSsl
Provides a Cloudflare custom ssl resource.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var cloudflareZoneId = config.Get("cloudflareZoneId") ?? "1d5fdc9e88c8a8c4518b068cd94331fe";
// Add a custom ssl certificate to the domain
var foossl = new Cloudflare.CustomSsl("foossl", new Cloudflare.CustomSslArgs
{
CustomSslOptions = new Cloudflare.Inputs.CustomSslCustomSslOptionsArgs
{
BundleMethod = "ubiquitous",
Certificate = "-----INSERT CERTIFICATE-----",
GeoRestrictions = "us",
PrivateKey = "-----INSERT PRIVATE KEY-----",
Type = "legacy_custom",
},
ZoneId = cloudflareZoneId,
});
}
}
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
cloudflareZoneId := "1d5fdc9e88c8a8c4518b068cd94331fe"
if param := cfg.Get("cloudflareZoneId"); param != "" {
cloudflareZoneId = param
}
_, err := cloudflare.NewCustomSsl(ctx, "foossl", &cloudflare.CustomSslArgs{
CustomSslOptions: &CustomSslCustomSslOptionsArgs{
BundleMethod: pulumi.String("ubiquitous"),
Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
GeoRestrictions: pulumi.String("us"),
PrivateKey: pulumi.String("-----INSERT PRIVATE KEY-----"),
Type: pulumi.String("legacy_custom"),
},
ZoneId: pulumi.String(cloudflareZoneId),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var cloudflareZoneId = config.get("cloudflareZoneId").orElse("1d5fdc9e88c8a8c4518b068cd94331fe");
var foossl = new CustomSsl("foossl", CustomSslArgs.builder()
.customSslOptions(CustomSslCustomSslOptionsArgs.builder()
.bundleMethod("ubiquitous")
.certificate("-----INSERT CERTIFICATE-----")
.geoRestrictions("us")
.privateKey("-----INSERT PRIVATE KEY-----")
.type("legacy_custom")
.build())
.zoneId(cloudflareZoneId)
.build());
}
}
import pulumi
import pulumi_cloudflare as cloudflare
config = pulumi.Config()
cloudflare_zone_id = config.get("cloudflareZoneId")
if cloudflare_zone_id is None:
cloudflare_zone_id = "1d5fdc9e88c8a8c4518b068cd94331fe"
# Add a custom ssl certificate to the domain
foossl = cloudflare.CustomSsl("foossl",
custom_ssl_options=cloudflare.CustomSslCustomSslOptionsArgs(
bundle_method="ubiquitous",
certificate="-----INSERT CERTIFICATE-----",
geo_restrictions="us",
private_key="-----INSERT PRIVATE KEY-----",
type="legacy_custom",
),
zone_id=cloudflare_zone_id)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const config = new pulumi.Config();
const cloudflareZoneId = config.get("cloudflareZoneId") || "1d5fdc9e88c8a8c4518b068cd94331fe";
// Add a custom ssl certificate to the domain
const foossl = new cloudflare.CustomSsl("foossl", {
customSslOptions: {
bundleMethod: "ubiquitous",
certificate: "-----INSERT CERTIFICATE-----",
geoRestrictions: "us",
privateKey: "-----INSERT PRIVATE KEY-----",
type: "legacy_custom",
},
zoneId: cloudflareZoneId,
});
configuration:
cloudflareZoneId:
type: string
default: 1d5fdc9e88c8a8c4518b068cd94331fe
resources:
foossl:
type: cloudflare:CustomSsl
properties:
customSslOptions:
bundleMethod: ubiquitous
certificate: '-----INSERT CERTIFICATE-----'
geoRestrictions: us
privateKey: '-----INSERT PRIVATE KEY-----'
type: legacy_custom
zoneId: ${cloudflareZoneId}
Create a CustomSsl Resource
new CustomSsl(name: string, args: CustomSslArgs, opts?: CustomResourceOptions);
@overload
def CustomSsl(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_ssl_options: Optional[CustomSslCustomSslOptionsArgs] = None,
custom_ssl_priorities: Optional[Sequence[CustomSslCustomSslPriorityArgs]] = None,
zone_id: Optional[str] = None)
@overload
def CustomSsl(resource_name: str,
args: CustomSslArgs,
opts: Optional[ResourceOptions] = None)
func NewCustomSsl(ctx *Context, name string, args CustomSslArgs, opts ...ResourceOption) (*CustomSsl, error)
public CustomSsl(string name, CustomSslArgs args, CustomResourceOptions? opts = null)
public CustomSsl(String name, CustomSslArgs args)
public CustomSsl(String name, CustomSslArgs args, CustomResourceOptions options)
type: cloudflare:CustomSsl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomSslArgs
- 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 CustomSslArgs
- 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 CustomSslArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomSslArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomSslArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CustomSsl 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 CustomSsl resource accepts the following input properties:
- Zone
Id string The DNS zone id to the custom ssl cert should be added.
- Custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- Custom
Ssl List<CustomPriorities Ssl Custom Ssl Priority Args>
- Zone
Id string The DNS zone id to the custom ssl cert should be added.
- Custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- Custom
Ssl []CustomPriorities Ssl Custom Ssl Priority Args
- zone
Id String The DNS zone id to the custom ssl cert should be added.
- custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl List<CustomPriorities Ssl Custom Ssl Priority Args>
- zone
Id string The DNS zone id to the custom ssl cert should be added.
- custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl CustomPriorities Ssl Custom Ssl Priority Args[]
- zone_
id str The DNS zone id to the custom ssl cert should be added.
- custom_
ssl_ Customoptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom_
ssl_ Sequence[Custompriorities Ssl Custom Ssl Priority Args]
- zone
Id String The DNS zone id to the custom ssl cert should be added.
- custom
Ssl Property MapOptions The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl List<Property Map>Priorities
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomSsl resource produces the following output properties:
- Expires
On string - Hosts List<string>
- Id string
The provider-assigned unique ID for this managed resource.
- Issuer string
- Modified
On string - Priority int
- Signature string
- Status string
- Uploaded
On string
- Expires
On string - Hosts []string
- Id string
The provider-assigned unique ID for this managed resource.
- Issuer string
- Modified
On string - Priority int
- Signature string
- Status string
- Uploaded
On string
- expires
On String - hosts List<String>
- id String
The provider-assigned unique ID for this managed resource.
- issuer String
- modified
On String - priority Integer
- signature String
- status String
- uploaded
On String
- expires
On string - hosts string[]
- id string
The provider-assigned unique ID for this managed resource.
- issuer string
- modified
On string - priority number
- signature string
- status string
- uploaded
On string
- expires_
on str - hosts Sequence[str]
- id str
The provider-assigned unique ID for this managed resource.
- issuer str
- modified_
on str - priority int
- signature str
- status str
- uploaded_
on str
- expires
On String - hosts List<String>
- id String
The provider-assigned unique ID for this managed resource.
- issuer String
- modified
On String - priority Number
- signature String
- status String
- uploaded
On String
Look up an Existing CustomSsl Resource
Get an existing CustomSsl 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?: CustomSslState, opts?: CustomResourceOptions): CustomSsl
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_ssl_options: Optional[CustomSslCustomSslOptionsArgs] = None,
custom_ssl_priorities: Optional[Sequence[CustomSslCustomSslPriorityArgs]] = None,
expires_on: Optional[str] = None,
hosts: Optional[Sequence[str]] = None,
issuer: Optional[str] = None,
modified_on: Optional[str] = None,
priority: Optional[int] = None,
signature: Optional[str] = None,
status: Optional[str] = None,
uploaded_on: Optional[str] = None,
zone_id: Optional[str] = None) -> CustomSsl
func GetCustomSsl(ctx *Context, name string, id IDInput, state *CustomSslState, opts ...ResourceOption) (*CustomSsl, error)
public static CustomSsl Get(string name, Input<string> id, CustomSslState? state, CustomResourceOptions? opts = null)
public static CustomSsl get(String name, Output<String> id, CustomSslState 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
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- Custom
Ssl List<CustomPriorities Ssl Custom Ssl Priority Args> - Expires
On string - Hosts List<string>
- Issuer string
- Modified
On string - Priority int
- Signature string
- Status string
- Uploaded
On string - Zone
Id string The DNS zone id to the custom ssl cert should be added.
- Custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- Custom
Ssl []CustomPriorities Ssl Custom Ssl Priority Args - Expires
On string - Hosts []string
- Issuer string
- Modified
On string - Priority int
- Signature string
- Status string
- Uploaded
On string - Zone
Id string The DNS zone id to the custom ssl cert should be added.
- custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl List<CustomPriorities Ssl Custom Ssl Priority Args> - expires
On String - hosts List<String>
- issuer String
- modified
On String - priority Integer
- signature String
- status String
- uploaded
On String - zone
Id String The DNS zone id to the custom ssl cert should be added.
- custom
Ssl CustomOptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl CustomPriorities Ssl Custom Ssl Priority Args[] - expires
On string - hosts string[]
- issuer string
- modified
On string - priority number
- signature string
- status string
- uploaded
On string - zone
Id string The DNS zone id to the custom ssl cert should be added.
- custom_
ssl_ Customoptions Ssl Custom Ssl Options Args The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom_
ssl_ Sequence[Custompriorities Ssl Custom Ssl Priority Args] - expires_
on str - hosts Sequence[str]
- issuer str
- modified_
on str - priority int
- signature str
- status str
- uploaded_
on str - zone_
id str The DNS zone id to the custom ssl cert should be added.
- custom
Ssl Property MapOptions The certificate, private key and associated optional parameters, such as bundle_method, geo_restrictions, and type.
- custom
Ssl List<Property Map>Priorities - expires
On String - hosts List<String>
- issuer String
- modified
On String - priority Number
- signature String
- status String
- uploaded
On String - zone
Id String The DNS zone id to the custom ssl cert should be added.
Supporting Types
CustomSslCustomSslOptions
- Bundle
Method string Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- Certificate string
Certificate certificate and the intermediate(s)
- Geo
Restrictions string Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- Private
Key string Certificate's private key
- Type string
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
- Bundle
Method string Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- Certificate string
Certificate certificate and the intermediate(s)
- Geo
Restrictions string Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- Private
Key string Certificate's private key
- Type string
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
- bundle
Method String Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- certificate String
Certificate certificate and the intermediate(s)
- geo
Restrictions String Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- private
Key String Certificate's private key
- type String
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
- bundle
Method string Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- certificate string
Certificate certificate and the intermediate(s)
- geo
Restrictions string Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- private
Key string Certificate's private key
- type string
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
- bundle_
method str Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- certificate str
Certificate certificate and the intermediate(s)
- geo_
restrictions str Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- private_
key str Certificate's private key
- type str
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
- bundle
Method String Method of building intermediate certificate chain. A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. Valid values are
ubiquitous
(default),optimal
,force
.- certificate String
Certificate certificate and the intermediate(s)
- geo
Restrictions String Specifies the region where your private key can be held locally. Valid values are
us
,eu
,highest_security
.- private
Key String Certificate's private key
- type String
Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Valid values are
legacy_custom
(default),sni_custom
.
CustomSslCustomSslPriority
Import
Custom SSL Certs can be imported using a composite ID formed of the zone ID and certificate ID, separated by a “/” e.g.
$ pulumi import cloudflare:index/customSsl:CustomSsl default 1d5fdc9e88c8a8c4518b068cd94331fe/0123f0ab-9cde-45b2-80bd-4da3010f1337
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
cloudflare
Terraform Provider.