Sofia Vergara says becoming one of the highest-paid actresses on TV 'has not been easy'

Sofia Vergara may be the highest-paid actress on TV, but it wasn't easy getting there.

"It’s very rewarding," the "Modern Family" star tells Health magazine for its October issue, on stands Friday. "I’m 46 and I’ve been working for almost 30 years. So being able to do something that I love in the entertainment business, and on top of that being able to make money? It’s been a wonderful experience. It has not been easy."

"It’s been a lot of work, but it makes you feel rewarded for all the sacrifices -- like missing my son’s birthday here and there and not being able to be present all the time for him," she adds.

Sofia Vergara and Joe Manganiello Share a Romantic Moment While Vacationing in Colombia

For years, the Colombian actress has paved her way in the entertainment industry, first beginning her career co-hosting two shows for Spanish-language television network Univision in the late '90s.

When asked how she's gotten to where she's at, she says "it’s important to show that you’re confident—even when you don’t know what you’re doing.

Joe Manganiello On How Easy It Is to Work With Wife Sofia Vergara (Exclusive)

"The way you carry yourself is very important. There’s nothing worse than somebody who feels insecure, who talks like she’s not supposed to be there," she explains.

"And in a business like mine, it’s very easy to do it, because we’re not [performing] brain surgery. I can’t walk into a doctor’s operating room just with confidence! [Laughs] But in the entertainment business, you can. So you just take a deep breath and do your best."

Sofia Vergara Talks Two-Year Wedding Anniversary With Joe Manganiello

One thing she doesn't do is dwell on missed opportunities. “I don’t sit crying about something -- a job I don’t get or a deal that doesn’t go through," she stresses. “Like, that’s it, move on, try to find something else... because if you don’t, you lose time crying about it. So let’s not lose time!”

Vergara, however, is now at a place in her career where she can make better decisions about the jobs she takes and put herself in healthier environments.

"After working so many years, I think the most helpful thing has been realizing that you have to enjoy your work," she expresses.

"It’s not worth it to be around people who are sucking the energy out of you or who are creating problems. At the beginning of your career, you have to do what you have to do -- but now I don’t have to. I don’t need to sacrifice my sanity, or time with my family, if I’m having a horrible time. That’s one of the good things about [reaching a certain level of] achievement -- you can make those decisions."

As for what's next for Vergara, she is working on a denim line for Walmart and getting ready for the end of "Modern Family."

"I don’t understand why it can’t be like 'Law & Order.' That would be a dream for me, to keep doing this forever," she says about doing more seasons of the hit ABC comedy.