This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -119,6 +119,9 @@ func MakeSchemaDataSourceK8S() map[string]schema.Attribute {
"deleted_time": schema.Int64Attribute{
Computed: true,
},
"desc": schema.StringAttribute{
Computed: true,
},
"extnet_id": schema.Int64Attribute{
Computed: true,
},

View File

@@ -4,6 +4,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
@@ -85,10 +86,14 @@ func MakeSchemaResourceK8SCP() map[string]schema.Attribute {
},
"with_lb": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(true),
Description: "Create k8s with load balancer if true.",
},
"ha_mode": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(false),
Description: "Use Highly Available schema for LB deploy",
},
"additional_sans": schema.ListAttribute{
@@ -118,10 +123,13 @@ func MakeSchemaResourceK8SCP() map[string]schema.Attribute {
},
"desc": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "Text description of this instance.",
},
"extnet_only": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(false),
Description: "Use only selected ExtNet for infrastructure connections",
},
"oidc_cert": schema.StringAttribute{
@@ -152,18 +160,26 @@ func MakeSchemaResourceK8SCP() map[string]schema.Attribute {
// optional attributes for update
"start": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(false),
Description: "Start k8s cluster.",
},
"enabled": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(true),
Description: "Enable k8s cluster",
},
"permanently": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(true),
Description: "whether to completely delete the k8s cluster",
},
"restore": schema.BoolAttribute{
Optional: true,
Computed: true,
Default: booldefault.StaticBool(true),
Description: "if true, restore the k8s cluster from Recycle Bin",
},
// computed attributes

View File

@@ -29,13 +29,6 @@ func MakeSchemaResourceK8SWG() map[string]schema.Attribute {
Computed: true,
Description: "Number of worker nodes to create.",
},
"worker_chipset": schema.StringAttribute{
Optional: true,
Description: "Type of the emulated system of worker nodes",
Validators: []validator.String{
stringvalidator.OneOfCaseInsensitive("Q35", "i440fx"),
},
},
"cpu": schema.Int64Attribute{
Optional: true,
Computed: true,