1. Packages
  2. Outscale Provider
  3. API Docs
  4. ServerCertificate
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.ServerCertificate

Explore with Pulumi AI

Manages a server certificate.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

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

const serverCertificate01 = new outscale.ServerCertificate("serverCertificate01", {
    body: fs.readFileSync("<PATH>", "utf8"),
    chain: fs.readFileSync("<PATH>", "utf8"),
    privateKey: fs.readFileSync("<PATH>", "utf8"),
    path: "<PATH>",
});
Copy
import pulumi
import pulumi_outscale as outscale

server_certificate01 = outscale.ServerCertificate("serverCertificate01",
    body=(lambda path: open(path).read())("<PATH>"),
    chain=(lambda path: open(path).read())("<PATH>"),
    private_key=(lambda path: open(path).read())("<PATH>"),
    path="<PATH>")
Copy
package main

import (
	"os"

	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"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 := outscale.NewServerCertificate(ctx, "serverCertificate01", &outscale.ServerCertificateArgs{
			Body:       pulumi.String(readFileOrPanic("<PATH>")),
			Chain:      pulumi.String(readFileOrPanic("<PATH>")),
			PrivateKey: pulumi.String(readFileOrPanic("<PATH>")),
			Path:       pulumi.String("<PATH>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var serverCertificate01 = new Outscale.ServerCertificate("serverCertificate01", new()
    {
        Body = File.ReadAllText("<PATH>"),
        Chain = File.ReadAllText("<PATH>"),
        PrivateKey = File.ReadAllText("<PATH>"),
        Path = "<PATH>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.ServerCertificate;
import com.pulumi.outscale.ServerCertificateArgs;
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 serverCertificate01 = new ServerCertificate("serverCertificate01", ServerCertificateArgs.builder()
            .body(Files.readString(Paths.get("<PATH>")))
            .chain(Files.readString(Paths.get("<PATH>")))
            .privateKey(Files.readString(Paths.get("<PATH>")))
            .path("<PATH>")
            .build());

    }
}
Copy
resources:
  serverCertificate01:
    type: outscale:ServerCertificate
    properties:
      body:
        fn::readFile: <PATH>
      chain:
        fn::readFile: <PATH>
      privateKey:
        fn::readFile: <PATH>
      path: <PATH>
Copy

Create ServerCertificate Resource

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

Constructor syntax

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

@overload
def ServerCertificate(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      body: Optional[str] = None,
                      chain: Optional[str] = None,
                      dry_run: Optional[str] = None,
                      name: Optional[str] = None,
                      path: Optional[str] = None,
                      private_key: Optional[str] = None,
                      server_certificate_id: Optional[str] = None)
func NewServerCertificate(ctx *Context, name string, args *ServerCertificateArgs, opts ...ResourceOption) (*ServerCertificate, error)
public ServerCertificate(string name, ServerCertificateArgs? args = null, CustomResourceOptions? opts = null)
public ServerCertificate(String name, ServerCertificateArgs args)
public ServerCertificate(String name, ServerCertificateArgs args, CustomResourceOptions options)
type: outscale:ServerCertificate
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 ServerCertificateArgs
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 ServerCertificateArgs
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 ServerCertificateArgs
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 ServerCertificateArgs
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. ServerCertificateArgs
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 serverCertificateResource = new Outscale.ServerCertificate("serverCertificateResource", new()
{
    Body = "string",
    Chain = "string",
    DryRun = "string",
    Name = "string",
    Path = "string",
    PrivateKey = "string",
    ServerCertificateId = "string",
});
Copy
example, err := outscale.NewServerCertificate(ctx, "serverCertificateResource", &outscale.ServerCertificateArgs{
	Body:                pulumi.String("string"),
	Chain:               pulumi.String("string"),
	DryRun:              pulumi.String("string"),
	Name:                pulumi.String("string"),
	Path:                pulumi.String("string"),
	PrivateKey:          pulumi.String("string"),
	ServerCertificateId: pulumi.String("string"),
})
Copy
var serverCertificateResource = new ServerCertificate("serverCertificateResource", ServerCertificateArgs.builder()
    .body("string")
    .chain("string")
    .dryRun("string")
    .name("string")
    .path("string")
    .privateKey("string")
    .serverCertificateId("string")
    .build());
Copy
server_certificate_resource = outscale.ServerCertificate("serverCertificateResource",
    body="string",
    chain="string",
    dry_run="string",
    name="string",
    path="string",
    private_key="string",
    server_certificate_id="string")
Copy
const serverCertificateResource = new outscale.ServerCertificate("serverCertificateResource", {
    body: "string",
    chain: "string",
    dryRun: "string",
    name: "string",
    path: "string",
    privateKey: "string",
    serverCertificateId: "string",
});
Copy
type: outscale:ServerCertificate
properties:
    body: string
    chain: string
    dryRun: string
    name: string
    path: string
    privateKey: string
    serverCertificateId: string
Copy

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

Body string
The PEM-encoded X509 certificate.
Chain string
The PEM-encoded intermediate certification authorities.
DryRun string
Name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Path string
The path to the server certificate, set to a slash (/) if not specified.
PrivateKey string
The PEM-encoded private key matching the certificate.
ServerCertificateId string
The ID of the server certificate.
Body string
The PEM-encoded X509 certificate.
Chain string
The PEM-encoded intermediate certification authorities.
DryRun string
Name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Path string
The path to the server certificate, set to a slash (/) if not specified.
PrivateKey string
The PEM-encoded private key matching the certificate.
ServerCertificateId string
The ID of the server certificate.
body String
The PEM-encoded X509 certificate.
chain String
The PEM-encoded intermediate certification authorities.
dryRun String
name String
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
path String
The path to the server certificate, set to a slash (/) if not specified.
privateKey String
The PEM-encoded private key matching the certificate.
serverCertificateId String
The ID of the server certificate.
body string
The PEM-encoded X509 certificate.
chain string
The PEM-encoded intermediate certification authorities.
dryRun string
name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
path string
The path to the server certificate, set to a slash (/) if not specified.
privateKey string
The PEM-encoded private key matching the certificate.
serverCertificateId string
The ID of the server certificate.
body str
The PEM-encoded X509 certificate.
chain str
The PEM-encoded intermediate certification authorities.
dry_run str
name str
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
path str
The path to the server certificate, set to a slash (/) if not specified.
private_key str
The PEM-encoded private key matching the certificate.
server_certificate_id str
The ID of the server certificate.
body String
The PEM-encoded X509 certificate.
chain String
The PEM-encoded intermediate certification authorities.
dryRun String
name String
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
path String
The path to the server certificate, set to a slash (/) if not specified.
privateKey String
The PEM-encoded private key matching the certificate.
serverCertificateId String
The ID of the server certificate.

Outputs

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

ExpirationDate string
The date on which the server certificate expires.
Id string
The provider-assigned unique ID for this managed resource.
Orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
RequestId string
UploadDate string
The date on which the server certificate has been uploaded.
ExpirationDate string
The date on which the server certificate expires.
Id string
The provider-assigned unique ID for this managed resource.
Orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
RequestId string
UploadDate string
The date on which the server certificate has been uploaded.
expirationDate String
The date on which the server certificate expires.
id String
The provider-assigned unique ID for this managed resource.
orn String
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
requestId String
uploadDate String
The date on which the server certificate has been uploaded.
expirationDate string
The date on which the server certificate expires.
id string
The provider-assigned unique ID for this managed resource.
orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
requestId string
uploadDate string
The date on which the server certificate has been uploaded.
expiration_date str
The date on which the server certificate expires.
id str
The provider-assigned unique ID for this managed resource.
orn str
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
request_id str
upload_date str
The date on which the server certificate has been uploaded.
expirationDate String
The date on which the server certificate expires.
id String
The provider-assigned unique ID for this managed resource.
orn String
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
requestId String
uploadDate String
The date on which the server certificate has been uploaded.

Look up Existing ServerCertificate Resource

Get an existing ServerCertificate 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?: ServerCertificateState, opts?: CustomResourceOptions): ServerCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        body: Optional[str] = None,
        chain: Optional[str] = None,
        dry_run: Optional[str] = None,
        expiration_date: Optional[str] = None,
        name: Optional[str] = None,
        orn: Optional[str] = None,
        path: Optional[str] = None,
        private_key: Optional[str] = None,
        request_id: Optional[str] = None,
        server_certificate_id: Optional[str] = None,
        upload_date: Optional[str] = None) -> ServerCertificate
func GetServerCertificate(ctx *Context, name string, id IDInput, state *ServerCertificateState, opts ...ResourceOption) (*ServerCertificate, error)
public static ServerCertificate Get(string name, Input<string> id, ServerCertificateState? state, CustomResourceOptions? opts = null)
public static ServerCertificate get(String name, Output<String> id, ServerCertificateState state, CustomResourceOptions options)
resources:  _:    type: outscale:ServerCertificate    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:
Body string
The PEM-encoded X509 certificate.
Chain string
The PEM-encoded intermediate certification authorities.
DryRun string
ExpirationDate string
The date on which the server certificate expires.
Name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
Path string
The path to the server certificate, set to a slash (/) if not specified.
PrivateKey string
The PEM-encoded private key matching the certificate.
RequestId string
ServerCertificateId string
The ID of the server certificate.
UploadDate string
The date on which the server certificate has been uploaded.
Body string
The PEM-encoded X509 certificate.
Chain string
The PEM-encoded intermediate certification authorities.
DryRun string
ExpirationDate string
The date on which the server certificate expires.
Name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
Path string
The path to the server certificate, set to a slash (/) if not specified.
PrivateKey string
The PEM-encoded private key matching the certificate.
RequestId string
ServerCertificateId string
The ID of the server certificate.
UploadDate string
The date on which the server certificate has been uploaded.
body String
The PEM-encoded X509 certificate.
chain String
The PEM-encoded intermediate certification authorities.
dryRun String
expirationDate String
The date on which the server certificate expires.
name String
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
orn String
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
path String
The path to the server certificate, set to a slash (/) if not specified.
privateKey String
The PEM-encoded private key matching the certificate.
requestId String
serverCertificateId String
The ID of the server certificate.
uploadDate String
The date on which the server certificate has been uploaded.
body string
The PEM-encoded X509 certificate.
chain string
The PEM-encoded intermediate certification authorities.
dryRun string
expirationDate string
The date on which the server certificate expires.
name string
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
orn string
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
path string
The path to the server certificate, set to a slash (/) if not specified.
privateKey string
The PEM-encoded private key matching the certificate.
requestId string
serverCertificateId string
The ID of the server certificate.
uploadDate string
The date on which the server certificate has been uploaded.
body str
The PEM-encoded X509 certificate.
chain str
The PEM-encoded intermediate certification authorities.
dry_run str
expiration_date str
The date on which the server certificate expires.
name str
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
orn str
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
path str
The path to the server certificate, set to a slash (/) if not specified.
private_key str
The PEM-encoded private key matching the certificate.
request_id str
server_certificate_id str
The ID of the server certificate.
upload_date str
The date on which the server certificate has been uploaded.
body String
The PEM-encoded X509 certificate.
chain String
The PEM-encoded intermediate certification authorities.
dryRun String
expirationDate String
The date on which the server certificate expires.
name String
A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
orn String
The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
path String
The path to the server certificate, set to a slash (/) if not specified.
privateKey String
The PEM-encoded private key matching the certificate.
requestId String
serverCertificateId String
The ID of the server certificate.
uploadDate String
The date on which the server certificate has been uploaded.

Import

A server certificate can be imported using its ID. For example:

console

$ pulumi import outscale:index/serverCertificate:ServerCertificate ImportedServerCertificate 0123456789
Copy

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

Package Details

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