Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Uk1288 committed Aug 26, 2022
1 parent 17e423a commit be89d11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tfe/resource_tfe_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +670,14 @@ func resourceTFEWorkspaceDelete(d *schema.ResourceData, meta interface{}) error
// value is not detected by ResourceDiff so read value from RawConfig instead
func setExecutionModeDefault(_ context.Context, d *schema.ResourceDiff) error {
configMap := d.GetRawConfig().AsValueMap()
operations, _ := configMap["operations"]
executionMode, ok := configMap["execution_mode"]
operations, operationsReadOk := configMap["operations"]
executionMode, executionModeReadOk := configMap["execution_mode"]
executionModeState := d.Get("execution_mode")
if ok {
if operationsReadOk && executionModeReadOk {
if operations.IsNull() && executionMode.IsNull() && executionModeState != "remote" {
err := d.SetNew("execution_mode", "remote")
if err != nil {
return err
return fmt.Errorf("failed to set execution_mode: %w", err)
}
}
}
Expand Down

0 comments on commit be89d11

Please sign in to comment.