Terraform Module to deploy the CRMint application.
This module configures your GCP project to host a CRMint application.
The resources/services/activations/deletions that this module will create/trigger are:
- Cloud Run Services (3)
- Cloud Scheduler Job (1)
- CloudBuild Worker Pool (1)
- Cloud HTTPS Load Balancer (1)
- Compute Global IP Address (1)
- Compute Managed SSL Certificate (1)
- IAP Authentication (1)
- Logging Metric (1)
- Monitoring Alert Policy (1)
- Monitoring Notification Channel (1)
- Pub/Sub Subscription (1)
- Pub/Sub Topics (2)
- Secret Manager Secret (1)
- Service Accounts (4)
- SQL Database Instance (1)
- VPC Access Connector (1)
To deploy this blueprint you must have an active billing account and billing permissions.
- CRMint application built by gTech Professional Services from Google Ads (not an official product).
Basic usage of this module is as follows:
module "crmint" {
source = "terraform-google-modules/crmint/google"
version = "~> 0.1"
app_title = "My Local Custom App"
notification_sender_email = "[email protected]"
# Google Cloud Platform.
project_id = "YOUR_PROJECT_ID"
region = "GCP_REGION" # e.g. us-east1
zone = "GCP_ZONE" # e.g. us-east1-c
database_instance_name = "crmint-3-db"
use_vpc = true
# Docker service images (in case you want to pin to a specific version).
frontend_image = "europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/frontend:master"
controller_image = "europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/controller:master"
jobs_image = "europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/jobs:master"
# User access management.
iap_support_email = "[email protected]"
iap_allowed_users = [
"user:[email protected]",
"user:[email protected]",
"user:[email protected]",
]
}
Functional examples are included in the examples directory.
Name | Description | Type | Default | Required |
---|---|---|---|---|
app_title | Project name to display in the UI. | string |
"CRMint App" |
no |
controller_image | Docker image uri (with tag) for the controller service | string |
"europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/controller:master" |
no |
database_availability_type | Database availability type. Defaults to one zone. | string |
"ZONAL" |
no |
database_instance_name | Name for the Cloud SQL instance. | string |
"crmint-3-db" |
no |
database_name | Name of the database in your Cloud SQL instance. | string |
"crmintapp-db" |
no |
database_project_id | Database GCP project to use. Defaults to var.project_id . |
string |
null |
no |
database_region | Database region to setup a Cloud SQL instance. Defaults to var.region |
string |
null |
no |
database_tier | Database instance machine tier. Defaults to a small instance. | string |
"db-g1-small" |
no |
database_user | Database user name. | string |
"crmintapp" |
no |
frontend_image | Docker image uri (with tag) for the frontend service | string |
"europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/frontend:master" |
no |
goog_bc_deployment_name | This is only set if run via BC/CM | string |
"" |
no |
iap_allowed_users | Lost of IAP allowed users. | list(any) |
n/a | yes |
iap_brand_id | Existing IAP Brand ID - only INTERNAL TYPE (you can obtain it using this command: `$ gcloud iap oauth-brands list --format='value(name)' | sed 's:.*/::'`). | string |
null |
iap_support_email | Support email used for configuring IAP | string |
n/a | yes |
jobs_image | Docker image uri (with tag) for the jobs service | string |
"europe-docker.pkg.dev/instant-bqml-demo-environment/crmint/jobs:master" |
no |
labels | A set of key/value label pairs to assign to the resources deployed by this blueprint. | map(string) |
{} |
no |
network_project_id | Network GCP project to use. Defaults to var.project_id . |
string |
null |
no |
network_region | Network region. Defaults to var.region . |
string |
null |
no |
notification_sender_email | Email address to send notifications to. | string |
n/a | yes |
project_id | GCP Project ID | string |
n/a | yes |
random_suffix | Add random suffix to deployed resources (to allow multiple deployments per project) | string |
true |
no |
region | GCP Region | string |
"us-east1" |
no |
report_usage | Report anonymous usage to our analytics to improve the tool. | bool |
false |
no |
use_vpc | Configures the database with a private IP. Default to true. | bool |
true |
no |
Name | Description |
---|---|
cloud_build_worker_pool | Cloud Build worker pool. |
cloud_db_uri | Database connection URI. |
migrate_image | Docker image (with tag) for the controller service. |
migrate_sql_conn_name | Database instance connection name. |
project_id | GCP Project ID |
region | Region used to deploy CRMint. |
report_usage_id | Report Usage ID (empty if opt-out) |
secured_url | The url to access CRMint UI (with Google Managed certificate). |
These sections describe requirements for using this module.
The following dependencies must be available:
- Terraform v0.13
- Terraform Provider for GCP plugin v3.0
A service account with the following roles must be used to provision the resources of this module:
- Storage Admin:
roles/storage.admin
The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.
A project with the following APIs enabled must be used to host the resources of this module:
- Google Cloud Storage JSON API:
storage-api.googleapis.com
The Project Factory module can be used to provision a project with the necessary APIs enabled.
Refer to the contribution guidelines for information on contributing to this module.
Please see our security disclosure process.