Skip to content

Commit 88c1610

Browse files
committed
Fixes older tfe, ws_settings always unsets execution_mode
1 parent 86c9895 commit 88c1610

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/provider/resource_tfe_workspace_settings.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ func (m unknownIfExecutionModeUnset) PlanModifyString(ctx context.Context, req p
166166
if configured.ExecutionMode.IsNull() && overwritesState[0].ExecutionMode.ValueBool() {
167167
resp.PlanValue = types.StringUnknown()
168168
}
169-
} else if req.Path.Equal(path.Root("execution_mode")) {
169+
} else if configured.ExecutionMode.IsNull() && req.Path.Equal(path.Root("execution_mode")) {
170170
// TFE does not support overwrites so default the execution mode to "remote"
171171
resp.PlanValue = types.StringValue("remote")
172+
} else if configured.AgentPoolID.IsNull() && req.Path.Equal(path.Root("agent_pool_id")) {
173+
resp.PlanValue = types.StringNull()
172174
}
173175
}
174176

0 commit comments

Comments
 (0)