Stroman was scratched from his start against the Boston Red Sox on Thursday with a cramped left pectoral that forced him out of his previous appearance on June 29 after four innings.
Tanaka didn't seem like he was expecting to play in the Midsummer Classic this year.
"I think [my reaction] was similar to how everybody else ... reacted," Tanaka told reporters after the announcement. "Pretty surprised. This time around, I get to actually go there and be part of the celebration, so all in all, I'm very happy about it."
Tanaka has a 3.86 ERA with 90 strikeouts in 105 innings pitched over 18 starts. This will be the right-hander's second career All-Star appearance and first since his rookie season in 2014. He didn't appear in the game five years ago because of an elbow injury.