terraform-google-modules / terraform-google-bootstrap

Bootstraps Terraform usage and related CI/CD in a new Google Cloud organization
https://registry.terraform.io/modules/terraform-google-modules/bootstrap/google
Apache License 2.0
212 stars 145 forks source link

feat: Add GitLab support for IM module #281

Closed josephdt12 closed 6 months ago

josephdt12 commented 6 months ago

Mostly follows the GitLab module and example with the key different that the pull_request block is not used for the triggers, just an inverse regex on the given branch for another push block.

The pull_request block does not work for GitLab as expected, with multiple builds occurring whenever a merge request is created on GitLab. I'm not sure if this issue is sitting at the Terraform module level or the Cloud Build level and may dig further.

Public examples of using GitLab and Terraform together end up just using push blocks as well, so it seems pretty established. Testing wise it works fine, we just end up having previews created on other branches aside from the target one.