Skip to content

Commit

Permalink
fix(function_token): set token only on create (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Apr 11, 2023
1 parent 59d63aa commit 4fbe62d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scaleway/resource_function_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ func resourceScalewayFunctionTokenCreate(ctx context.Context, d *schema.Resource

d.SetId(newRegionalIDString(region, token.ID))

_ = d.Set("token", token.Token)

return resourceScalewayFunctionTokenRead(ctx, d, meta)
}

Expand All @@ -101,7 +103,6 @@ func resourceScalewayFunctionTokenRead(ctx context.Context, d *schema.ResourceDa
_ = d.Set("namespace_id", flattenStringPtr(token.NamespaceID))
_ = d.Set("description", flattenStringPtr(token.Description))
_ = d.Set("expires_at", flattenTime(token.ExpiresAt))
_ = d.Set("token", token.Token)

return nil
}
Expand Down

0 comments on commit 4fbe62d

Please sign in to comment.