Skip to content

Commit

Permalink
Fixes older tfe, ws_settings always unsets execution_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonc committed Dec 22, 2023
1 parent 86c9895 commit 88c1610
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/provider/resource_tfe_workspace_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ func (m unknownIfExecutionModeUnset) PlanModifyString(ctx context.Context, req p
if configured.ExecutionMode.IsNull() && overwritesState[0].ExecutionMode.ValueBool() {
resp.PlanValue = types.StringUnknown()
}
} else if req.Path.Equal(path.Root("execution_mode")) {
} else if configured.ExecutionMode.IsNull() && req.Path.Equal(path.Root("execution_mode")) {
// TFE does not support overwrites so default the execution mode to "remote"
resp.PlanValue = types.StringValue("remote")
} else if configured.AgentPoolID.IsNull() && req.Path.Equal(path.Root("agent_pool_id")) {
resp.PlanValue = types.StringNull()
}
}

Expand Down

0 comments on commit 88c1610

Please sign in to comment.