Terraform templates for various resources.

@Curtis Lewis Curtis Lewis authored on 23 Jun
bucket_for_static_objs common section for all scripts. script to create bucket for static objects 11 months ago
common_template common section for all scripts. script to create bucket for static objects 11 months ago
vpc_with_subnetworks initial commit vpc_with_subnets 11 months ago
.gitignore common section for all scripts. script to create bucket for static objects 11 months ago
README.md common section for all scripts. script to create bucket for static objects 11 months ago
README.md

terraform_templates

Terraform templates for various resources.

Set up and running

Place main.tf and variables.tf in a directory named terraform within the project directory on the local system.

Update variable names in variables.tf

gcloud auth application-default login

terraform init
terraform apply

To destroy resources:
terraform destroy

Common to all

(I think ...)

provider "google" {
    project = var.project_id
    region = var.region
}

data "google_compute_zones" "this" {
    region = var.region
    project = var.project_id
}

locals {
    type = ["public"]
    zones = data.google_compute_zones.this.names
}

vpc_with_subnets

Creates a VPC named with one or more subnets (set count) in for .

Bucket for static files

Ref: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket