Preheat the oven to 375°F (190°C) and line a baking tray with parchment paper.
In a mixing bowl, combine the sweet corn, diced ham, shredded cheddar, green onions, garlic powder, and black pepper. Mix well.
Roll out the crescent dough or puff pastry and cut into squares or triangles, depending on your preferred shape.
Place a spoonful of the filling onto each dough square, then fold or roll to seal the bite.
If desired, brush each bite with beaten egg for a golden finish.
Bake in the preheated oven for 15–18 minutes, or until the pastry is golden brown and the cheese is bubbly.
Let rest for 5 minutes before serving. Serve warm with your favorite dipping sauce.