This commit is contained in:
2024-03-26 12:17:33 +03:00
parent f49d9f8860
commit 91ba361af9
97 changed files with 6127 additions and 5997 deletions

View File

@@ -3,6 +3,8 @@ package k8s
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/validators"
)
/*
@@ -1345,9 +1347,13 @@ func resourceK8sCPSchemaMake() map[string]*schema.Schema {
Description: "Node CPU count.",
},
"ram": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
Type: schema.TypeInt,
Optional: true,
Computed: true,
ValidateFunc: validation.All(
validation.IntAtLeast(constants.MinRamPerCompute),
validators.DivisibleBy(constants.RAMDivisibility),
),
Description: "Node RAM in MB.",
},
"disk": {
@@ -1735,9 +1741,13 @@ func resourceK8sWgSchemaMake() map[string]*schema.Schema {
Description: "Worker node CPU count.",
},
"ram": {
Type: schema.TypeInt,
Optional: true,
Default: 1024,
Type: schema.TypeInt,
Optional: true,
Default: 1024,
ValidateFunc: validation.All(
validation.IntAtLeast(constants.MinRamPerCompute),
validators.DivisibleBy(constants.RAMDivisibility),
),
Description: "Worker node RAM in MB.",
},
"disk": {