Skip to content

Latest commit

 

History

History

terraform

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Terraform

Terraform is an API wrapper for different cloud providers. This configuration is only applicable to GCP. You can download terraform from here https://www.terraform.io/downloads.html.

Before running

Make sure you've authenticated the gcloud SDK installed locally with GCP, similar to the way you would authenticate Packer or add your credentials as an environment variable - https://www.terraform.io/docs/providers/google/getting_started.html#adding-credentials.

What's inside

There is a ln-store module that controls the creation of the instance, which is managed by an instance group and is based on an instance template. The instance template uses the latest image that was built by Packer in the ln-store-ubuntu family. Additionally, there's a TCP load balancer setup that forwards traffic to the instance.

There are a few mandatory things that will need to be updated:

Useful Terraform commands

You can use terraform plan to verify changes.

If that looks good, you can apply the configuration with terraform apply.

In order to destroy infrastructure, you can use terraform destroy. If you want to destroy a specific resource, you can see what's already managed by Terraform terraform state list, then terraform destroy -target name_from_list_above (-target can be specified multiple times).