1.3.0
This commit is contained in:
@@ -27,11 +27,11 @@ func LBResource(ctx context.Context, plan *models.ResourceLBModel, c *client.Cli
|
||||
acl, _ := json.Marshal(recordItemLB.ACL)
|
||||
|
||||
*plan = models.ResourceLBModel{
|
||||
RGID: plan.RGID,
|
||||
Name: plan.Name,
|
||||
ExtNetID: plan.ExtNetID,
|
||||
VINSID: plan.VINSID,
|
||||
Start: plan.Start,
|
||||
RGID: types.Int64Value(int64(recordItemLB.RGID)),
|
||||
Name: types.StringValue(recordItemLB.Name),
|
||||
ExtNetID: types.Int64Value(int64(recordItemLB.ExtNetID)),
|
||||
VINSID: types.Int64Value(int64(recordItemLB.VINSID)),
|
||||
Start: types.BoolValue(recordItemLB.TechStatus == "STARTED"),
|
||||
ID: plan.ID,
|
||||
|
||||
HAMode: types.BoolValue(recordItemLB.HAMode),
|
||||
@@ -41,7 +41,7 @@ func LBResource(ctx context.Context, plan *models.ResourceLBModel, c *client.Cli
|
||||
Permanently: plan.Permanently,
|
||||
Restore: plan.Restore,
|
||||
Restart: plan.Restart,
|
||||
Enable: plan.Enable,
|
||||
Enable: types.BoolValue(recordItemLB.Status == "ENABLED"),
|
||||
ConfigReset: plan.ConfigReset,
|
||||
|
||||
ACL: types.StringValue(string(acl)),
|
||||
|
||||
@@ -25,7 +25,7 @@ func LBBackendResource(ctx context.Context, plan *models.ResourceLBBackendModel,
|
||||
|
||||
*plan = models.ResourceLBBackendModel{
|
||||
LBID: plan.LBID,
|
||||
Name: plan.Name,
|
||||
Name: types.StringValue(recordItemBackend.Name),
|
||||
ID: plan.ID,
|
||||
Timeouts: plan.Timeouts,
|
||||
GUID: types.StringValue(recordItemBackend.GUID),
|
||||
|
||||
@@ -24,9 +24,10 @@ func LBBackendServerResource(ctx context.Context, plan *models.ResourceLBBackend
|
||||
*plan = models.ResourceLBBackendServerModel{
|
||||
LBID: plan.LBID,
|
||||
Backend: plan.Backend,
|
||||
Name: plan.Name,
|
||||
Address: plan.Address,
|
||||
Port: plan.Port,
|
||||
Name: types.StringValue(recordItemServer.Name),
|
||||
Address: types.StringValue(recordItemServer.Address),
|
||||
Port: types.Int64Value(int64(recordItemServer.Port)),
|
||||
GUID: types.StringValue(recordItemServer.GUID),
|
||||
ID: plan.ID,
|
||||
Timeouts: plan.Timeouts,
|
||||
Check: types.StringValue(recordItemServer.Check),
|
||||
|
||||
@@ -25,7 +25,7 @@ func LBFrontendResource(ctx context.Context, plan *models.ResourceLBFrontendMode
|
||||
|
||||
*plan = models.ResourceLBFrontendModel{
|
||||
LBID: plan.LBID,
|
||||
Name: plan.Name,
|
||||
Name: types.StringValue(recordItemFrontend.Name),
|
||||
Backend: plan.Backend,
|
||||
ID: plan.ID,
|
||||
Timeouts: plan.Timeouts,
|
||||
|
||||
@@ -22,14 +22,14 @@ func LBFrontendBindResource(ctx context.Context, plan *models.ResourceLBFrontend
|
||||
}
|
||||
|
||||
*plan = models.ResourceLBFrontendBindModel{
|
||||
Address: plan.Address,
|
||||
Address: types.StringValue(recordItemFrontendBind.Address),
|
||||
Frontend: plan.Frontend,
|
||||
LBID: plan.LBID,
|
||||
Name: plan.Name,
|
||||
Name: types.StringValue(recordItemFrontendBind.Name),
|
||||
ID: plan.ID,
|
||||
Timeouts: plan.Timeouts,
|
||||
GUID: types.StringValue(recordItemFrontendBind.GUID),
|
||||
Port: plan.Port,
|
||||
Port: types.Int64Value(int64(recordItemFrontendBind.Port)),
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "End flattens.LBFrontendBindResource", map[string]any{"name": plan.Name.ValueString()})
|
||||
|
||||
@@ -30,6 +30,7 @@ func MakeSchemaResourceLB() map[string]schema.Attribute {
|
||||
"ha_mode": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Default: booldefault.StaticBool(false),
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Optional: true,
|
||||
|
||||
Reference in New Issue
Block a user