4.9.1
This commit is contained in:
@@ -22,6 +22,7 @@ func flattenResourceAccount(d *schema.ResourceData, acc *account.RecordAccount)
|
||||
d.Set("deleted_by", acc.DeletedBy)
|
||||
d.Set("deleted_time", acc.DeletedTime)
|
||||
d.Set("displayname", acc.DisplayName)
|
||||
d.Set("enable", flattenEnabled(acc.Status))
|
||||
d.Set("guid", acc.GUID)
|
||||
d.Set("account_id", acc.ID)
|
||||
d.Set("account_name", acc.Name)
|
||||
@@ -422,3 +423,7 @@ func flattenAccResourceConsumption(lrc *account.ListResources) []map[string]inte
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func flattenEnabled(status string) bool {
|
||||
return status == "CONFIRMED"
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ func resourceAccountSchemaMake() map[string]*schema.Schema {
|
||||
Description: "Share images with account",
|
||||
},
|
||||
"reason": {
|
||||
Type: schema.TypeBool,
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "reason for restore or deactivation",
|
||||
},
|
||||
|
||||
@@ -81,7 +81,7 @@ func utilityAccountEnableUpdate(ctx context.Context, d *schema.ResourceData, m i
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else if !enable && acc.Status == status.Enabled {
|
||||
} else if !enable && acc.Status == status.Confirmed {
|
||||
_, err := c.CloudBroker().Account().Disable(ctx, account.DisableRequest{
|
||||
AccountID: acc.ID,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user