diff --git a/client/project.go b/client/project.go index 544dfd4d..043e3e6f 100644 --- a/client/project.go +++ b/client/project.go @@ -336,7 +336,7 @@ func (c *RollbarAPIClient) UpdateProject(projectID int, name, timezone, timeForm l.Err(err).Send() return nil, err } - l.Debug().Msg("Project successfully created") + l.Debug().Msg("Project successfully updated") pr := resp.Result().(*projectResponse) return &pr.Result, nil } diff --git a/rollbar/common.go b/rollbar/common.go index b21cf9a2..f1e46c29 100644 --- a/rollbar/common.go +++ b/rollbar/common.go @@ -50,6 +50,6 @@ func setDataSourceHeader(header string, c *client.RollbarAPIClient) { const ( settingsData = "settings_data" - timeZoneDefault = "US/Pacific" - timeformatDefault = "12h" + timezoneDefault = "US/Pacific" + timeFormatDefault = "12h" ) diff --git a/rollbar/resource_project.go b/rollbar/resource_project.go index 4774f0df..961b592e 100644 --- a/rollbar/resource_project.go +++ b/rollbar/resource_project.go @@ -110,10 +110,10 @@ func resourceProjectCreate(ctx context.Context, d *schema.ResourceData, m interf timeFormat := d.Get(projectTimeFormat).(string) if timezone == "" { - timezone = timeZoneDefault + timezone = timezoneDefault } if timeFormat == "" { - timeFormat = timeformatDefault + timeFormat = timeFormatDefault } l := log.With().Str(projectName, name).Logger() @@ -228,10 +228,10 @@ func resourceProjectRead(ctx context.Context, d *schema.ResourceData, m interfac } for k, v := range mProj[settingsData].(map[string]interface{}) { - if k == projectTimezone && v == timeZoneDefault { + if k == projectTimezone && v == timezoneDefault { continue } - if k == projectTimeFormat && v == timeformatDefault { + if k == projectTimeFormat && v == timeFormatDefault { continue } mustSet(d, k, v) @@ -260,10 +260,10 @@ func resourceProjectUpdate(ctx context.Context, d *schema.ResourceData, m interf timezone := d.Get(projectTimezone).(string) timeFormat := d.Get(projectTimeFormat).(string) if timezone == "" { - timezone = timeZoneDefault + timezone = timezoneDefault } if timeFormat == "" { - timeFormat = timeformatDefault + timeFormat = timeFormatDefault } l := log.With(). Int("project_id", projectID). diff --git a/rollbar/resource_project_test.go b/rollbar/resource_project_test.go index 1a5171d9..2e373f9c 100644 --- a/rollbar/resource_project_test.go +++ b/rollbar/resource_project_test.go @@ -294,7 +294,7 @@ func (s *AccSuite) configResourceProject() string { resource "rollbar_project" "foo" { name = "%s" timezone = "UTC" - time_format = "24h" + time_format = "24h" } ` return fmt.Sprintf(tmpl, s.randName)