4.10.0
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user