From 7a4a0f64c9617f932659971f20132e7612c7c8e8 Mon Sep 17 00:00:00 2001 From: Andreas Eriksson Date: Thu, 7 Sep 2023 13:19:48 +0200 Subject: [PATCH] glesys_email - API no longer accepts user passwords No longer support setting user passwords for email-accounts. Accept the password generated by API and set in the `password` field. --- glesys/resource_glesys_email.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/glesys/resource_glesys_email.go b/glesys/resource_glesys_email.go index 37e1a1a..3ac9faa 100644 --- a/glesys/resource_glesys_email.go +++ b/glesys/resource_glesys_email.go @@ -32,7 +32,7 @@ func resourceGlesysEmailAccount() *schema.Resource { "password": { Description: "Email Account password", Type: schema.TypeString, - Optional: true, + Computed: true, }, "antispamlevel": { Description: "Email Account antispam level. `0-5`", @@ -105,7 +105,6 @@ func resourceGlesysEmailAccountCreate(ctx context.Context, d *schema.ResourceDat params := glesys.CreateAccountParams{ EmailAccount: d.Get("emailaccount").(string), - Password: d.Get("password").(string), AntiVirus: d.Get("antivirus").(string), AntiSpamLevel: d.Get("antispamlevel").(int), AutoRespond: d.Get("autorespond").(string), @@ -126,7 +125,6 @@ func resourceGlesysEmailAccountCreate(ctx context.Context, d *schema.ResourceDat func resourceGlesysEmailAccountRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { client := m.(*glesys.Client) - log.Printf("[INFO] OK Prutt") components := strings.Split(d.Id(), "@") domain := components[1] listParams := glesys.ListEmailsParams{Filter: d.Id()} @@ -179,10 +177,6 @@ func resourceGlesysEmailAccountUpdate(ctx context.Context, d *schema.ResourceDat params.AutoRespondMessage = d.Get("autorespondmessage").(string) } - if d.HasChange("password") { - params.Password = d.Get("password").(string) - } - if d.HasChange("quotaingib") { params.QuotaInGiB = d.Get("quotaingib").(int) }