{"id":13582597,"url":"https://github.com/terraform-google-modules/terraform-google-gsuite-export","last_synced_at":"2025-11-09T08:30:32.124Z","repository":{"id":33393299,"uuid":"150479048","full_name":"terraform-google-modules/terraform-google-gsuite-export","owner":"terraform-google-modules","description":"Creates a Compute Engine VM instance and sets up a cronjob to export GSuite Admin SDK data to Cloud Logging on a schedule","archived":false,"fork":false,"pushed_at":"2024-12-20T20:02:28.000Z","size":227,"stargazers_count":18,"open_issues_count":2,"forks_count":24,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-12-28T07:18:05.271Z","etag":null,"topics":["cft-terraform","operations","workspace"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/terraform-google-modules/gsuite-export/google","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terraform-google-modules.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-26T19:24:13.000Z","updated_at":"2024-12-20T19:33:28.000Z","dependencies_parsed_at":"2023-10-05T04:15:26.488Z","dependency_job_id":"17827cc6-fa44-433d-b4b8-70e274c5c2f8","html_url":"https://github.com/terraform-google-modules/terraform-google-gsuite-export","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-gsuite-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-gsuite-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-gsuite-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-gsuite-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terraform-google-modules","download_url":"https://codeload.github.com/terraform-google-modules/terraform-google-gsuite-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239571542,"owners_count":19661164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cft-terraform","operations","workspace"],"created_at":"2024-08-01T15:02:52.184Z","updated_at":"2025-11-09T08:30:32.061Z","avatar_url":"https://github.com/terraform-google-modules.png","language":"HCL","funding_links":[],"categories":["HCL"],"sub_categories":[],"readme":"# Terraform GSuite Export Module\r\n\r\nThe module will create a compute engine VM instance and set up a cronjob to export\r\nGSuite Admin SDK data to **Stackdriver Logging** on a schedule.\r\n\r\nAdditional information on which APIs are supported is documented in the\r\n[gsuite-exporter repository][gsuite-exporter-site].\r\n\r\n## Compatibility\r\nThis module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+. If you find incompatibilities using Terraform \u003e=0.13, please open an issue.\n If you haven't\n[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform\n0.12.x-compatible version of this module, the last released version\nintended for Terraform 0.12.x is [v1.0.0](https://registry.terraform.io/modules/terraform-google-modules/-gsuite-export/google/v1.0.0).\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| filter | Log export filter for logs exported by GSuite-exporter |\n| instance\\_name | GSuite Exporter instance name |\n| instance\\_project | GSuite Exporter instance project |\n| instance\\_zone | GSuite Exporter instance zone |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\r\n\r\n## Requirements\r\n### Terraform plugins\r\n- [Terraform](https://www.terraform.io/downloads.html) \u003e= 0.13.0\n- [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin v1.8.0\r\n\r\n### APIs\r\nFor the GSuite Exporter to work, the following APIs must be enabled in the project:\r\n- Identity and Access Management API: `iam.googleapis.com`\r\n- Admin SDK API: `admin.googleapis.com`\r\n\r\n### Service account\r\nWe need two Terraform service accounts for this module:\r\n* **Terraform service account** (that will create the GSuite Export VM)\r\n* **VM service account** (that will be used on the VM to pull logs from GSuite and write them to Stackdriver Logging)\r\n\r\nThe **Terraform service account** used to run this module must have the following IAM Roles:\r\n- `Compute Instance Admin` on the project (to create the VM)\r\n- `Service Account User` on the project (to associate the VM service account with the VM)\r\n- `Project IAM Admin` on the project (to grant permissions to the VM service account)\r\n\r\nThe **VM service account** passed to the module must have:\r\n- GSuite domain-wide delegation enabled\r\n- The following scopes in the [API client access page](https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients)\r\n  - https://www.googleapis.com/auth/admin.reports.audit.readonly (to read from the Reports API)\r\n  - https://www.googleapis.com/auth/iam (to generate a super-admin token)\r\n\r\n\r\n## Install\r\n\r\n### Terraform\r\nBe sure you have the correct Terraform version (0.12.x), you can choose the binary here:\r\n- https://releases.hashicorp.com/terraform/\r\n\r\nThen perform the following commands:\r\n\r\n- `terraform init` to get the plugins\r\n- `terraform plan` to see the infrastructure plan\r\n- `terraform apply` to apply the infrastructure build\r\n- `terraform destroy` to destroy the built infrastructure\r\n\r\n#### Variables\r\nPlease refer the `variables.tf` file for the required and optional variables.\r\n\r\n#### Outputs\r\nPlease refer the `outputs.tf` file for the outputs that you can get with the `terraform output` command\r\n\r\n## File structure\r\nThe project has the following folders and files:\r\n\r\n- /: root folder\r\n- /examples: examples for using this module\r\n- /scripts: Shell scripts for specific tasks on module\r\n- /test: Folders with files for testing the module (see Testing section on this file)\r\n- /main.tf: main file for this module, contains all the resources to create\r\n- /variables.tf: all the variables for the module\r\n- /output.tf: the outputs of the module\r\n- /readme.MD: this file\r\n\r\n[gsuite-exporter-site]: https://github.com/GoogleCloudPlatform/professional-services/tree/master/tools/gsuite-exporter\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterraform-google-modules%2Fterraform-google-gsuite-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterraform-google-modules%2Fterraform-google-gsuite-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterraform-google-modules%2Fterraform-google-gsuite-export/lists"}