{"id":19726964,"url":"https://github.com/timtech4u/terraform-jenkins-gcp","last_synced_at":"2026-03-19T11:19:03.206Z","repository":{"id":91626014,"uuid":"512558346","full_name":"Timtech4u/terraform-jenkins-gcp","owner":"Timtech4u","description":"Sets up Jenkins on GCP VM using Terraform","archived":false,"fork":false,"pushed_at":"2022-07-11T07:20:35.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T02:03:21.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Timtech4u.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-10T23:05:53.000Z","updated_at":"2022-07-10T23:06:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a3362dd-5853-4e74-b626-f0ed2e31ef46","html_url":"https://github.com/Timtech4u/terraform-jenkins-gcp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Timtech4u/terraform-jenkins-gcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timtech4u%2Fterraform-jenkins-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timtech4u%2Fterraform-jenkins-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timtech4u%2Fterraform-jenkins-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timtech4u%2Fterraform-jenkins-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timtech4u","download_url":"https://codeload.github.com/Timtech4u/terraform-jenkins-gcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timtech4u%2Fterraform-jenkins-gcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30051112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T23:37:14.004Z","updated_at":"2026-03-03T16:03:52.611Z","avatar_url":"https://github.com/Timtech4u.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Jenkins GCE Module\n\nThis module handles the creation of a GCE instance running [Jenkins](https://jenkins.io/), configured to [run builds on Google Cloud](https://cloud.google.com/solutions/using-jenkins-for-distributed-builds-on-compute-engine). Creates an instance that can be logged into with the username `user` and the password `bitnami`.\n\n## Compatibility\n\n This module is meant for use with Terraform 0.12. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-12.html)\n  and need a Terraform 0.11.x-compatible version of this module, the last released version intended for\n  Terraform 0.11.x is [v0.1.0](https://registry.terraform.io/modules/terraform-google-modules/jenkins/google/0.1.0).\n\n## Usage\n\nPlease see the [sample usage](./sample_usage/) folder.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|:----:|:-----:|:-----:|\n| create\\_firewall\\_rules | If worker firewall rules should be created | bool | `\"false\"` | no |\n| gcs\\_bucket | The name of an existing GCS bucket to associate with the created service account, allowing build artifacts to be uploaded. Leave blank to skip | string | `\"\"` | no |\n| jenkins\\_boot\\_disk\\_source\\_image | The name of the disk image to use as the boot disk for the Jenkins master | string | `\"bitnami-jenkins-2-176-2-0-linux-debian-9-x86-64\"` | no |\n| jenkins\\_boot\\_disk\\_source\\_image\\_project | The project within which the disk image to use as the Jenkins master boot disk exists | string | `\"bitnami-launchpad\"` | no |\n| jenkins\\_initial\\_password | The initial password to protect Jenkins logins with. Defaults to a random 8-character alphanumeric string. This may not contain special characters. | string | `\"\"` | no |\n| jenkins\\_instance\\_access\\_cidrs | CIDRs to allow to access Jenkins over HTTP(s) | list(string) | `\u003clist\u003e` | no |\n| jenkins\\_instance\\_additional\\_metadata | Additional instance metadata to assign to the Jenkins VM | map(string) | `\u003cmap\u003e` | no |\n| jenkins\\_instance\\_machine\\_type | The machine type to provision for Jenkins | string | `\"n1-standard-4\"` | no |\n| jenkins\\_instance\\_name | The name to assign to the Jenkins VM | string | `\"jenkins\"` | no |\n| jenkins\\_instance\\_network | The GCP network to deploy the Jenkins VM in. The firewall rules will be created in the project which hosts this network. | string | n/a | yes |\n| jenkins\\_instance\\_subnetwork | The GCP subnetwork to deploy the Jenkins VM in | string | n/a | yes |\n| jenkins\\_instance\\_tags | Tags to assign to the Jenkins VM | list(string) | `\u003clist\u003e` | no |\n| jenkins\\_instance\\_zone | The zone to deploy the Jenkins VM in | string | n/a | yes |\n| jenkins\\_jobs | A list of Jenkins jobs to configure on the instance | list | `\u003clist\u003e` | no |\n| jenkins\\_network\\_project\\_id | The project ID of the Jenkins network | string | `\"\"` | no |\n| jenkins\\_service\\_account\\_display\\_name | The display name of the service account to create for Jenkins VM provisioning | string | `\"Jenkins\"` | no |\n| jenkins\\_service\\_account\\_name | The name of the service account to create for Jenkins VM provisioning | string | `\"jenkins\"` | no |\n| jenkins\\_workers\\_boot\\_disk\\_size\\_gb | The size of Jenkins worker boot disks, in gigabytes | string | `\"10\"` | no |\n| jenkins\\_workers\\_boot\\_disk\\_source\\_image | The fully qualified URL to the disk image to use as the boot disk for Jenkins workers | string | `\"ubuntu-1604-xenial-v20181023\"` | no |\n| jenkins\\_workers\\_boot\\_disk\\_source\\_image\\_project | The project within which the disk image to use as the Jenkins worker boot disk exists | string | `\"ubuntu-os-cloud\"` | no |\n| jenkins\\_workers\\_boot\\_disk\\_type | The boot disk type to associate with Jenkins workers. Valid options are 'local-ssd', 'pd-ssd', and 'pd-standard' | string | `\"pd-ssd\"` | no |\n| jenkins\\_workers\\_description | A description of the Jenkins worker cloud to show in Jenkins | string | `\"Jenkins worker\"` | no |\n| jenkins\\_workers\\_instance\\_cap | The maximum number of GCE instances to create as Jenkins workers | string | `\"1\"` | no |\n| jenkins\\_workers\\_labels | GCP labels to apply to Jankins workers | list(string) | `\u003clist\u003e` | no |\n| jenkins\\_workers\\_launch\\_timeout\\_seconds | The number of seconds to wait for a Jenkins worker to come online before timing out | string | `\"300\"` | no |\n| jenkins\\_workers\\_machine\\_type | The machine type to deploy Jenkins workers onto | string | `\"n1-standard-1\"` | no |\n| jenkins\\_workers\\_min\\_cpu\\_platform | The [minimum CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) to deploy Jenkins workers onto. Leave blank for no restriction. | string | `\"\"` | no |\n| jenkins\\_workers\\_name\\_prefix | A prefix for the Jenkins workers instance names | string | `\"jenkins\"` | no |\n| jenkins\\_workers\\_network | The URL of the network to deploy Jenkins workers into | string | n/a | yes |\n| jenkins\\_workers\\_network\\_tags | A list of network tags to apply to Jenkins workers | list(string) | `\u003clist\u003e` | no |\n| jenkins\\_workers\\_num\\_executors | The number of concurrent jobs that can run on each Jenkins worker | string | `\"1\"` | no |\n| jenkins\\_workers\\_preemptible | Whether to launch Jenkins workers as preemptible instances | string | `\"false\"` | no |\n| jenkins\\_workers\\_project\\_id | The GCP project to deploy Jenkins workers within | string | n/a | yes |\n| jenkins\\_workers\\_region | The name of the region into which to deploy Jenkins workers | string | n/a | yes |\n| jenkins\\_workers\\_retention\\_time\\_minutes | The number of minutes for Jenkins workers to remain online after completing their last job | string | `\"6\"` | no |\n| jenkins\\_workers\\_run\\_as\\_user | The user to run Jenkins jobs as on workers | string | `\"ubuntu\"` | no |\n| jenkins\\_workers\\_service\\_account\\_email | The service account email to assign to Jenkins workers. Leave blank for the default compute service account | string | `\"\"` | no |\n| jenkins\\_workers\\_startup\\_script | Any additional configuration to run on boot of Jenkins workers | string | `\"\"` | no |\n| jenkins\\_workers\\_subnetwork | The name of the subnetwork to deploy Jenkins workers into | string | `\"default\"` | no |\n| jenkins\\_workers\\_zone | The name of the zone into which to deploy Jenkins workers | string | `\"us-east4-b\"` | no |\n| project\\_id | The project ID to deploy to | string | n/a | yes |\n| region | The region to deploy to | string | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| jenkins\\_instance\\_initial\\_password | The initial password assigned to the Jenkins instance's `user` username |\n| jenkins\\_instance\\_name | The name of the running Jenkins instance |\n| jenkins\\_instance\\_public\\_ip | The public IP of the Jenkins instance |\n| jenkins\\_instance\\_service\\_account\\_email | The email address of the created service account |\n| jenkins\\_instance\\_zone | The zone in which Jenkins is running |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Requirements\n### Terraform plugins\n- [Terraform](https://www.terraform.io/downloads.html) 0.10.x\n- [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin v1.8.0\n\n### Configure a Service Account\nIn order to execute this module you must have a Service Account with the following project roles:\n\n- roles/compute.admin\n- roles/iam.serviceAccountUser\n- roles/compute.networkAdmin\n\n`roles/compute.networkAdmin` is required on the host project if a shared VPC is used.\n\n### Enable API's\nIn order to operate with the Service Account you must activate the following APIs on the project where the Service Account was created:\n\n- Compute Engine API - compute.googleapis.com\n\n## Install\n\n### Terraform\nBe sure you have the correct Terraform version (0.10.x), you can choose the binary here:\n- https://releases.hashicorp.com/terraform/\n\n## File structure\nThe project has the following folders and files:\n\n- `/`: root folder\n- `/sample_usage`: examples for using this module\n- `/helpers`: scripts used in the build process\n- `/templates`: templates used in the provisioning process\n- `/test`: folders with files for testing the module (see Testing section on this file)\n- `/main.tf`: contains the resources to create\n- `/variables.tf`: all the variables for the module\n- `/output.tf`: the outputs of the module\n- `/README.md`: this file\n\n## Additional Information\n\nGitHub Repo - https://github.com/Timtech4u/terraform-jenkins-gcp\nSlide - https://docs.google.com/presentation/d/1iIQ2B_Am9rdQSjDSUmN3VVGKGrLuHN1iM7hyAA3f53Q/edit?usp=sharing\n\nThe repository contains the Terraform modules for setting up Jenkins \u0026 Nginx Web Server, Jenkinsfile for automatically deploying the Web App changes to the server. \n\nI also made a short video that shows how all of these works and demos setting up Jenkins pipeline to deploy the Web App. \nVideo link - https://www.loom.com/share/63bd5d54564e40608769e2298b36baff\n\nYou can access Jenkins using the following:\nURL: http://34.92.3.123/\nusername: user\npassword: H7LgycpFsvz7\n\nYou can access the Web App here - http://34.92.3.123:88\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimtech4u%2Fterraform-jenkins-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimtech4u%2Fterraform-jenkins-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimtech4u%2Fterraform-jenkins-gcp/lists"}