Skip to content

Commit

Permalink
Merge pull request #155 from maveonair/certificate-resource
Browse files Browse the repository at this point in the history
Add certificate resource
  • Loading branch information
stgraber authored Nov 8, 2024
2 parents 31109ef + c1661ab commit ce0f9cf
Show file tree
Hide file tree
Showing 4 changed files with 495 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.
Loading

0 comments on commit ce0f9cf

Please sign in to comment.