Following components are used
- Document AI
- Pub/Sub
- Cloud Function
- Cloud Firestore
- Cloud Storage
- Cloud Run
- Create Service Account
- Assign the Editor Role.
- Download the key and renamed it as terraform-key.json
- Go to Firestore
- Select Native Mode
- Select a Location (e.g. United States)
- Click on "Create Database"
- Create Project
- Create SA, Assign the roles: Editor and download key as terraform.json
- export GOOGLE_CLOUD_KEYFILE_JSON=terraform-key.json
- copy the terrform.tfvars.example file to terraform.tfvars and replace the variables.
- terraform init
- terraform plan
- terraform apply
The complete detail about this repo is available in the please refer the blog