As a result of referee Matthieu Raynal's ruling the All Blacks were awarded a scrum in front of Australia's posts from which Jordie Barrett, who had moved to second five-eighths, scored the match-winning try.
Raynal's decision dominated post-match discussions, but Foster said he thought his decision was clear-cut.
"They were delaying the kick. He said 'Time off', warned them and said 'Time off', and said to speed it up, and then he said 'Time on'. Then he asked him twice to kick it, so I understand there was a bit of contentiousness about it, but it was very clear-cut from our position.
"Probably the other one that wasn't clear cut was when [Andrew] Kellaway scored and the TMO wanted to look at what was a very suspicious forward pass, and yet the conversion was allowed to be taken. So there's a bit of swings and roundabouts."
Foster said the referee had told Foley not to take the conversion because they were checking something, but he had taken it.
Foster said it was clear what the referee said at the end of the game. Everyone had to be careful if they thought that decided the Test match, then they should go through and analyse all the other decisions.
"I thought the referee was very clear about what he did, so whether people agree or disagree, he had a very clear mind about it."
He was disappointed the All Blacks hadn't been able to seal the game off at 31-13.
"We'd like to think we'd finish a game off better than what we did. We got ourselves in a position to do that, but perhaps, what was our strength two weeks ago became our weakness in that last quarter when we let through a couple of tries through tackles that should have been made and weren't.
"What I was delighted with was that it set ourselves up for the last few minutes where we had to show some character coming from behind in a game we could have, and should have, had a bit more control of."
He compared it to the second Test against South Africa when they had shown composure at the end to get the job done.
Acting captain Sam Whitelock said his decision to kick for the corner, rather than take a shot at goal and settle for a draw in the final minutes, was made on how well the All Blacks' maul had performed. If they had drawn, it would have taken the Bledisloe Cup to be decided next week in Auckland.
"Every game means a massive amount to us, individually and as a team, and we're not hiding from the fact that we've had a bit of an up and down year so far.
"So to get back-to-back wins, we're in a pretty good spot to finish strongly, rather than let them come back with all the momentum. But to get the win is what we always want to do first, and then assess how we got it.
"I know Fozzie [Foster] will have a big long list to look at during the review, and we need to look at those things and work out how we can do it better because at times this year we have done it well, but we did allow a good side back in."
Discipline in the set-piece had been an issue, and Whitelock confessed he had been penalised for closing the gap in the lineout. They couldn't afford to let a team high on emotion and momentum back into the game.
Whitelock said he had never experienced a ruling on time-wasting by either side in his career, but he said it was important to have a plan to close out a game whether up by one point or more.
"Slips [Australia captain James Slipper] and I have known each other for a long time and he said, 'we've got to be better than that' and he's spot-on."
Foster said there had been things in the game the All Blacks did well. Earlier, they hadn't started well but were starting better now. They had taken advantage of yellow card opportunities in the second half, but work was needed on finishing.
He said there were many Bledisloe Cup games that had been won in the last minute by either side, and it was a credit to both teams. Australia played some great rugby in the final quarter, gave it everything and showed how much it meant to them.
He added that replacement second five-eighths Quinn Tupaea had gone to hospital with what looked like an ACL injury which could be a long-term issue. They were concerned with the incident that resulted in a yellow card for Australian replacement Darcy Swain.
"You're not allowed to target legs at a clean-out past the ball. The rules are pretty clear," he said.