Can I have 2 subnets on the interface of VM in Google Cloud Platform ?
For example:
I have VPC vpc1
and it have 2 subnets: subnet1 - 10.1.1.0/24
and subnet2 - 192.168.1.0/24
Can I assign to interface eth1
of VM bastion
2 IP addresses 10.1.1.10
and 192.168.1.10
?
It is known as IP aliasing and can be done by commands
ip addr add 10.1.1.10/24 dev eth1
ip addr add 192.168.1.10/24 dev eth1
I aim to to have access to both subnets from one interface. If it is possible it will be great to have terraform example.
Thanks
ps: I do not want add several interfaces due to GCP interface-vcpu quota.