Skip to content

Commit

Permalink
docs: Add certificate resource
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Mettler <[email protected]>
  • Loading branch information
maveonair committed Nov 8, 2024
1 parent e180a3d commit c1661ab
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docs/resources/certificate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# incus_certificate

Manages an Incus certificate.

## Example Usage

```hcl
resource "incus_certificate" "client1" {
name = "client1"
certificate = file("${path.module}/metrics.crt")
}
```

## Project Restriction Example

```hcl
resource "incus_project" "project1" {
name = "project1"
}
resource "incus_certificate" "prometheus" {
name = "prometheus"
description = "Prometheus Node Exporter Access"
restricted = true
projects = [incus_project.project1.name]
type = "metrics"
certificate = file("${path.module}/metrics.crt")
}
```

## Argument Reference

* `name` - **Required** - Name of the certificate.

* `certificate` - **Required** - The certificate.

* `description` - *Optional* - Description of the certificate.

* `type` - *Optional* - The type of certificate to create. Can be one of: client,
or metrics. If no type is specified, a client certificate is created.

* `projects` - *Optional* - List of projects to restrict the certificate to.

* `restricted` - *Optional* - Restrict the certificate to one or more projects.

* `remote` - *Optional* - The remote in which the resource will be created. If
not provided, the provider's default remote will be used.

## Attribute Reference

The following attributes are exported:

* `fingerprint` - The fingerprint of the certificate.

0 comments on commit c1661ab

Please sign in to comment.