mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-04 21:14:05 +00:00
* feat(acme): implement CRUD API for proxmox cluster ACME * feat(acme): implement acme_accounts data source * feat(acme): implement acme_account data source * fix(acme): wait for task status on account creation * feat(acme): implement account resource creation * feat(acme): implement account read * fix(acme): wait for task status on account update * feat(acme): implement account update * fix(acme): wait for task status on account deletion * feat(acme): implement account deletion * feat(acme): implement account import * feat(acme): provide correctly typed API response for `account` field * feat(acme): implement account schema for acme_account data source * fix(acme): read `location` into state in acme_account resource * fix(acme): ensure `name` of acme_account resource can't be changed * docs(acme): generate documentation * feat(acme): read back ACME account details from API * Revert "fix(acme): ensure `name` of acme_account resource can't be changed" * fix(acme): provide default for acme account name * fix(acme): acme account name can't be changed * chore(acme): update resource doc to clarify PVE auth requirements * chore(acme): add `created_at` attr to the resource, sort model fields & schema attributes alphabetically --------- Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
32 lines
812 B
Go
32 lines
812 B
Go
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
package account
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/bpg/terraform-provider-proxmox/proxmox/api"
|
|
"github.com/bpg/terraform-provider-proxmox/proxmox/nodes/tasks"
|
|
)
|
|
|
|
// Client is an interface for accessing the Proxmox ACME management API.
|
|
type Client struct {
|
|
api.Client
|
|
}
|
|
|
|
// ExpandPath expands a relative path to the Proxmox ACME management API path.
|
|
func (c *Client) ExpandPath(path string) string {
|
|
return fmt.Sprintf("cluster/acme/account/%s", path)
|
|
}
|
|
|
|
// Tasks returns a client for managing ACME account tasks.
|
|
func (c *Client) Tasks() *tasks.Client {
|
|
return &tasks.Client{
|
|
Client: c.Client,
|
|
}
|
|
}
|