Skip to content

Commit

Permalink
docs(acme): generate documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>
  • Loading branch information
ZauberNerd committed Aug 3, 2024
1 parent 469a647 commit 7fd8797
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docs/data-sources/virtual_environment_acme_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: page
title: proxmox_virtual_environment_acme_account
parent: Data Sources
subcategory: Virtual Environment
description: |-
Retrieves information about a specific ACME account.
---

# Data Source: proxmox_virtual_environment_acme_account

Retrieves information about a specific ACME account.

## Example Usage

```terraform
// This will fetch all ACME accounts...
data "proxmox_virtual_environment_acme_accounts" "all" {}
// ...which we will go through in order to fetch the whole data on each account.
data "proxmox_virtual_environment_acme_account" "example" {
for_each = data.proxmox_virtual_environment_acme_accounts.all.accounts
name = each.value
}
output "data_proxmox_virtual_environment_acme_account" {
value = data.proxmox_virtual_environment_acme_account.example
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `name` (String) The identifier of the ACME account to read.

### Read-Only

- `account` (Attributes) The ACME account information. (see [below for nested schema](#nestedatt--account))
- `directory` (String) The directory URL of the ACME account.
- `location` (String) The location URL of the ACME account.
- `tos` (String) The URL of the terms of service of the ACME account.

<a id="nestedatt--account"></a>
### Nested Schema for `account`

Read-Only:

- `contact` (List of String) An array of contact email addresses.
- `created_at` (String) The timestamp of the account creation.
- `status` (String) The status of the account. Can be one of 'valid', 'deactivated' or 'revoked'.
29 changes: 29 additions & 0 deletions docs/data-sources/virtual_environment_acme_accounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: page
title: proxmox_virtual_environment_acme_accounts
parent: Data Sources
subcategory: Virtual Environment
description: |-
Retrieves the list of ACME accounts.
---

# Data Source: proxmox_virtual_environment_acme_accounts

Retrieves the list of ACME accounts.

## Example Usage

```terraform
data "proxmox_virtual_environment_acme_accounts" "example" {}
output "data_proxmox_virtual_environment_acme_accounts" {
value = data.proxmox_virtual_environment_acme_accounts.example.accounts
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `accounts` (Set of String) The identifiers of the ACME accounts.
52 changes: 52 additions & 0 deletions docs/resources/virtual_environment_acme_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: page
title: proxmox_virtual_environment_acme_account
parent: Resources
subcategory: Virtual Environment
description: |-
Manages an ACME account in a Proxmox VE cluster.
---

# Resource: proxmox_virtual_environment_acme_account

Manages an ACME account in a Proxmox VE cluster.

## Example Usage

```terraform
resource "proxmox_virtual_environment_acme_account" "example" {
name = "example"
contact = "example@email.com"
directory = "https://acme-staging-v02.api.letsencrypt.org/directory"
tos = "https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `contact` (String) The contact email addresses.

### Optional

- `directory` (String) The URL of the ACME CA directory endpoint.
- `eab_hmac_key` (String) The HMAC key for External Account Binding.
- `eab_kid` (String) The Key Identifier for External Account Binding.
- `name` (String) The ACME account config file name.
- `tos` (String) The URL of CA TermsOfService - setting this indicates agreement.

### Read-Only

- `location` (String) The location of the ACME account.

## Import

Import is supported using the following syntax:

```shell
#!/usr/bin/env sh
# ACME accounts can be imported using their name, e.g.:
terraform import proxmox_virtual_environment_acme_account.example example
```
3 changes: 3 additions & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
// Temporary: while migrating to the TF framework, we need to copy the generated docs to the right place
// for the resources / data sources that have been migrated.
//go:generate cp -R ../build/docs-gen/guides/. ../docs/guides/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_acme_account.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_acme_accounts.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_apt_repository.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_apt_standard_repository.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_hagroup.md ../docs/data-sources/
Expand All @@ -40,6 +42,7 @@ import (
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_version.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/data-sources/virtual_environment_vm2.md ../docs/data-sources/
//go:generate cp ../build/docs-gen/resources/virtual_environment_acl.md ../docs/resources/
//go:generate cp ../build/docs-gen/resources/virtual_environment_acme_account.md ../docs/resources/
//go:generate cp ../build/docs-gen/resources/virtual_environment_apt_repository.md ../docs/resources/
//go:generate cp ../build/docs-gen/resources/virtual_environment_apt_standard_repository.md ../docs/resources/
//go:generate cp ../build/docs-gen/resources/virtual_environment_cluster_options.md ../docs/resources/
Expand Down

0 comments on commit 7fd8797

Please sign in to comment.