The Atletico Madrid striker's inclusion in Vicente del Bosque's side was much hyped after his decision to commit his international career to the world and European champions instead of the country of his birth, Brazil.
Costa made two appearances for the 2014 World Cup hosts in March against Russia and Italy, but was allowed to switch allegiances as he had not played for them in a competitive fixture.
He sustained the injury in Sunday's 1-1 La Liga draw against Villarreal, being replaced by Adrian Lopez in the 82nd minute at Estadio Madrigal.
Costa has hit the headlines for his scintillating early-season form, scoring 16 goals in 17 outings to propel Atleti into the Champions league knockout stages and second place in La Liga.
Del Bosque will also have to make do without Cesc Fabregas, who withdrew because of a knee injury and was replaced by Barcelona teammate Marc Bartra.