Skip to content

Commit

Permalink
glesys_email - API no longer accepts user passwords
Browse files Browse the repository at this point in the history
No longer support setting user passwords for email-accounts.

Accept the password generated by API and set in the `password` field.
  • Loading branch information
norrland committed Sep 7, 2023
1 parent f3da24a commit 7a4a0f6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions glesys/resource_glesys_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`",
Expand Down Expand Up @@ -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),
Expand All @@ -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()}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 7a4a0f6

Please sign in to comment.