1. Packages
  2. OVH
  3. API Docs
  4. IpLoadBalancing
  5. Ssl
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

ovh.IpLoadBalancing.Ssl

Explore with Pulumi AI

ovh logo
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

    Creates a new custom SSL certificate on your IP Load Balancing

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    import * as ovh from "@pulumi/ovh";
    
    const lb = ovh.IpLoadBalancing.getIpLoadBalancing({
        serviceName: "ip-1.2.3.4",
        state: "ok",
    });
    const sslname = new ovh.iploadbalancing.Ssl("sslname", {
        certificate: "...",
        chain: "...",
        displayName: "test",
        key: "...",
        serviceName: lb.then(lb => lb.serviceName),
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    lb = ovh.IpLoadBalancing.get_ip_load_balancing(service_name="ip-1.2.3.4",
        state="ok")
    sslname = ovh.ip_load_balancing.Ssl("sslname",
        certificate="...",
        chain="...",
        display_name="test",
        key="...",
        service_name=lb.service_name)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/IpLoadBalancing"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		lb, err := IpLoadBalancing.GetIpLoadBalancing(ctx, &iploadbalancing.GetIpLoadBalancingArgs{
    			ServiceName: pulumi.StringRef("ip-1.2.3.4"),
    			State:       pulumi.StringRef("ok"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = IpLoadBalancing.NewSsl(ctx, "sslname", &IpLoadBalancing.SslArgs{
    			Certificate: pulumi.String("..."),
    			Chain:       pulumi.String("..."),
    			DisplayName: pulumi.String("test"),
    			Key:         pulumi.String("..."),
    			ServiceName: pulumi.String(lb.ServiceName),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var lb = Ovh.IpLoadBalancing.GetIpLoadBalancing.Invoke(new()
        {
            ServiceName = "ip-1.2.3.4",
            State = "ok",
        });
    
        var sslname = new Ovh.IpLoadBalancing.Ssl("sslname", new()
        {
            Certificate = "...",
            Chain = "...",
            DisplayName = "test",
            Key = "...",
            ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.IpLoadBalancing.IpLoadBalancingFunctions;
    import com.pulumi.ovh.IpLoadBalancing.inputs.GetIpLoadBalancingArgs;
    import com.pulumi.ovh.IpLoadBalancing.Ssl;
    import com.pulumi.ovh.IpLoadBalancing.SslArgs;
    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) {
            final var lb = IpLoadBalancingFunctions.getIpLoadBalancing(GetIpLoadBalancingArgs.builder()
                .serviceName("ip-1.2.3.4")
                .state("ok")
                .build());
    
            var sslname = new Ssl("sslname", SslArgs.builder()
                .certificate("...")
                .chain("...")
                .displayName("test")
                .key("...")
                .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
                .build());
    
        }
    }
    
    resources:
      sslname:
        type: ovh:IpLoadBalancing:Ssl
        properties:
          certificate: '...'
          chain: '...'
          displayName: test
          key: '...'
          serviceName: ${lb.serviceName}
    variables:
      lb:
        fn::invoke:
          Function: ovh:IpLoadBalancing:getIpLoadBalancing
          Arguments:
            serviceName: ip-1.2.3.4
            state: ok
    

    Create Ssl Resource

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

    Constructor syntax

    new Ssl(name: string, args: SslArgs, opts?: CustomResourceOptions);
    @overload
    def Ssl(resource_name: str,
            args: SslArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ssl(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            key: Optional[str] = None,
            service_name: Optional[str] = None,
            chain: Optional[str] = None,
            display_name: Optional[str] = None)
    func NewSsl(ctx *Context, name string, args SslArgs, opts ...ResourceOption) (*Ssl, error)
    public Ssl(string name, SslArgs args, CustomResourceOptions? opts = null)
    public Ssl(String name, SslArgs args)
    public Ssl(String name, SslArgs args, CustomResourceOptions options)
    
    type: ovh:IpLoadBalancing:Ssl
    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 SslArgs
    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 SslArgs
    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 SslArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SslArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SslArgs
    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 sslResource = new Ovh.IpLoadBalancing.Ssl("sslResource", new()
    {
        Certificate = "string",
        Key = "string",
        ServiceName = "string",
        Chain = "string",
        DisplayName = "string",
    });
    
    example, err := IpLoadBalancing.NewSsl(ctx, "sslResource", &IpLoadBalancing.SslArgs{
    	Certificate: pulumi.String("string"),
    	Key:         pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Chain:       pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    })
    
    var sslResource = new Ssl("sslResource", SslArgs.builder()
        .certificate("string")
        .key("string")
        .serviceName("string")
        .chain("string")
        .displayName("string")
        .build());
    
    ssl_resource = ovh.ip_load_balancing.Ssl("sslResource",
        certificate="string",
        key="string",
        service_name="string",
        chain="string",
        display_name="string")
    
    const sslResource = new ovh.iploadbalancing.Ssl("sslResource", {
        certificate: "string",
        key: "string",
        serviceName: "string",
        chain: "string",
        displayName: "string",
    });
    
    type: ovh:IpLoadBalancing:Ssl
    properties:
        certificate: string
        chain: string
        displayName: string
        key: string
        serviceName: string
    

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

    Certificate string
    Certificate
    Key string
    Certificate key
    ServiceName string
    The internal name of your IP load balancing
    Chain string
    Certificate chain
    DisplayName string
    Readable label for loadbalancer ssl
    Certificate string
    Certificate
    Key string
    Certificate key
    ServiceName string
    The internal name of your IP load balancing
    Chain string
    Certificate chain
    DisplayName string
    Readable label for loadbalancer ssl
    certificate String
    Certificate
    key String
    Certificate key
    serviceName String
    The internal name of your IP load balancing
    chain String
    Certificate chain
    displayName String
    Readable label for loadbalancer ssl
    certificate string
    Certificate
    key string
    Certificate key
    serviceName string
    The internal name of your IP load balancing
    chain string
    Certificate chain
    displayName string
    Readable label for loadbalancer ssl
    certificate str
    Certificate
    key str
    Certificate key
    service_name str
    The internal name of your IP load balancing
    chain str
    Certificate chain
    display_name str
    Readable label for loadbalancer ssl
    certificate String
    Certificate
    key String
    Certificate key
    serviceName String
    The internal name of your IP load balancing
    chain String
    Certificate chain
    displayName String
    Readable label for loadbalancer ssl

    Outputs

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

    ExpireDate string
    Expire date of your SSL certificate.
    Fingerprint string
    Fingerprint of your SSL certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    Sans List<string>
    Subject Alternative Name of your SSL certificate.
    Serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    Subject string
    Subject of your SSL certificate.
    Type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    ExpireDate string
    Expire date of your SSL certificate.
    Fingerprint string
    Fingerprint of your SSL certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    Sans []string
    Subject Alternative Name of your SSL certificate.
    Serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    Subject string
    Subject of your SSL certificate.
    Type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    expireDate String
    Expire date of your SSL certificate.
    fingerprint String
    Fingerprint of your SSL certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    sans List<String>
    Subject Alternative Name of your SSL certificate.
    serial String
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    subject String
    Subject of your SSL certificate.
    type String
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    expireDate string
    Expire date of your SSL certificate.
    fingerprint string
    Fingerprint of your SSL certificate.
    id string
    The provider-assigned unique ID for this managed resource.
    sans string[]
    Subject Alternative Name of your SSL certificate.
    serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    subject string
    Subject of your SSL certificate.
    type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    expire_date str
    Expire date of your SSL certificate.
    fingerprint str
    Fingerprint of your SSL certificate.
    id str
    The provider-assigned unique ID for this managed resource.
    sans Sequence[str]
    Subject Alternative Name of your SSL certificate.
    serial str
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    subject str
    Subject of your SSL certificate.
    type str
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    expireDate String
    Expire date of your SSL certificate.
    fingerprint String
    Fingerprint of your SSL certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    sans List<String>
    Subject Alternative Name of your SSL certificate.
    serial String
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    subject String
    Subject of your SSL certificate.
    type String
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.

    Look up Existing Ssl Resource

    Get an existing Ssl 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?: SslState, opts?: CustomResourceOptions): Ssl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate: Optional[str] = None,
            chain: Optional[str] = None,
            display_name: Optional[str] = None,
            expire_date: Optional[str] = None,
            fingerprint: Optional[str] = None,
            key: Optional[str] = None,
            sans: Optional[Sequence[str]] = None,
            serial: Optional[str] = None,
            service_name: Optional[str] = None,
            subject: Optional[str] = None,
            type: Optional[str] = None) -> Ssl
    func GetSsl(ctx *Context, name string, id IDInput, state *SslState, opts ...ResourceOption) (*Ssl, error)
    public static Ssl Get(string name, Input<string> id, SslState? state, CustomResourceOptions? opts = null)
    public static Ssl get(String name, Output<String> id, SslState 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:
    Certificate string
    Certificate
    Chain string
    Certificate chain
    DisplayName string
    Readable label for loadbalancer ssl
    ExpireDate string
    Expire date of your SSL certificate.
    Fingerprint string
    Fingerprint of your SSL certificate.
    Key string
    Certificate key
    Sans List<string>
    Subject Alternative Name of your SSL certificate.
    Serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    ServiceName string
    The internal name of your IP load balancing
    Subject string
    Subject of your SSL certificate.
    Type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    Certificate string
    Certificate
    Chain string
    Certificate chain
    DisplayName string
    Readable label for loadbalancer ssl
    ExpireDate string
    Expire date of your SSL certificate.
    Fingerprint string
    Fingerprint of your SSL certificate.
    Key string
    Certificate key
    Sans []string
    Subject Alternative Name of your SSL certificate.
    Serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    ServiceName string
    The internal name of your IP load balancing
    Subject string
    Subject of your SSL certificate.
    Type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    certificate String
    Certificate
    chain String
    Certificate chain
    displayName String
    Readable label for loadbalancer ssl
    expireDate String
    Expire date of your SSL certificate.
    fingerprint String
    Fingerprint of your SSL certificate.
    key String
    Certificate key
    sans List<String>
    Subject Alternative Name of your SSL certificate.
    serial String
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    serviceName String
    The internal name of your IP load balancing
    subject String
    Subject of your SSL certificate.
    type String
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    certificate string
    Certificate
    chain string
    Certificate chain
    displayName string
    Readable label for loadbalancer ssl
    expireDate string
    Expire date of your SSL certificate.
    fingerprint string
    Fingerprint of your SSL certificate.
    key string
    Certificate key
    sans string[]
    Subject Alternative Name of your SSL certificate.
    serial string
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    serviceName string
    The internal name of your IP load balancing
    subject string
    Subject of your SSL certificate.
    type string
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    certificate str
    Certificate
    chain str
    Certificate chain
    display_name str
    Readable label for loadbalancer ssl
    expire_date str
    Expire date of your SSL certificate.
    fingerprint str
    Fingerprint of your SSL certificate.
    key str
    Certificate key
    sans Sequence[str]
    Subject Alternative Name of your SSL certificate.
    serial str
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    service_name str
    The internal name of your IP load balancing
    subject str
    Subject of your SSL certificate.
    type str
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.
    certificate String
    Certificate
    chain String
    Certificate chain
    displayName String
    Readable label for loadbalancer ssl
    expireDate String
    Expire date of your SSL certificate.
    fingerprint String
    Fingerprint of your SSL certificate.
    key String
    Certificate key
    sans List<String>
    Subject Alternative Name of your SSL certificate.
    serial String
    Serial of your SSL certificate (Deprecated, use fingerprint instead !)
    serviceName String
    The internal name of your IP load balancing
    subject String
    Subject of your SSL certificate.
    type String
    Type of your SSL certificate. 'built' for SSL certificates managed by the IP Load Balancing. 'custom' for user manager certificates.

    Import

    SSL can be imported using the following format service_name and the id of the ssl, separated by “/” e.g.

    bash

    $ pulumi import ovh:IpLoadBalancing/ssl:Ssl sslname service_name/ssl_id
    

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud