New comer question about foreman, ansible and terraform

Sorry in advance for all the noob questions. I’m new to all this.

Is foreman like ansible and terraform? As i understand it, terraform is to create/deploy new VM from terraform-compatible cloud provider like google/aws so all your instance is managed from interface. Where you can tag instance. Kill them in 1 button and so on.

And ansible is for installing all the dependancy, project and basically setting your VM to a certain state. Is that right?

What i don’t understand is where foreman fit into this. Is it a competitor which also do what terraform and ansible do?

I have few vps across multiple lesser known vps provider. I’m currently manually installing and configuring everything each time. I’d love to use some kind of automation tool where i click a button and it does everything automatically. This is why i start looking into tool like foreman and co.

Some VPS provider i’m using have API to deploy. Does it mean i can configure Terraform or foreman to deploy new instance with this API? I guess more cloud provider have similar API to deploy instance like S3-compatible api or something? Is it complicated?

So excited to learn all those new tools