This commit is contained in:
2025-08-04 16:11:16 +03:00
parent bae25296bb
commit 4b3f21d9be
239 changed files with 6585 additions and 784 deletions

View File

@@ -37,6 +37,7 @@ package flipgroup
import (
"context"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/flipgroup"
@@ -58,16 +59,18 @@ func resourceFlipgroupCreate(ctx context.Context, d *schema.ResourceData, m inte
}
req := flipgroup.CreateRequest{
Name: d.Get("name").(string),
NetType: d.Get("net_type").(string),
ClientType: d.Get("client_type").(string),
AccountID: uint64(d.Get("account_id").(int)),
NetID: uint64(d.Get("net_id").(int)),
Name: d.Get("name").(string),
NetType: d.Get("net_type").(string),
AccountID: uint64(d.Get("account_id").(int)),
NetID: uint64(d.Get("net_id").(int)),
}
if IP, ok := d.GetOk("ip"); ok {
req.IP = IP.(string)
}
if clientType, ok := d.GetOk("client_type"); ok {
req.ClientType = clientType.(string)
}
if description, ok := d.GetOk("desc"); ok {
req.Description = description.(string)
}

View File

@@ -369,7 +369,8 @@ func resourceFlipgroupSchemaMake() map[string]*schema.Schema {
},
"client_type": {
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "compute",
Description: "Type of client, 'compute' ('vins' will be later)",
ValidateFunc: validation.StringInSlice([]string{"compute"}, true),
},