FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Article Id 198684
This article describes how to configure VDOM link to provide internet to the other VDOM which does not have a direct WAN link connected.

In the below example, root VDOM has internet access on port1 and test VDOM is secondary VDOM where the test machine is connected.

From GUI.

1) Configure inter-VDOM Link (Global).

Go to Network -> Interfaces -> Edit VDOM Link.

Assign the IP address for both inter-VDOM interfaces in the same subnet.

2) Configure the static route in the secondary VDOM to route traffic via link(Test VDOM)

Go to Network -> Static Route -> Edit Static Routes.

Select the VDOM link interface and the gateway IP.

3) Create an IPv4 policy for permitting the traffic from secondary VDOM to Primary: (Test VDOM).

Go to Policy and Object -> IPv4 Policy -> Edit Policy.

By all above configuration traffic will reach to the root VDOM and from there to reach internet, create IPv4 policy is necessary.

Above policy is for permiting traffic reaching on VDOM link interface Test0 to WAN link (Port1).