1. Packages
  2. Vkcs Provider
  3. API Docs
  4. CdnSslCertificate
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.CdnSslCertificate

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as vkcs from "@pulumi/vkcs";

const certificate = new vkcs.CdnSslCertificate("certificate", {
    certificate: fs.readFileSync(`${path.module}/certificate.pem`, "utf8"),
    privateKey: fs.readFileSync(`${path.module}/private-key.key`, "utf8"),
});
Copy
import pulumi
import pulumi_vkcs as vkcs

certificate = vkcs.CdnSslCertificate("certificate",
    certificate=(lambda path: open(path).read())(f"{path['module']}/certificate.pem"),
    private_key=(lambda path: open(path).read())(f"{path['module']}/private-key.key"))
Copy
package main

import (
	"fmt"
	"os"

	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := os.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vkcs.NewCdnSslCertificate(ctx, "certificate", &vkcs.CdnSslCertificateArgs{
			Certificate: pulumi.String(readFileOrPanic(fmt.Sprintf("%v/certificate.pem", path.Module))),
			PrivateKey:  pulumi.String(readFileOrPanic(fmt.Sprintf("%v/private-key.key", path.Module))),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var certificate = new Vkcs.CdnSslCertificate("certificate", new()
    {
        Certificate = File.ReadAllText($"{path.Module}/certificate.pem"),
        PrivateKey = File.ReadAllText($"{path.Module}/private-key.key"),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.CdnSslCertificate;
import com.pulumi.vkcs.CdnSslCertificateArgs;
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 certificate = new CdnSslCertificate("certificate", CdnSslCertificateArgs.builder()
            .certificate(Files.readString(Paths.get(String.format("%s/certificate.pem", path.module()))))
            .privateKey(Files.readString(Paths.get(String.format("%s/private-key.key", path.module()))))
            .build());

    }
}
Copy
resources:
  certificate:
    type: vkcs:CdnSslCertificate
    properties:
      certificate:
        fn::readFile: ${path.module}/certificate.pem
      privateKey:
        fn::readFile: ${path.module}/private-key.key
Copy

Create CdnSslCertificate Resource

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

Constructor syntax

new CdnSslCertificate(name: string, args: CdnSslCertificateArgs, opts?: CustomResourceOptions);
@overload
def CdnSslCertificate(resource_name: str,
                      args: CdnSslCertificateArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def CdnSslCertificate(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      certificate: Optional[str] = None,
                      private_key: Optional[str] = None,
                      name: Optional[str] = None,
                      region: Optional[str] = None)
func NewCdnSslCertificate(ctx *Context, name string, args CdnSslCertificateArgs, opts ...ResourceOption) (*CdnSslCertificate, error)
public CdnSslCertificate(string name, CdnSslCertificateArgs args, CustomResourceOptions? opts = null)
public CdnSslCertificate(String name, CdnSslCertificateArgs args)
public CdnSslCertificate(String name, CdnSslCertificateArgs args, CustomResourceOptions options)
type: vkcs:CdnSslCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CdnSslCertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CdnSslCertificateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CdnSslCertificateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CdnSslCertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CdnSslCertificateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

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

var cdnSslCertificateResource = new Vkcs.CdnSslCertificate("cdnSslCertificateResource", new()
{
    Certificate = "string",
    PrivateKey = "string",
    Name = "string",
    Region = "string",
});
Copy
example, err := vkcs.NewCdnSslCertificate(ctx, "cdnSslCertificateResource", &vkcs.CdnSslCertificateArgs{
Certificate: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
Copy
var cdnSslCertificateResource = new CdnSslCertificate("cdnSslCertificateResource", CdnSslCertificateArgs.builder()
    .certificate("string")
    .privateKey("string")
    .name("string")
    .region("string")
    .build());
Copy
cdn_ssl_certificate_resource = vkcs.CdnSslCertificate("cdnSslCertificateResource",
    certificate="string",
    private_key="string",
    name="string",
    region="string")
Copy
const cdnSslCertificateResource = new vkcs.CdnSslCertificate("cdnSslCertificateResource", {
    certificate: "string",
    privateKey: "string",
    name: "string",
    region: "string",
});
Copy
type: vkcs:CdnSslCertificate
properties:
    certificate: string
    name: string
    privateKey: string
    region: string
Copy

CdnSslCertificate Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CdnSslCertificate resource accepts the following input properties:

Certificate This property is required. string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
PrivateKey This property is required. string
required sensitive string → Private key of the SSL certificate.
Name string
required string → SSL certificate name.
Region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
Certificate This property is required. string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
PrivateKey This property is required. string
required sensitive string → Private key of the SSL certificate.
Name string
required string → SSL certificate name.
Region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
certificate This property is required. String
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
privateKey This property is required. String
required sensitive string → Private key of the SSL certificate.
name String
required string → SSL certificate name.
region String
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
certificate This property is required. string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
privateKey This property is required. string
required sensitive string → Private key of the SSL certificate.
name string
required string → SSL certificate name.
region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
certificate This property is required. str
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
private_key This property is required. str
required sensitive string → Private key of the SSL certificate.
name str
required string → SSL certificate name.
region str
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
certificate This property is required. String
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
privateKey This property is required. String
required sensitive string → Private key of the SSL certificate.
name String
required string → SSL certificate name.
region String
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.

Outputs

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

CdnSslCertificateId double
number → ID of the SSL certificate.
Id string
The provider-assigned unique ID for this managed resource.
Issuer string
string → Name of the certification center issued the SSL certificate.
SubjectCn string
string → Domain name that the SSL certificate secures.
ValidityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
ValidityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
CdnSslCertificateId float64
number → ID of the SSL certificate.
Id string
The provider-assigned unique ID for this managed resource.
Issuer string
string → Name of the certification center issued the SSL certificate.
SubjectCn string
string → Domain name that the SSL certificate secures.
ValidityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
ValidityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId Double
number → ID of the SSL certificate.
id String
The provider-assigned unique ID for this managed resource.
issuer String
string → Name of the certification center issued the SSL certificate.
subjectCn String
string → Domain name that the SSL certificate secures.
validityNotAfter String
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore String
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId number
number → ID of the SSL certificate.
id string
The provider-assigned unique ID for this managed resource.
issuer string
string → Name of the certification center issued the SSL certificate.
subjectCn string
string → Domain name that the SSL certificate secures.
validityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdn_ssl_certificate_id float
number → ID of the SSL certificate.
id str
The provider-assigned unique ID for this managed resource.
issuer str
string → Name of the certification center issued the SSL certificate.
subject_cn str
string → Domain name that the SSL certificate secures.
validity_not_after str
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validity_not_before str
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId Number
number → ID of the SSL certificate.
id String
The provider-assigned unique ID for this managed resource.
issuer String
string → Name of the certification center issued the SSL certificate.
subjectCn String
string → Domain name that the SSL certificate secures.
validityNotAfter String
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore String
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).

Look up Existing CdnSslCertificate Resource

Get an existing CdnSslCertificate 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?: CdnSslCertificateState, opts?: CustomResourceOptions): CdnSslCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cdn_ssl_certificate_id: Optional[float] = None,
        certificate: Optional[str] = None,
        issuer: Optional[str] = None,
        name: Optional[str] = None,
        private_key: Optional[str] = None,
        region: Optional[str] = None,
        subject_cn: Optional[str] = None,
        validity_not_after: Optional[str] = None,
        validity_not_before: Optional[str] = None) -> CdnSslCertificate
func GetCdnSslCertificate(ctx *Context, name string, id IDInput, state *CdnSslCertificateState, opts ...ResourceOption) (*CdnSslCertificate, error)
public static CdnSslCertificate Get(string name, Input<string> id, CdnSslCertificateState? state, CustomResourceOptions? opts = null)
public static CdnSslCertificate get(String name, Output<String> id, CdnSslCertificateState state, CustomResourceOptions options)
resources:  _:    type: vkcs:CdnSslCertificate    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CdnSslCertificateId double
number → ID of the SSL certificate.
Certificate string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
Issuer string
string → Name of the certification center issued the SSL certificate.
Name string
required string → SSL certificate name.
PrivateKey string
required sensitive string → Private key of the SSL certificate.
Region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
SubjectCn string
string → Domain name that the SSL certificate secures.
ValidityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
ValidityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
CdnSslCertificateId float64
number → ID of the SSL certificate.
Certificate string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
Issuer string
string → Name of the certification center issued the SSL certificate.
Name string
required string → SSL certificate name.
PrivateKey string
required sensitive string → Private key of the SSL certificate.
Region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
SubjectCn string
string → Domain name that the SSL certificate secures.
ValidityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
ValidityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId Double
number → ID of the SSL certificate.
certificate String
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
issuer String
string → Name of the certification center issued the SSL certificate.
name String
required string → SSL certificate name.
privateKey String
required sensitive string → Private key of the SSL certificate.
region String
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
subjectCn String
string → Domain name that the SSL certificate secures.
validityNotAfter String
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore String
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId number
number → ID of the SSL certificate.
certificate string
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
issuer string
string → Name of the certification center issued the SSL certificate.
name string
required string → SSL certificate name.
privateKey string
required sensitive string → Private key of the SSL certificate.
region string
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
subjectCn string
string → Domain name that the SSL certificate secures.
validityNotAfter string
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore string
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdn_ssl_certificate_id float
number → ID of the SSL certificate.
certificate str
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
issuer str
string → Name of the certification center issued the SSL certificate.
name str
required string → SSL certificate name.
private_key str
required sensitive string → Private key of the SSL certificate.
region str
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
subject_cn str
string → Domain name that the SSL certificate secures.
validity_not_after str
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validity_not_before str
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).
cdnSslCertificateId Number
number → ID of the SSL certificate.
certificate String
required sensitive string → Public part of the SSL certificate. All chain of the SSL certificate should be added.
issuer String
string → Name of the certification center issued the SSL certificate.
name String
required string → SSL certificate name.
privateKey String
required sensitive string → Private key of the SSL certificate.
region String
optional string → The region in which to obtain the CDN client. If omitted, the region argument of the provider is used. Changing this creates a new resource.
subjectCn String
string → Domain name that the SSL certificate secures.
validityNotAfter String
string → Date when certificate become untrusted (ISO 8601/RFC 3339 format, UTC.).
validityNotBefore String
string → Date when certificate become valid (ISO 8601/RFC 3339 format, UTC.).

Import

A SSL certificate can be imported using the id, e.g.

$ pulumi import vkcs:index/cdnSslCertificate:CdnSslCertificate resource <resource_id>
Copy

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

Package Details

Repository
vkcs vk-cs/terraform-provider-vkcs
License
Notes
This Pulumi package is based on the vkcs Terraform Provider.