diff --git a/go.sum b/go.sum index 08abc58..15fa801 100644 --- a/go.sum +++ b/go.sum @@ -257,8 +257,6 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/signalsciences/go-sigsci v0.1.19 h1:PV826ftNXvVjV+VW2kQegCWcK+sQ5FUlJvPlifcOyNk= -github.com/signalsciences/go-sigsci v0.1.19/go.mod h1:CXwoXk81ZwFdne6o8cnAYwxvke5kcLg7zE6Bl/e1KUo= github.com/signalsciences/go-sigsci v0.1.20 h1:lMirioZwNWhnizOqryzvr1dsvOpmOn2e4MK+XEzlXrA= github.com/signalsciences/go-sigsci v0.1.20/go.mod h1:CXwoXk81ZwFdne6o8cnAYwxvke5kcLg7zE6Bl/e1KUo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -421,7 +419,6 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= diff --git a/provider/lib.go b/provider/lib.go index 37b2900..5936bea 100644 --- a/provider/lib.go +++ b/provider/lib.go @@ -597,7 +597,10 @@ var siteImporter = schema.ResourceImporter{ if err != nil { return nil, err } - d.Set("site_short_name", site) + err = d.Set("site_short_name", site) + if err != nil { + return nil, err + } d.SetId(id) return []*schema.ResourceData{d}, nil }, diff --git a/provider/resource_site.go b/provider/resource_site.go index 6d91bdb..9a02e5d 100644 --- a/provider/resource_site.go +++ b/provider/resource_site.go @@ -13,7 +13,10 @@ func resourceSite() *schema.Resource { Delete: deleteSite, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, i interface{}) ([]*schema.ResourceData, error) { - d.Set("short_name", d.Id()) + err := d.Set("short_name", d.Id()) + if err != nil { + return nil, err + } d.SetId(d.Id()) return []*schema.ResourceData{d}, nil },