Goats...fences... Isn't there an old Texas saying about goat fencing that "it ain't tight enough if smoke blows through it"?
Our fencing (not for goats!) has lots of elevation changes like terraces. I think that the challenge is the inside corner, where the uphill fence and the horizontal fence will be trying to pull the inside fence post up and out. I would suggest that the inside corner, close to the hill, should have at least a corner style "H" braced double posts to handle the fence stress. If your terrace isn't large, I would brace the post uphill to the inside post as well, giving you all three posts being fastened together to resist the fence strain. For all of them, I would put in the deepest post that I could get away with. For goat fencing, you would usually need to cut the fence into an uphill piece, a terrace piece, and a downhill piece, and stretch each of them individually.
We have used two 2" pipe driven in 3-5', crossing just above ground level and a wire tying the two together running up the fence to provide an anchor to apply down force on a barbed wire fence at the inside corner. I doubt that would work for you. If I were doing it again, I would use three pieces of steel fence posts, welded together.
FWIW: We also run electric fence inside to keep animals from pressuring or exploring the main fence.
Having grown up with hillsides with relatively slow change of slope, I find these rapid change of slope fences a lot more work, because you need so many control structures to get the forces right on the fence. If we had more rock, I would consider
@oosik's suggestion of gabions, but for goats I would put the gabion outside their enclosure.
All the best,
Peter