4.9.11
This commit is contained in:
@@ -70,6 +70,36 @@ func flattenFlipgroup(d *schema.ResourceData, flip *flipgroup.RecordFLIPGroup) {
|
||||
d.Set("updated_time", flip.UpdatedTime)
|
||||
}
|
||||
|
||||
func flattenFlipgroupResource(d *schema.ResourceData, flip *flipgroup.RecordFLIPGroup) {
|
||||
d.Set("flipgroup_id", flip.ID)
|
||||
d.Set("account_id", flip.AccountID)
|
||||
d.Set("account_name", flip.AccountName)
|
||||
d.Set("client_ids", flip.ClientIDs)
|
||||
d.Set("client_names", flip.ClientNames)
|
||||
d.Set("client_type", flip.ClientType)
|
||||
d.Set("conn_id", flip.ConnID)
|
||||
d.Set("conn_type", flip.ConnType)
|
||||
d.Set("created_by", flip.CreatedBy)
|
||||
d.Set("created_time", flip.CreatedTime)
|
||||
d.Set("default_gw", flip.DefaultGW)
|
||||
d.Set("deleted_by", flip.DeletedBy)
|
||||
d.Set("deleted_time", flip.DeletedTime)
|
||||
d.Set("description", flip.Description)
|
||||
d.Set("gid", flip.GID)
|
||||
d.Set("guid", flip.GUID)
|
||||
d.Set("ip", flip.IP)
|
||||
d.Set("milestones", flip.Milestones)
|
||||
d.Set("name", flip.Name)
|
||||
d.Set("net_id", flip.NetID)
|
||||
d.Set("net_type", flip.NetType)
|
||||
d.Set("network", flip.Network)
|
||||
d.Set("rg_id", flip.RGID)
|
||||
d.Set("rg_name", flip.RGName)
|
||||
d.Set("status", flip.Status)
|
||||
d.Set("updated_by", flip.UpdatedBy)
|
||||
d.Set("updated_time", flip.UpdatedTime)
|
||||
}
|
||||
|
||||
func flattenFlipgroupsList(fg *flipgroup.ListFLIPGroups) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(fg.Data))
|
||||
for _, flip := range fg.Data {
|
||||
|
||||
@@ -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"
|
||||
@@ -107,9 +108,9 @@ func resourceFlipgroupRead(ctx context.Context, d *schema.ResourceData, m interf
|
||||
return diag.Errorf("The flipgroup status is destroyed and cannot be read.")
|
||||
}
|
||||
|
||||
flattenFlipgroup(d, fg)
|
||||
flattenFlipgroupResource(d, fg)
|
||||
|
||||
log.Debugf("resourceFlipgroupRead: after flattenFlipgroup: flipgroup_id %s, name %s",
|
||||
log.Debugf("resourceFlipgroupRead: after flattenFlipgroupResource: flipgroup_id %s, name %s",
|
||||
d.Id(), d.Get("name").(string))
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user