> For the complete documentation index, see [llms.txt](https://docs.ionos.com/terraform-provider/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/terraform-provider/data-sources/certificate_manager_auto_certificate.md).

# ionoscloud\_auto\_certificate

The **CM AutoCertificate data source** can be used to search for and return an existing auto-certificate. You can provide a string for either id or name parameters which will be compared with provisioned auto-certificates. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

### By ID

```hcl
data "ionoscloud_auto_certificate" "example" {
  id			= "auto_certificate_id"
  location      = "auto_certificate_location"
}
```

### By Name

```hcl
data "ionoscloud_auto_certificate" "example" {
  name			= "AutoCertificate Name Example"
  location      = "auto_certificate_location"
}
```

## Argument Reference

The following arguments are supported:

* `location` - (Required)\[string] The location of the auto-certificate. Available locations: `de/fra`, `de/fra/2`.
* `name` - (Optional)\[string] Name of an existing auto-certificate that you want to search for.
* `id` - (Optional)\[string] ID of the auto-certificate you want to search for.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

The following attributes are returned by the datasource:

* `common_name` - \[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` - \[string] The key algorithm used to generate the certificate.
* `subject_alternative_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.
* `last_issued_certificate_id` - \[string] The ID of the last certificate that was issued.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/certificate_manager_auto_certificate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
