Can an Eldritch Knight Attack Twice With Green Flame Blade and War Magic? [duplicate]

An 8th-level Eldritch Knight has a sword.

The War Magic class ability says:

When you use your action to cast a cantrip, you can make one weapon attack as a bonus action

And the cantrip Green Flame Blade says:

You brandish the weapon used in the spell’s casting and make a melee attack with it against one creature within 5 feet of you

So I think that means there are 2 sword attacks in total for that turn.

One attack is a bonus action, and one is a side effect of the cantrip. In addition to that are the flame effects of the cantrip as well.

(The 2 attacks are not related to the Extra Attack Fighter class ability, which requires taking the Attack action, which is not being done here.)

Is the above information correct?