Is there a standard way to update instance template in instance group?

AWS has service named CodeDeploy which can deploy code to Auto Scaling (AS) group. For e.g. if your AS policy got triggered and it spun a new instance (which will use predefined instance image called AMI in AWS) CodeDeploy will push the code to the new instance from its recent revision from S3 or GitHub.

Is there any way we can do this in GCP so that you don't have to update instance template every time there is a code change or deployment?


You can create custom image and use that custom image when creating instance group. Another option is to use Deterministic Instance template when creating instance group. In brief, you can define the startup-scripts as metadata when creating instance template.

Hope it helps!