Well, I am trying to find a cloudformation template in AWS.
Where would I need to create three VPC's with single subnet and instance in it. Where you have internetgateway in it with 2 one-way from vpc to gateway and one two-way connection like this:

Well, I am trying to find a cloudformation template in AWS.
Where would I need to create three VPC's with single subnet and instance in it. Where you have internetgateway in it with 2 one-way from vpc to gateway and one two-way connection like this:

On
There is an awesome tool called Console Recorder for AWS, it's a browser plugin for Chrome or Firefox. It copies the actions you perform on the AWS console and converts them into CF, Terraform, Js calls ( because everything in aws is an API ). I'd advise building small chunks as it's very beta. It can't do all the heavy lifting, but it can take the pain out of turning a Network diagram into a set of ordered managable IaC scripts. They have a Git page.
You can leverage the AWS Quick Start's Amazon VPC Architecture template to get started quickly with a boilerplate VPC architecture. This AWS-supported template creates a single VPC containing both a public (2-way) and private (1-way, outbound Internet only) subnet within each specified Availability Zone (you provide 2-4 Availability Zones as Parameters). I would recommend starting with the Quick Start, then later customizing to better fit your specific needs if necessary.
For your use case, you could specify 2 Availability Zones, then use the Private Subnets in each AZ for SubnetA and SubnetB, and the Public Subnet in one of the AZs for SubnetC.
(Note: I recommend against creating 3 separate VPCs for a single application. Distinct Subnets provide adequate network isolation, creating 3 separate VPCs duplicates many unnecessary additional resources such as Internet Getways, and there is a limit of 5 VPCs per region per AWS account.)
Here's a full working example that uses the Quick Start template directly as a nested stack: