ionoscloud.cert.AutoCertificate
Explore with Pulumi AI
Manages a CM AutoCertificate.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.cert.AutoCertificateProvider("example", {
    name: "Let's Encrypt",
    email: "user@example.com",
    location: "de/fra",
    server: "https://acme-v02.api.letsencrypt.org/directory",
    externalAccountBinding: {
        keyId: "some-key-id",
        keySecret: "secret",
    },
});
const exampleAutoCertificate = new ionoscloud.cert.AutoCertificate("example", {
    providerId: example.id,
    commonName: "www.example.com",
    location: example.location,
    keyAlgorithm: "rsa4096",
    name: "My Auto renewed certificate",
    subjectAlternativeNames: ["app.example.com"],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.cert.AutoCertificateProvider("example",
    name="Let's Encrypt",
    email="user@example.com",
    location="de/fra",
    server="https://acme-v02.api.letsencrypt.org/directory",
    external_account_binding={
        "key_id": "some-key-id",
        "key_secret": "secret",
    })
example_auto_certificate = ionoscloud.cert.AutoCertificate("example",
    provider_id=example.id,
    common_name="www.example.com",
    location=example.location,
    key_algorithm="rsa4096",
    name="My Auto renewed certificate",
    subject_alternative_names=["app.example.com"])
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 {
		example, err := cert.NewAutoCertificateProvider(ctx, "example", &cert.AutoCertificateProviderArgs{
			Name:     pulumi.String("Let's Encrypt"),
			Email:    pulumi.String("user@example.com"),
			Location: pulumi.String("de/fra"),
			Server:   pulumi.String("https://acme-v02.api.letsencrypt.org/directory"),
			ExternalAccountBinding: &cert.AutoCertificateProviderExternalAccountBindingArgs{
				KeyId:     pulumi.String("some-key-id"),
				KeySecret: pulumi.String("secret"),
			},
		})
		if err != nil {
			return err
		}
		_, err = cert.NewAutoCertificate(ctx, "example", &cert.AutoCertificateArgs{
			ProviderId:   example.ID(),
			CommonName:   pulumi.String("www.example.com"),
			Location:     example.Location,
			KeyAlgorithm: pulumi.String("rsa4096"),
			Name:         pulumi.String("My Auto renewed certificate"),
			SubjectAlternativeNames: pulumi.StringArray{
				pulumi.String("app.example.com"),
			},
		})
		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 example = new Ionoscloud.Cert.AutoCertificateProvider("example", new()
    {
        Name = "Let's Encrypt",
        Email = "user@example.com",
        Location = "de/fra",
        Server = "https://acme-v02.api.letsencrypt.org/directory",
        ExternalAccountBinding = new Ionoscloud.Cert.Inputs.AutoCertificateProviderExternalAccountBindingArgs
        {
            KeyId = "some-key-id",
            KeySecret = "secret",
        },
    });
    var exampleAutoCertificate = new Ionoscloud.Cert.AutoCertificate("example", new()
    {
        ProviderId = example.Id,
        CommonName = "www.example.com",
        Location = example.Location,
        KeyAlgorithm = "rsa4096",
        Name = "My Auto renewed certificate",
        SubjectAlternativeNames = new[]
        {
            "app.example.com",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.cert.AutoCertificateProvider;
import com.pulumi.ionoscloud.cert.AutoCertificateProviderArgs;
import com.pulumi.ionoscloud.cert.inputs.AutoCertificateProviderExternalAccountBindingArgs;
import com.pulumi.ionoscloud.cert.AutoCertificate;
import com.pulumi.ionoscloud.cert.AutoCertificateArgs;
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 example = new AutoCertificateProvider("example", AutoCertificateProviderArgs.builder()
            .name("Let's Encrypt")
            .email("user@example.com")
            .location("de/fra")
            .server("https://acme-v02.api.letsencrypt.org/directory")
            .externalAccountBinding(AutoCertificateProviderExternalAccountBindingArgs.builder()
                .keyId("some-key-id")
                .keySecret("secret")
                .build())
            .build());
        var exampleAutoCertificate = new AutoCertificate("exampleAutoCertificate", AutoCertificateArgs.builder()
            .providerId(example.id())
            .commonName("www.example.com")
            .location(example.location())
            .keyAlgorithm("rsa4096")
            .name("My Auto renewed certificate")
            .subjectAlternativeNames("app.example.com")
            .build());
    }
}
resources:
  example:
    type: ionoscloud:cert:AutoCertificateProvider
    properties:
      name: Let's Encrypt
      email: user@example.com
      location: de/fra
      server: https://acme-v02.api.letsencrypt.org/directory
      externalAccountBinding:
        keyId: some-key-id
        keySecret: secret
  exampleAutoCertificate:
    type: ionoscloud:cert:AutoCertificate
    name: example
    properties:
      providerId: ${example.id}
      commonName: www.example.com
      location: ${example.location}
      keyAlgorithm: rsa4096
      name: My Auto renewed certificate
      subjectAlternativeNames:
        - app.example.com
Create AutoCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutoCertificate(name: string, args: AutoCertificateArgs, opts?: CustomResourceOptions);@overload
def AutoCertificate(resource_name: str,
                    args: AutoCertificateArgs,
                    opts: Optional[ResourceOptions] = None)
@overload
def AutoCertificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    common_name: Optional[str] = None,
                    key_algorithm: Optional[str] = None,
                    location: Optional[str] = None,
                    provider_id: Optional[str] = None,
                    name: Optional[str] = None,
                    subject_alternative_names: Optional[Sequence[str]] = None)func NewAutoCertificate(ctx *Context, name string, args AutoCertificateArgs, opts ...ResourceOption) (*AutoCertificate, error)public AutoCertificate(string name, AutoCertificateArgs args, CustomResourceOptions? opts = null)
public AutoCertificate(String name, AutoCertificateArgs args)
public AutoCertificate(String name, AutoCertificateArgs args, CustomResourceOptions options)
type: ionoscloud:cert:AutoCertificate
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 AutoCertificateArgs
- 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 AutoCertificateArgs
- 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 AutoCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutoCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutoCertificateArgs
- 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 autoCertificateResource = new Ionoscloud.Cert.AutoCertificate("autoCertificateResource", new()
{
    CommonName = "string",
    KeyAlgorithm = "string",
    Location = "string",
    ProviderId = "string",
    Name = "string",
    SubjectAlternativeNames = new[]
    {
        "string",
    },
});
example, err := cert.NewAutoCertificate(ctx, "autoCertificateResource", &cert.AutoCertificateArgs{
	CommonName:   pulumi.String("string"),
	KeyAlgorithm: pulumi.String("string"),
	Location:     pulumi.String("string"),
	ProviderId:   pulumi.String("string"),
	Name:         pulumi.String("string"),
	SubjectAlternativeNames: pulumi.StringArray{
		pulumi.String("string"),
	},
})
var autoCertificateResource = new AutoCertificate("autoCertificateResource", AutoCertificateArgs.builder()
    .commonName("string")
    .keyAlgorithm("string")
    .location("string")
    .providerId("string")
    .name("string")
    .subjectAlternativeNames("string")
    .build());
auto_certificate_resource = ionoscloud.cert.AutoCertificate("autoCertificateResource",
    common_name="string",
    key_algorithm="string",
    location="string",
    provider_id="string",
    name="string",
    subject_alternative_names=["string"])
const autoCertificateResource = new ionoscloud.cert.AutoCertificate("autoCertificateResource", {
    commonName: "string",
    keyAlgorithm: "string",
    location: "string",
    providerId: "string",
    name: "string",
    subjectAlternativeNames: ["string"],
});
type: ionoscloud:cert:AutoCertificate
properties:
    commonName: string
    keyAlgorithm: string
    location: string
    name: string
    providerId: string
    subjectAlternativeNames:
        - string
AutoCertificate 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 AutoCertificate resource accepts the following input properties:
- CommonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- KeyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- Location string
- [string] The location of the auto-certificate.
- ProviderId string
- [string] The certificate provider used to issue the certificates.
- Name string
- [string] A certificate name used for management purposes.
- SubjectAlternative List<string>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- CommonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- KeyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- Location string
- [string] The location of the auto-certificate.
- ProviderId string
- [string] The certificate provider used to issue the certificates.
- Name string
- [string] A certificate name used for management purposes.
- SubjectAlternative []stringNames 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName String
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm String
- [string] The key algorithm used to generate the certificate.
- location String
- [string] The location of the auto-certificate.
- providerId String
- [string] The certificate provider used to issue the certificates.
- name String
- [string] A certificate name used for management purposes.
- subjectAlternative List<String>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- location string
- [string] The location of the auto-certificate.
- providerId string
- [string] The certificate provider used to issue the certificates.
- name string
- [string] A certificate name used for management purposes.
- subjectAlternative string[]Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common_name str
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- key_algorithm str
- [string] The key algorithm used to generate the certificate.
- location str
- [string] The location of the auto-certificate.
- provider_id str
- [string] The certificate provider used to issue the certificates.
- name str
- [string] A certificate name used for management purposes.
- subject_alternative_ Sequence[str]names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName String
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm String
- [string] The key algorithm used to generate the certificate.
- location String
- [string] The location of the auto-certificate.
- providerId String
- [string] The certificate provider used to issue the certificates.
- name String
- [string] A certificate name used for management purposes.
- subjectAlternative List<String>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutoCertificate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- LastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- id String
- The provider-assigned unique ID for this managed resource.
- lastIssued StringCertificate Id 
- [string] The ID of the last certificate that was issued.
- id string
- The provider-assigned unique ID for this managed resource.
- lastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- id str
- The provider-assigned unique ID for this managed resource.
- last_issued_ strcertificate_ id 
- [string] The ID of the last certificate that was issued.
- id String
- The provider-assigned unique ID for this managed resource.
- lastIssued StringCertificate Id 
- [string] The ID of the last certificate that was issued.
Look up Existing AutoCertificate Resource
Get an existing AutoCertificate 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?: AutoCertificateState, opts?: CustomResourceOptions): AutoCertificate@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        common_name: Optional[str] = None,
        key_algorithm: Optional[str] = None,
        last_issued_certificate_id: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        provider_id: Optional[str] = None,
        subject_alternative_names: Optional[Sequence[str]] = None) -> AutoCertificatefunc GetAutoCertificate(ctx *Context, name string, id IDInput, state *AutoCertificateState, opts ...ResourceOption) (*AutoCertificate, error)public static AutoCertificate Get(string name, Input<string> id, AutoCertificateState? state, CustomResourceOptions? opts = null)public static AutoCertificate get(String name, Output<String> id, AutoCertificateState state, CustomResourceOptions options)resources:  _:    type: ionoscloud:cert:AutoCertificate    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.
- CommonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- KeyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- LastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- Location string
- [string] The location of the auto-certificate.
- Name string
- [string] A certificate name used for management purposes.
- ProviderId string
- [string] The certificate provider used to issue the certificates.
- SubjectAlternative List<string>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- CommonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- KeyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- LastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- Location string
- [string] The location of the auto-certificate.
- Name string
- [string] A certificate name used for management purposes.
- ProviderId string
- [string] The certificate provider used to issue the certificates.
- SubjectAlternative []stringNames 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName String
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm String
- [string] The key algorithm used to generate the certificate.
- lastIssued StringCertificate Id 
- [string] The ID of the last certificate that was issued.
- location String
- [string] The location of the auto-certificate.
- name String
- [string] A certificate name used for management purposes.
- providerId String
- [string] The certificate provider used to issue the certificates.
- subjectAlternative List<String>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName string
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm string
- [string] The key algorithm used to generate the certificate.
- lastIssued stringCertificate Id 
- [string] The ID of the last certificate that was issued.
- location string
- [string] The location of the auto-certificate.
- name string
- [string] A certificate name used for management purposes.
- providerId string
- [string] The certificate provider used to issue the certificates.
- subjectAlternative string[]Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- common_name str
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- key_algorithm str
- [string] The key algorithm used to generate the certificate.
- last_issued_ strcertificate_ id 
- [string] The ID of the last certificate that was issued.
- location str
- [string] The location of the auto-certificate.
- name str
- [string] A certificate name used for management purposes.
- provider_id str
- [string] The certificate provider used to issue the certificates.
- subject_alternative_ Sequence[str]names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
- commonName String
- [string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
- keyAlgorithm String
- [string] The key algorithm used to generate the certificate.
- lastIssued StringCertificate Id 
- [string] The ID of the last certificate that was issued.
- location String
- [string] The location of the auto-certificate.
- name String
- [string] A certificate name used for management purposes.
- providerId String
- [string] The certificate provider used to issue the certificates.
- subjectAlternative List<String>Names 
- [list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
Import
The resource can be imported using the auto_certificate_id and the location, separated by :, e.g.
$ pulumi import ionoscloud:cert/autoCertificate:AutoCertificate example location:auto_certificate_id
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 ionoscloudTerraform Provider.