4.3.0
This commit is contained in:
@@ -41,9 +41,9 @@ import (
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
|
||||
)
|
||||
|
||||
func flattenRgList(rgl rg.ListRG) []map[string]interface{} {
|
||||
func flattenRgList(rgl *rg.ListRG) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
for _, rg := range rgl {
|
||||
for _, rg := range rgl.Data {
|
||||
temp := map[string]interface{}{
|
||||
"account_id": rg.AccountID,
|
||||
"account_name": rg.AccountName,
|
||||
|
||||
@@ -84,8 +84,8 @@ func utilityResgroupCheckPresence(ctx context.Context, d *schema.ResourceData, m
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Debugf("utilityResgroupCheckPresence: traversing decoded Json of length %d", len(model))
|
||||
for index, item := range model {
|
||||
log.Debugf("utilityResgroupCheckPresence: traversing decoded Json of length %d", len(model.Data))
|
||||
for index, item := range model.Data {
|
||||
// match by RG name & account ID
|
||||
if item.Name == rgName.(string) && item.AccountID == uint64(d.Get("account_id").(int)) {
|
||||
log.Debugf("utilityResgroupCheckPresence: match RG name %s / ID %d, account ID %d at index %d",
|
||||
|
||||
@@ -41,7 +41,7 @@ import (
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func utilityRgListCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (rg.ListRG, error) {
|
||||
func utilityRgListCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (*rg.ListRG, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := rg.ListRequest{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user