Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make Cloud Source Repos optional #68

Merged
merged 1 commit into from
Oct 26, 2020
Merged

feat: Make Cloud Source Repos optional #68

merged 1 commit into from
Oct 26, 2020

Conversation

realtimetodie
Copy link
Contributor

Adds a new input variable create_cloud_source_repos (bool), whether CSR repos should be created. The default value is true.

This feature is useful for users that want to trigger Cloud Build outside of CSR (eg. google_cloudbuild_trigger github).

@rjerrems
Copy link
Contributor

Thanks for the contribution @aheadmode - it looks like there are a few failures including some linting failures. You can run:

make docker_test_lint in order to run those linting tests locally. The integration tests are failing with this error:

Error: Reference to undeclared local value
       
         on ../../../modules/cloudbuild/main.tf line 160, in resource "google_project_iam_member" "org_admins_source_repo_admin":
        160:   count   = local.create_cloud_source_repos ? 1 : 0
       
       A local value with the name "create_cloud_source_repos" has not been declared.

You can also run integration tests locally if you wish, instructions are here:

https://github.com/terraform-google-modules/terraform-google-bootstrap/blob/master/CONTRIBUTING.md

@realtimetodie
Copy link
Contributor Author

The testing suite does not work. Some tests fail always

Error: Unsupported Terraform Core version

  on .terraform/modules/seed_project/versions.tf line 18, in terraform:
  18:   required_version = "~> 0.12.6"

Entering the container locally (gcr.io/cloud-foundation-cicd/cft/developer-tools:0)

$ terraform -v
Terraform v0.13.4

@rjerrems
Copy link
Contributor

Thanks for reporting that issue @aheadmode - can you try merging changes from master? You should now be able to use the module with terraform 0.13

Adds a new input variable `create_cloud_source_repos` (bool), whether CSR repos should be created. The default value is `true`.
@rjerrems rjerrems self-requested a review October 26, 2020 06:18
Copy link
Contributor

@rjerrems rjerrems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjerrems rjerrems merged commit 6df33bc into terraform-google-modules:master Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants