1. Packages
  2. Hcloud Provider
  3. API Docs
  4. Certificate
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

hcloud.Certificate

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Alias for hcloud.UploadedCertificate to remain backwards compatible. Deprecated.

    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,
                    labels: Optional[Mapping[str, 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: hcloud: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 HCloud.Certificate("certificateResource", new()
    {
        CertificateContents = "string",
        PrivateKey = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := hcloud.NewCertificate(ctx, "certificateResource", &hcloud.CertificateArgs{
    	Certificate: pulumi.String("string"),
    	PrivateKey:  pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
        .certificate("string")
        .privateKey("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .build());
    
    certificate_resource = hcloud.Certificate("certificateResource",
        certificate="string",
        private_key="string",
        labels={
            "string": "string",
        },
        name="string")
    
    const certificateResource = new hcloud.Certificate("certificateResource", {
        certificate: "string",
        privateKey: "string",
        labels: {
            string: "string",
        },
        name: "string",
    });
    
    type: hcloud:Certificate
    properties:
        certificate: string
        labels:
            string: 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:

    CertificateContents string
    PrivateKey string
    Labels Dictionary<string, string>
    Name string
    Certificate string
    PrivateKey string
    Labels map[string]string
    Name string
    certificate String
    privateKey String
    labels Map<String,String>
    name String
    certificate string
    privateKey string
    labels {[key: string]: string}
    name string
    certificate str
    private_key str
    labels Mapping[str, str]
    name str
    certificate String
    privateKey String
    labels Map<String>
    name String

    Outputs

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

    Created string
    DomainNames List<string>
    Fingerprint string
    Id string
    The provider-assigned unique ID for this managed resource.
    NotValidAfter string
    NotValidBefore string
    Type string
    Created string
    DomainNames []string
    Fingerprint string
    Id string
    The provider-assigned unique ID for this managed resource.
    NotValidAfter string
    NotValidBefore string
    Type string
    created String
    domainNames List<String>
    fingerprint String
    id String
    The provider-assigned unique ID for this managed resource.
    notValidAfter String
    notValidBefore String
    type String
    created string
    domainNames string[]
    fingerprint string
    id string
    The provider-assigned unique ID for this managed resource.
    notValidAfter string
    notValidBefore string
    type string
    created str
    domain_names Sequence[str]
    fingerprint str
    id str
    The provider-assigned unique ID for this managed resource.
    not_valid_after str
    not_valid_before str
    type str
    created String
    domainNames List<String>
    fingerprint String
    id String
    The provider-assigned unique ID for this managed resource.
    notValidAfter String
    notValidBefore String
    type String

    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,
            created: Optional[str] = None,
            domain_names: Optional[Sequence[str]] = None,
            fingerprint: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            not_valid_after: Optional[str] = None,
            not_valid_before: Optional[str] = None,
            private_key: Optional[str] = None,
            type: 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)
    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:
    CertificateContents string
    Created string
    DomainNames List<string>
    Fingerprint string
    Labels Dictionary<string, string>
    Name string
    NotValidAfter string
    NotValidBefore string
    PrivateKey string
    Type string
    Certificate string
    Created string
    DomainNames []string
    Fingerprint string
    Labels map[string]string
    Name string
    NotValidAfter string
    NotValidBefore string
    PrivateKey string
    Type string
    certificate String
    created String
    domainNames List<String>
    fingerprint String
    labels Map<String,String>
    name String
    notValidAfter String
    notValidBefore String
    privateKey String
    type String
    certificate string
    created string
    domainNames string[]
    fingerprint string
    labels {[key: string]: string}
    name string
    notValidAfter string
    notValidBefore string
    privateKey string
    type string
    certificate String
    created String
    domainNames List<String>
    fingerprint String
    labels Map<String>
    name String
    notValidAfter String
    notValidBefore String
    privateKey String
    type String

    Package Details

    Repository
    Hetzner Cloud pulumi/pulumi-hcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcloud Terraform Provider.
    hcloud logo
    Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi