find . -type f -name ".terraform*" -exec rm -f {} ; find . -type f -name "terraform*" -prune -exec rm -rf {} ; find . -type d -name ".terraform*" -prune -exec rm -rf {} ;
gcloud services enable compute.googleapis.com
gcloud auth application-default login terraform init
https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started
Types and Values: https://developer.hashicorp.com/terraform/language/expressions/types
References to Values: https://developer.hashicorp.com/terraform/language/expressions/references
- Added external IP address as output based on the doc https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance
[X]- Hardcode provider version [X]- Create subnet for VM instance [X]- Add label [ ]- Add firewall to allow 443 and 80 from 0.0.0.0 [ ]- Allow 22 to SSH from 0.0.0.0 [ ]- Install apache2 to serve a basic HTML with metadata_startup_script
[ ]- Seperate configs into new files [ ]- Create bucket with terraform
[ ]- Depends on attribute [ ]- Store state in the bucket
[ ]- Use modules https://github.com/orgs/terraform-google-modules/repositories
terraform destroy