I found out that I always feel stress on bring up a cloud instance and setup development environment on the cloud. the first issue is about the processing on go to console cloud website then click and click to configure params for a cloud instance quite anoying me. and how about that I have many cloud instance which each instance for one project.
Another thing is setup the development environment. Each project there has a different configuration. They may have the same base configuration but different in details. if I implicity on using the same base configuration, then the development look not perfect to me. The consequence is that I have to make some work around inside each instance. I do not love that way.
Third is the issue about how to work in remote like local.
That why I came to develop a utility tool called: workspace-rsync
.
The tools will help on sync up workspace in local and remote and run command remotely in cloud instance.
In the section, I will describe about how to use terraform
to create a simple instance in GCP. Why GCP and not AWS ?
Because GCP offers us (developer) a free tier with 300$.
It’s quite a lot of money.
With good strategy, we can live with the free tier in the whole year.
Another question that I will answer is why I choose Terraform for this work.
sudo ./tf_builder.sh --config <profile_name> \
--cmd apply \
-var="machine-type=n1-highcpu-8"