1. Packages
  2. Ionoscloud
  3. API Docs
  4. cert
  5. Certificate
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.cert.Certificate

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    Manages a Certificate on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const cert = new ionoscloud.cert.Certificate("cert", {
        name: "add_name_here",
        certificate: "tour_certificate",
        certificateChain: "your_certificate_chain",
        privateKey: "your_private_key",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    cert = ionoscloud.cert.Certificate("cert",
        name="add_name_here",
        certificate="tour_certificate",
        certificate_chain="your_certificate_chain",
        private_key="your_private_key")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/cert"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cert.NewCertificate(ctx, "cert", &cert.CertificateArgs{
    			Name:             pulumi.String("add_name_here"),
    			Certificate:      pulumi.String("tour_certificate"),
    			CertificateChain: pulumi.String("your_certificate_chain"),
    			PrivateKey:       pulumi.String("your_private_key"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var cert = new Ionoscloud.Cert.IonosCertificate("cert", new()
        {
            Name = "add_name_here",
            Certificate = "tour_certificate",
            CertificateChain = "your_certificate_chain",
            PrivateKey = "your_private_key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.cert.Certificate;
    import com.pulumi.ionoscloud.cert.CertificateArgs;
    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 cert = new Certificate("cert", CertificateArgs.builder()
                .name("add_name_here")
                .certificate("tour_certificate")
                .certificateChain("your_certificate_chain")
                .privateKey("your_private_key")
                .build());
    
        }
    }
    
    resources:
      cert:
        type: ionoscloud:cert:Certificate
        properties:
          name: add_name_here
          certificate: tour_certificate
          certificateChain: your_certificate_chain
          privateKey: your_private_key
    

    Create Certificate Resource

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

    Constructor syntax

    new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
    @overload
    def Certificate(resource_name: str,
                    args: CertificateArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Certificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    certificate: Optional[str] = None,
                    private_key: Optional[str] = None,
                    certificate_chain: Optional[str] = None,
                    name: Optional[str] = None)
    func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
    public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
    public Certificate(String name, CertificateArgs args)
    public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
    
    type: ionoscloud:cert:Certificate
    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 CertificateArgs
    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 CertificateArgs
    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 CertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CertificateArgs
    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 certificateResource = new Ionoscloud.Cert.IonosCertificate("certificateResource", new()
    {
        Certificate = "string",
        PrivateKey = "string",
        CertificateChain = "string",
        Name = "string",
    });
    
    example, err := cert.NewCertificate(ctx, "certificateResource", &cert.CertificateArgs{
    	Certificate:      pulumi.String("string"),
    	PrivateKey:       pulumi.String("string"),
    	CertificateChain: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    })
    
    var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
        .certificate("string")
        .privateKey("string")
        .certificateChain("string")
        .name("string")
        .build());
    
    certificate_resource = ionoscloud.cert.Certificate("certificateResource",
        certificate="string",
        private_key="string",
        certificate_chain="string",
        name="string")
    
    const certificateResource = new ionoscloud.cert.Certificate("certificateResource", {
        certificate: "string",
        privateKey: "string",
        certificateChain: "string",
        name: "string",
    });
    
    type: ionoscloud:cert:Certificate
    properties:
        certificate: string
        certificateChain: string
        name: string
        privateKey: string
    

    Certificate 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 Certificate resource accepts the following input properties:

    Certificate string
    [string] The certificate body. Pem encoded. Immutable.
    PrivateKey string
    [string] The certificate private key. Immutable. Sensitive.
    CertificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    Name string
    [string] The certificate name
    Certificate string
    [string] The certificate body. Pem encoded. Immutable.
    PrivateKey string
    [string] The certificate private key. Immutable. Sensitive.
    CertificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    Name string
    [string] The certificate name
    certificate String
    [string] The certificate body. Pem encoded. Immutable.
    privateKey String
    [string] The certificate private key. Immutable. Sensitive.
    certificateChain String
    [string] The certificate chain. Pem encoded. Immutable.
    name String
    [string] The certificate name
    certificate string
    [string] The certificate body. Pem encoded. Immutable.
    privateKey string
    [string] The certificate private key. Immutable. Sensitive.
    certificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    name string
    [string] The certificate name
    certificate str
    [string] The certificate body. Pem encoded. Immutable.
    private_key str
    [string] The certificate private key. Immutable. Sensitive.
    certificate_chain str
    [string] The certificate chain. Pem encoded. Immutable.
    name str
    [string] The certificate name
    certificate String
    [string] The certificate body. Pem encoded. Immutable.
    privateKey String
    [string] The certificate private key. Immutable. Sensitive.
    certificateChain String
    [string] The certificate chain. Pem encoded. Immutable.
    name String
    [string] The certificate name

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Certificate Resource

    Get an existing Certificate 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?: CertificateState, opts?: CustomResourceOptions): Certificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            certificate_chain: Optional[str] = None,
            name: Optional[str] = None,
            private_key: Optional[str] = None) -> Certificate
    func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
    public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
    public static Certificate get(String name, Output<String> id, CertificateState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:cert:Certificate    get:      id: ${id}
    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:
    Certificate string
    [string] The certificate body. Pem encoded. Immutable.
    CertificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    Name string
    [string] The certificate name
    PrivateKey string
    [string] The certificate private key. Immutable. Sensitive.
    Certificate string
    [string] The certificate body. Pem encoded. Immutable.
    CertificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    Name string
    [string] The certificate name
    PrivateKey string
    [string] The certificate private key. Immutable. Sensitive.
    certificate String
    [string] The certificate body. Pem encoded. Immutable.
    certificateChain String
    [string] The certificate chain. Pem encoded. Immutable.
    name String
    [string] The certificate name
    privateKey String
    [string] The certificate private key. Immutable. Sensitive.
    certificate string
    [string] The certificate body. Pem encoded. Immutable.
    certificateChain string
    [string] The certificate chain. Pem encoded. Immutable.
    name string
    [string] The certificate name
    privateKey string
    [string] The certificate private key. Immutable. Sensitive.
    certificate str
    [string] The certificate body. Pem encoded. Immutable.
    certificate_chain str
    [string] The certificate chain. Pem encoded. Immutable.
    name str
    [string] The certificate name
    private_key str
    [string] The certificate private key. Immutable. Sensitive.
    certificate String
    [string] The certificate body. Pem encoded. Immutable.
    certificateChain String
    [string] The certificate chain. Pem encoded. Immutable.
    name String
    [string] The certificate name
    privateKey String
    [string] The certificate private key. Immutable. Sensitive.

    Import

    Resource certificate can be imported using the resource id, e.g.

    $ pulumi import ionoscloud:cert/certificate:Certificate mycert certificate uuid
    

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

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud