{"id":26575903,"url":"https://github.com/tomarv2/terraform-google-vm","last_synced_at":"2025-03-23T02:35:42.648Z","repository":{"id":43682023,"uuid":"340745869","full_name":"tomarv2/terraform-google-vm","owner":"tomarv2","description":"Terraform module for GCP Virtual Machine","archived":false,"fork":false,"pushed_at":"2022-03-01T04:20:30.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T15:49:52.925Z","etag":null,"topics":["google-cloud-platform","google-vm","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","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/tomarv2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T20:22:19.000Z","updated_at":"2022-02-23T20:02:34.000Z","dependencies_parsed_at":"2022-08-22T11:31:23.033Z","dependency_job_id":null,"html_url":"https://github.com/tomarv2/terraform-google-vm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomarv2%2Fterraform-google-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomarv2%2Fterraform-google-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomarv2%2Fterraform-google-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomarv2%2Fterraform-google-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomarv2","download_url":"https://codeload.github.com/tomarv2/terraform-google-vm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245047996,"owners_count":20552431,"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":["google-cloud-platform","google-vm","terraform","terraform-module"],"created_at":"2025-03-23T02:35:41.971Z","updated_at":"2025-03-23T02:35:42.583Z","avatar_url":"https://github.com/tomarv2.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/tomarv2/terraform-google-vm/actions/workflows/pre-commit.yml\" alt=\"Pre Commit\"\u003e\n        \u003cimg src=\"https://github.com/tomarv2/terraform-google-vm/actions/workflows/pre-commit.yml/badge.svg?branch=main\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.apache.org/licenses/LICENSE-2.0\" alt=\"license\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/tomarv2/terraform-google-vm\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tomarv2/terraform-google-vm/tags\" alt=\"GitHub tag\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/tag/tomarv2/terraform-google-vm\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tomarv2/terraform-google-vm/pulse\" alt=\"Activity\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/commit-activity/m/tomarv2/terraform-google-vm\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://stackoverflow.com/users/6679867/tomarv2\" alt=\"Stack Exchange reputation\"\u003e\n        \u003cimg src=\"https://img.shields.io/stackexchange/stackoverflow/r/6679867\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=varuntomar2019\" alt=\"follow on Twitter\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/follow/varuntomar2019?style=social\u0026logo=twitter\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Terraform module to create Google Virtual Machine\n\n## Versions\n\n- Module tested for Terraform 1.0.1.\n- GCP provider version [4.11.0](https://registry.terraform.io/providers/hashicorp/google/latest).\n- `main` branch: Provider versions not pinned to keep up with Terraform releases.\n- `tags` releases: Tags are pinned with versions (use \u003ca href=\"https://github.com/tomarv2/terraform-google-vm/tags\" alt=\"GitHub tag\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/tag/tomarv2/terraform-google-vm\" /\u003e\u003c/a\u003e).\n\n\n## Usage\n\n### Option 1:\n\n```\nterrafrom init\nterraform plan -var='teamid=tryme' -var='prjid=project1'\nterraform apply -var='teamid=tryme' -var='prjid=project1'\nterraform destroy -var='teamid=tryme' -var='prjid=project1'\n```\n**Note:** With this option please take care of remote state storage\n\n### Option 2:\n\n#### Recommended method (stores remote state in S3 using `prjid` and `teamid` to create directory structure):\n\n- Create python 3.8+ virtual environment\n```\npython3 -m venv \u003cvenv name\u003e\n```\n\n- Install package:\n```\npip install tfremote --upgrade\n```\n\n- Set below environment variables:\n```\nexport TF_GCLOUD_BUCKET=\u003cremote state bucket name\u003e\nexport TF_GCLOUD_PREFIX=\u003cremote state bucket prefix\u003e\nexport TF_GCLOUD_CREDENTIALS=\u003cgcp credentials.json\u003e\n```\n\n- Updated `examples` directory with required values.\n\n- Run and verify the output before deploying:\n```\ntf -c=gcloud plan -var='teamid=foo' -var='prjid=bar'\n```\n\n- Run below to deploy:\n```\ntf -c=gcloud apply -var='teamid=foo' -var='prjid=bar'\n```\n\n- Run below to destroy:\n```\ntf -c=gcloud destroy -var='teamid=foo' -var='prjid=bar'\n```\n\n**NOTE:**\n\n- Read more on [tfremote](https://github.com/tomarv2/tfremote)\n---\n\n### Virtual Machine\n```\nmodule \"vm\" {\n  source = \"git::git@github.com:tomarv2/terraform-google-vm.git\"\n\n  user_data_file_path = \"user_data.sh\"\n  # --------------------------------------------------\n  # Do not change the teamid, prjid once set.\n  teamid = var.teamid\n  prjid  = var.prjid\n}\n```\n\nPlease refer to examples directory [link](examples) for references.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomarv2%2Fterraform-google-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomarv2%2Fterraform-google-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomarv2%2Fterraform-google-vm/lists"}