Resolution: Suessfully done this via resource "null_resource" "rerun" and use uuid as trigger , find this section at the bottom of the .tf file. Use uuid as trigger so Terraform will run the non-state provisioner (like file, local-exec and remote-exec) in this group for each run.
Resolution: Used my own AMI with the API pre-configured, then user Terraform remote-exec to update the ip address of API3-GCP into the Json config file of API1-AWS.
Resolution: use the combination of (") and (') with escape like command="echo ' "IP_add=":' >IP.txt". Can also pupolate the content by Terraform local_file with EOF sign.
Can't associate one IGW to multiple subnets, Terraform seems only associate it to the last one in resource IGW_asso
Resolution: use count to associate every subnet to IGW.
Resolution: the 10G space is running out. It works after deleting some folder and files with below steps:
sudo du -a |sort -n -r |head -n -10
sudo find . -type f -size +500M
sudo rm -rf folder_name
sudo rm -rf file_name