1.2.1
This commit is contained in:
@@ -337,10 +337,11 @@ func flattenReservations(ctx context.Context, items *vins.ListReservations) type
|
||||
tempSlice := make([]types.Object, 0, len(*items))
|
||||
for _, item := range *items {
|
||||
temp := models.ReservationModel{
|
||||
IP: types.StringValue(item.IP),
|
||||
MAC: types.StringValue(item.MAC),
|
||||
Type: types.StringValue(item.Type),
|
||||
VMID: types.Int64Value(int64(item.VMID)),
|
||||
AccountID: types.Int64Value(int64(item.AccountID)),
|
||||
IP: types.StringValue(item.IP),
|
||||
MAC: types.StringValue(item.MAC),
|
||||
Type: types.StringValue(item.Type),
|
||||
VMID: types.Int64Value(int64(item.VMID)),
|
||||
}
|
||||
|
||||
obj, diags := types.ObjectValueFrom(ctx, models.ItemReservations, temp)
|
||||
|
||||
@@ -175,10 +175,11 @@ type RecordDHCPConfigModel struct {
|
||||
}
|
||||
|
||||
type ReservationModel struct {
|
||||
IP types.String `tfsdk:"ip"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
AccountID types.Int64 `tfsdk:"account_id""`
|
||||
IP types.String `tfsdk:"ip"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
}
|
||||
|
||||
type RecordNATModel struct {
|
||||
@@ -375,10 +376,11 @@ var ItemDHCPConfig = map[string]attr.Type{
|
||||
}
|
||||
|
||||
var ItemReservations = map[string]attr.Type{
|
||||
"ip": types.StringType,
|
||||
"mac": types.StringType,
|
||||
"type": types.StringType,
|
||||
"vm_id": types.Int64Type,
|
||||
"account_id": types.Int64Type,
|
||||
"ip": types.StringType,
|
||||
"mac": types.StringType,
|
||||
"type": types.StringType,
|
||||
"vm_id": types.Int64Type,
|
||||
}
|
||||
|
||||
var ItemGW = map[string]attr.Type{
|
||||
|
||||
@@ -333,6 +333,9 @@ func MakeSchemaDataSourceVINS() map[string]schema.Attribute {
|
||||
Computed: true,
|
||||
NestedObject: schema.NestedAttributeObject{
|
||||
Attributes: map[string]schema.Attribute{
|
||||
"account_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"ip": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user