1. Packages
  2. Cloudflare
  3. API Docs
  4. CustomSsl
Cloudflare v5.31.0 published on Wednesday, Jun 12, 2024 by Pulumi

cloudflare.CustomSsl

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.31.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Provides a Cloudflare custom SSL resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.CustomSsl("example", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        customSslOptions: {
            certificate: "-----INSERT CERTIFICATE-----",
            privateKey: "-----INSERT PRIVATE KEY-----",
            bundleMethod: "ubiquitous",
            geoRestrictions: "us",
            type: "legacy_custom",
        },
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.CustomSsl("example",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        custom_ssl_options=cloudflare.CustomSslCustomSslOptionsArgs(
            certificate="-----INSERT CERTIFICATE-----",
            private_key="-----INSERT PRIVATE KEY-----",
            bundle_method="ubiquitous",
            geo_restrictions="us",
            type="legacy_custom",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewCustomSsl(ctx, "example", &cloudflare.CustomSslArgs{
    			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			CustomSslOptions: &cloudflare.CustomSslCustomSslOptionsArgs{
    				Certificate:     pulumi.String("-----INSERT CERTIFICATE-----"),
    				PrivateKey:      pulumi.String("-----INSERT PRIVATE KEY-----"),
    				BundleMethod:    pulumi.String("ubiquitous"),
    				GeoRestrictions: pulumi.String("us"),
    				Type:            pulumi.String("legacy_custom"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Cloudflare.CustomSsl("example", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            CustomSslOptions = new Cloudflare.Inputs.CustomSslCustomSslOptionsArgs
            {
                Certificate = "-----INSERT CERTIFICATE-----",
                PrivateKey = "-----INSERT PRIVATE KEY-----",
                BundleMethod = "ubiquitous",
                GeoRestrictions = "us",
                Type = "legacy_custom",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CustomSsl;
    import com.pulumi.cloudflare.CustomSslArgs;
    import com.pulumi.cloudflare.inputs.CustomSslCustomSslOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new CustomSsl("example", CustomSslArgs.builder()
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .customSslOptions(CustomSslCustomSslOptionsArgs.builder()
                    .certificate("-----INSERT CERTIFICATE-----")
                    .privateKey("-----INSERT PRIVATE KEY-----")
                    .bundleMethod("ubiquitous")
                    .geoRestrictions("us")
                    .type("legacy_custom")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:CustomSsl
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          customSslOptions:
            certificate: '-----INSERT CERTIFICATE-----'
            privateKey: '-----INSERT PRIVATE KEY-----'
            bundleMethod: ubiquitous
            geoRestrictions: us
            type: legacy_custom
    

    Create CustomSsl Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CustomSsl(name: string, args: CustomSslArgs, opts?: CustomResourceOptions);
    @overload
    def CustomSsl(resource_name: str,
                  args: CustomSslArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomSsl(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  zone_id: Optional[str] = None,
                  custom_ssl_options: Optional[CustomSslCustomSslOptionsArgs] = None,
                  custom_ssl_priorities: Optional[Sequence[CustomSslCustomSslPriorityArgs]] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var customSslResource = new Cloudflare.CustomSsl("customSslResource", new()
    {
        ZoneId = "string",
        CustomSslOptions = new Cloudflare.Inputs.CustomSslCustomSslOptionsArgs
        {
            BundleMethod = "string",
            Certificate = "string",
            GeoRestrictions = "string",
            PrivateKey = "string",
            Type = "string",
        },
        CustomSslPriorities = new[]
        {
            new Cloudflare.Inputs.CustomSslCustomSslPriorityArgs
            {
                Id = "string",
                Priority = 0,
            },
        },
    });
    
    example, err := cloudflare.NewCustomSsl(ctx, "customSslResource", &cloudflare.CustomSslArgs{
    	ZoneId: pulumi.String("string"),
    	CustomSslOptions: &cloudflare.CustomSslCustomSslOptionsArgs{
    		BundleMethod:    pulumi.String("string"),
    		Certificate:     pulumi.String("string"),
    		GeoRestrictions: pulumi.String("string"),
    		PrivateKey:      pulumi.String("string"),
    		Type:            pulumi.String("string"),
    	},
    	CustomSslPriorities: cloudflare.CustomSslCustomSslPriorityArray{
    		&cloudflare.CustomSslCustomSslPriorityArgs{
    			Id:       pulumi.String("string"),
    			Priority: pulumi.Int(0),
    		},
    	},
    })
    
    var customSslResource = new CustomSsl("customSslResource", CustomSslArgs.builder()
        .zoneId("string")
        .customSslOptions(CustomSslCustomSslOptionsArgs.builder()
            .bundleMethod("string")
            .certificate("string")
            .geoRestrictions("string")
            .privateKey("string")
            .type("string")
            .build())
        .customSslPriorities(CustomSslCustomSslPriorityArgs.builder()
            .id("string")
            .priority(0)
            .build())
        .build());
    
    custom_ssl_resource = cloudflare.CustomSsl("customSslResource",
        zone_id="string",
        custom_ssl_options=cloudflare.CustomSslCustomSslOptionsArgs(
            bundle_method="string",
            certificate="string",
            geo_restrictions="string",
            private_key="string",
            type="string",
        ),
        custom_ssl_priorities=[cloudflare.CustomSslCustomSslPriorityArgs(
            id="string",
            priority=0,
        )])
    
    const customSslResource = new cloudflare.CustomSsl("customSslResource", {
        zoneId: "string",
        customSslOptions: {
            bundleMethod: "string",
            certificate: "string",
            geoRestrictions: "string",
            privateKey: "string",
            type: "string",
        },
        customSslPriorities: [{
            id: "string",
            priority: 0,
        }],
    });
    
    type: cloudflare:CustomSsl
    properties:
        customSslOptions:
            bundleMethod: string
            certificate: string
            geoRestrictions: string
            privateKey: string
            type: string
        customSslPriorities:
            - id: string
              priority: 0
        zoneId: string
    

    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:

    ZoneId string
    The zone identifier to target for the resource.
    CustomSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    CustomSslPriorities List<CustomSslCustomSslPriority>
    ZoneId string
    The zone identifier to target for the resource.
    CustomSslOptions CustomSslCustomSslOptionsArgs
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    CustomSslPriorities []CustomSslCustomSslPriorityArgs
    zoneId String
    The zone identifier to target for the resource.
    customSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities List<CustomSslCustomSslPriority>
    zoneId string
    The zone identifier to target for the resource.
    customSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities CustomSslCustomSslPriority[]
    zone_id str
    The zone identifier to target for the resource.
    custom_ssl_options CustomSslCustomSslOptionsArgs
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    custom_ssl_priorities Sequence[CustomSslCustomSslPriorityArgs]
    zoneId String
    The zone identifier to target for the resource.
    customSslOptions Property Map
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomSsl resource produces the following output properties:

    ExpiresOn string
    Hosts List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Issuer string
    ModifiedOn string
    Priority int
    Signature string
    Status string
    UploadedOn string
    ExpiresOn string
    Hosts []string
    Id string
    The provider-assigned unique ID for this managed resource.
    Issuer string
    ModifiedOn string
    Priority int
    Signature string
    Status string
    UploadedOn string
    expiresOn String
    hosts List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    issuer String
    modifiedOn String
    priority Integer
    signature String
    status String
    uploadedOn String
    expiresOn string
    hosts string[]
    id string
    The provider-assigned unique ID for this managed resource.
    issuer string
    modifiedOn string
    priority number
    signature string
    status string
    uploadedOn 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
    expiresOn String
    hosts List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    issuer String
    modifiedOn String
    priority Number
    signature String
    status String
    uploadedOn String

    Look up 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.
    The following state arguments are supported:
    CustomSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    CustomSslPriorities List<CustomSslCustomSslPriority>
    ExpiresOn string
    Hosts List<string>
    Issuer string
    ModifiedOn string
    Priority int
    Signature string
    Status string
    UploadedOn string
    ZoneId string
    The zone identifier to target for the resource.
    CustomSslOptions CustomSslCustomSslOptionsArgs
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    CustomSslPriorities []CustomSslCustomSslPriorityArgs
    ExpiresOn string
    Hosts []string
    Issuer string
    ModifiedOn string
    Priority int
    Signature string
    Status string
    UploadedOn string
    ZoneId string
    The zone identifier to target for the resource.
    customSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities List<CustomSslCustomSslPriority>
    expiresOn String
    hosts List<String>
    issuer String
    modifiedOn String
    priority Integer
    signature String
    status String
    uploadedOn String
    zoneId String
    The zone identifier to target for the resource.
    customSslOptions CustomSslCustomSslOptions
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities CustomSslCustomSslPriority[]
    expiresOn string
    hosts string[]
    issuer string
    modifiedOn string
    priority number
    signature string
    status string
    uploadedOn string
    zoneId string
    The zone identifier to target for the resource.
    custom_ssl_options CustomSslCustomSslOptionsArgs
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    custom_ssl_priorities Sequence[CustomSslCustomSslPriorityArgs]
    expires_on str
    hosts Sequence[str]
    issuer str
    modified_on str
    priority int
    signature str
    status str
    uploaded_on str
    zone_id str
    The zone identifier to target for the resource.
    customSslOptions Property Map
    The certificate associated parameters. Modifying this attribute will force creation of a new resource.
    customSslPriorities List<Property Map>
    expiresOn String
    hosts List<String>
    issuer String
    modifiedOn String
    priority Number
    signature String
    status String
    uploadedOn String
    zoneId String
    The zone identifier to target for the resource.

    Supporting Types

    CustomSslCustomSslOptions, CustomSslCustomSslOptionsArgs

    BundleMethod 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. Available values: ubiquitous, optimal, force.
    Certificate string
    Certificate certificate and the intermediate(s).
    GeoRestrictions string
    Specifies the region where your private key can be held locally. Available values: us, eu, highest_security.
    PrivateKey string
    Certificate's private key.
    Type string
    Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Available values: legacy_custom, sni_custom.
    BundleMethod 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. Available values: ubiquitous, optimal, force.
    Certificate string
    Certificate certificate and the intermediate(s).
    GeoRestrictions string
    Specifies the region where your private key can be held locally. Available values: us, eu, highest_security.
    PrivateKey string
    Certificate's private key.
    Type string
    Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Available values: legacy_custom, sni_custom.
    bundleMethod 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. Available values: ubiquitous, optimal, force.
    certificate String
    Certificate certificate and the intermediate(s).
    geoRestrictions String
    Specifies the region where your private key can be held locally. Available values: us, eu, highest_security.
    privateKey String
    Certificate's private key.
    type String
    Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Available values: legacy_custom, sni_custom.
    bundleMethod 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. Available values: ubiquitous, optimal, force.
    certificate string
    Certificate certificate and the intermediate(s).
    geoRestrictions string
    Specifies the region where your private key can be held locally. Available values: us, eu, highest_security.
    privateKey string
    Certificate's private key.
    type string
    Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Available values: legacy_custom, 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. Available values: ubiquitous, optimal, force.
    certificate str
    Certificate certificate and the intermediate(s).
    geo_restrictions str
    Specifies the region where your private key can be held locally. Available values: 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. Available values: legacy_custom, sni_custom.
    bundleMethod 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. Available values: ubiquitous, optimal, force.
    certificate String
    Certificate certificate and the intermediate(s).
    geoRestrictions String
    Specifies the region where your private key can be held locally. Available values: us, eu, highest_security.
    privateKey String
    Certificate's private key.
    type String
    Whether to enable support for legacy clients which do not include SNI in the TLS handshake. Available values: legacy_custom, sni_custom.

    CustomSslCustomSslPriority, CustomSslCustomSslPriorityArgs

    Id string
    The ID of this resource.
    Priority int
    Id string
    The ID of this resource.
    Priority int
    id String
    The ID of this resource.
    priority Integer
    id string
    The ID of this resource.
    priority number
    id str
    The ID of this resource.
    priority int
    id String
    The ID of this resource.
    priority Number

    Import

    $ pulumi import cloudflare:index/customSsl:CustomSsl example <zone_id>/<certificate_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.31.0 published on Wednesday, Jun 12, 2024 by Pulumi