/terraform-google-bootstrap-project

Used for spinning up a new Google project. Produces a project, admin users, and a bucket for Terraform remote state.

Primary LanguageHCLMIT LicenseMIT

Google Bootstrap Project Module

Used for spinning up a new Google project. Produces a project, admin users, and a bucket for Terraform remote state.

Compatibility

This module is compatible with Terraform <= 0.12.0 And the Google Cloud Provider <= 1.19.0

Usage

locals {
  labels {
    contact     = "author@email.co"
    environment = "fancy-dev"
    vertical    = "fancy"
  }
}

module "fancy_google_project" {
  source                = "git@github.com:thesis/terraform-google-bootstrap-project.git"
  project_name          = "fancy-dev"
  org_id                = "xxxyyyzzz"
  billing_account       = "111222333"
  project_owner_members = ["john@email.co", "lilly@email.co",]
  location              = "us-central1"
  labels                = ${local.labels}
  project_service_list  = "["api-you-want-enabled-at-project-creation.googleapis.com"]"

}

Inputs

Name Description Type Default Required
billing_account The billing account to associate with your project. Must be associated with org already. Local ENV VAR string "" no
disable_on_destroy Determines whether to disable the service when the terraform resource is destroyed (true/ false) string "true" no
labels A list of key/value pairs to describe your resource. Labels are akin to tags. map <map> no
location The region to deploy the backend bucket in. string "us-east4" no
org_id The ID for the organization the project will be created under. Local ENV VAR string "" no
project_name The name to give your project. string "" no
project_owner_members A list of gcp users / service accounts to designate as owners of the project being created. list <list> no
project_service_list List of services or APIs that will be enabled on project creation. list <list> no

Outputs

Name Description
project_id
project_name
terraform_backend_bucket_name

Notes

For a Thesis or a Thesis vertical project this should be the first module you run. It does require admin access on the GCP Organization level.

License

See LICENSE for full details.