Auto Certificate

auto_certificate

This is a simple module that supports uploading, updating or deleting Auto Certificates in the Ionos Cloud Certificate Manager.

Example Syntax


name: Create Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  certificate_name: 'autoCertificateTest'
  common_name: 'devsdkionos.net'
  provider: ''
  key_algorithm: 'rsa4096'
  allow_replace: true
register: auto_certificate


name: Update Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  auto_certificate: ''
  certificate_name: 'autoCertificateTestUpdated'
  allow_replace: false
  state: update
register: auto_certificate_update


name: Delete Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  auto_certificate: 'autoCertificateTestUpdated'
  wait: true
  state: absent

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "auto_certificate": {
        "id": "c2a80f2c-d97d-47b8-ad38-6ff09881c8a8",
        "type": "auto-certificate",
        "href": "/auto-certificates/c2a80f2c-d97d-47b8-ad38-6ff09881c8a8",
        "metadata": {
            "created_date": "2025-09-29T11:14:24.072501+00:00",
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "last_modified_date": "2025-09-29T11:14:24.072501+00:00",
            "last_modified_by": "<USER_EMAIL>",
            "last_modified_by_user_id": "<USER_ID>",
            "resource_urn": "<URN>",
            "state": "PROVISIONING",
            "message": "Issue in progress.",
            "last_issued_certificate": null
        },
        "properties": {
            "provider": "92f64cc8-f137-4238-bd0a-3de9c6019ab7",
            "common_name": "devsdkionos.net",
            "key_algorithm": "rsa4096",
            "name": "autoCertificateTest",
            "subject_alternative_names": []
        }
    }
}

For more examples please check out the tests here.

NOTE: If you are using a versions 7.0.0 and up: modules can replace resources if certain set parameters differ from the results found in the API!

Parameters that can trigger a resource replacement:

  • common_name

  • provider

  • key_algorithm

  • subject_alternative_names

state: present

  
name: Create Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  certificate_name: 'autoCertificateTest'
  common_name: 'devsdkionos.net'
  provider: ''
  key_algorithm: 'rsa4096'
  allow_replace: true
register: auto_certificate

Available parameters for state present:

Name
Required
Description

certificate_name str

False

A certificate name used for management purposes.

common_name str

False

The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.

provider str

False

The certificate provider used to issue the certificates.

key_algorithm str

False

The key algorithm used to generate the certificate.

subject_alternative_names list

False

Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.

allow_replace bool

False

Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: absent

  
name: Delete Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  auto_certificate: 'autoCertificateTestUpdated'
  wait: true
  state: absent

Available parameters for state absent:

Name
Required
Description

auto_certificate str

False

The certificate name or ID.

certificate_name str

False

A certificate name used for management purposes.

common_name str

False

The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.

provider str

False

The certificate provider used to issue the certificates.

key_algorithm str

False

The key algorithm used to generate the certificate.

subject_alternative_names list

False

Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: update

  
name: Update Auto Certificate
ionoscloudsdk.ionoscloud.auto_certificate:
  auto_certificate: ''
  certificate_name: 'autoCertificateTestUpdated'
  allow_replace: false
  state: update
register: auto_certificate_update

Available parameters for state update:

Name
Required
Description

auto_certificate str

True

The certificate name or ID.

certificate_name str

True

A certificate name used for management purposes.

common_name str

False

The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.

provider str

False

The certificate provider used to issue the certificates.

key_algorithm str

False

The key algorithm used to generate the certificate.

subject_alternative_names list

False

Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.

allow_replace bool

False

Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

Last updated