Skip to content

Commit cca8687

Browse files
committed
fix test
1 parent 164de39 commit cca8687

File tree

2 files changed

+56
-72
lines changed

2 files changed

+56
-72
lines changed

internal/services/tem/domain.go

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package tem
22

33
import (
44
"context"
5-
"errors"
65
"fmt"
76

87
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
@@ -37,20 +36,9 @@ func ResourceDomain() *schema.Resource {
3736
Description: "The domain name used when sending emails",
3837
},
3938
"accept_tos": {
40-
Type: schema.TypeBool,
41-
Optional: true,
42-
Description: "Accept the Scaleway Terms of Service",
43-
Deprecated: "This field is deprecated and will be removed, the field is always set to null",
44-
ValidateFunc: func(i interface{}, _ string) (warnings []string, errs []error) {
45-
v := i.(bool)
46-
if !v {
47-
errs = append(errs, errors.New("you must accept the Scaleway Terms of Service to use this service"))
48-
49-
return warnings, errs
50-
}
51-
52-
return warnings, errs
53-
},
39+
Type: schema.TypeBool,
40+
Optional: true,
41+
Deprecated: "This attribute is deprecated and ignored, and will be removed in the next major version. You can safely remove it from your configuration.",
5442
},
5543
"autoconfig": {
5644
Type: schema.TypeBool,
@@ -231,12 +219,8 @@ func ResourceDomainRead(ctx context.Context, d *schema.ResourceData, m interface
231219
}
232220

233221
_ = d.Set("name", domain.Name)
234-
_ = d.Set("accept_tos", nil)
235222
_ = d.Set("autoconfig", domain.Autoconfig)
236223
_ = d.Set("status", domain.Status)
237-
if acceptTos, ok := d.GetOk("accept_tos"); ok {
238-
_ = d.Set("accept_tos", acceptTos)
239-
}
240224
_ = d.Set("created_at", types.FlattenTime(domain.CreatedAt))
241225
_ = d.Set("next_check_at", types.FlattenTime(domain.NextCheckAt))
242226
_ = d.Set("last_valid_at", types.FlattenTime(domain.LastValidAt))

0 commit comments

Comments
 (0)