mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +00:00
* feat(acme): implement CRUD API for proxmox cluster ACME plugins Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement acme_plugins data source Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement acme_plugin data source Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement plugin resource creation Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement plugin resource read Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement plugin resource update Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement plugin resource deletion Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat(acme): implement plugin resource import Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * docs(acme): generate documentation Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: apply suggestions from code review Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * refactor: extract common fields into BasePluginData Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: restrict plugin resource to type=dns only because type=standalone is not configurable and always enabled by default. Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: remove unused 'nodes' property https://github.com/bpg/terraform-provider-proxmox/pull/1479/files#r1710916265 Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: remove "delete" property https://github.com/bpg/terraform-provider-proxmox/pull/1479/files#r1710908809 Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * feat: implement attribute deletion Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: ignore empty lines in dns plugin data Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: partial revert of code review suggestions Joining the values with a string literal would produce \\n instead of \n and splitting at \\n doesn't match a newline. Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * refactor: extract acme plugin models into separate file Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> * fix: format disable parameter as int Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> --------- Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
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 acme
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform-plugin-framework/types"
|
|
)
|
|
|
|
// acmePluginsModel maps the schema data for the ACME plugins data source.
|
|
type acmePluginsModel struct {
|
|
Plugins []acmePluginModel `tfsdk:"plugins"`
|
|
}
|
|
|
|
type baseACMEPluginModel struct {
|
|
// API plugin name
|
|
API types.String `tfsdk:"api"`
|
|
// DNS plugin data
|
|
Data types.Map `tfsdk:"data"`
|
|
// Prevent changes if current configuration file has a different digest.
|
|
// This can be used to prevent concurrent modifications.
|
|
Digest types.String `tfsdk:"digest"`
|
|
// Plugin ID name
|
|
Plugin types.String `tfsdk:"plugin"`
|
|
// Extra delay in seconds to wait before requesting validation (0 - 172800)
|
|
ValidationDelay types.Int64 `tfsdk:"validation_delay"`
|
|
}
|
|
|
|
// acmePluginModel maps the schema data for an ACME plugin.
|
|
type acmePluginModel struct {
|
|
baseACMEPluginModel
|
|
Type types.String `tfsdk:"type"`
|
|
}
|
|
|
|
// acmePluginCreateModel maps the schema data for an ACME plugin.
|
|
type acmePluginCreateModel struct {
|
|
baseACMEPluginModel
|
|
// Flag to disable the config
|
|
Disable types.Bool `tfsdk:"disable"`
|
|
}
|