coder/examples/templates/gcp-windows
Ben Potter 2e86b76fb8
docs: improve structure for example templates (#9842)
Co-authored-by: Kyle Carberry <kyle@carberry.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Co-authored-by: Muhammad Atif Ali <me@matifali.dev>
2023-12-17 17:05:13 +03:00
..
README.md docs: improve structure for example templates (#9842) 2023-12-17 17:05:13 +03:00
main.tf fix: rm tf provider versions in examples/ (#9586) 2023-09-07 18:53:23 +00:00

README.md

display_name description icon maintainer_github verified tags
Google Compute Engine (Windows) Provision Google Compute Engine instances as Coder workspaces ../../../site/static/icon/gcp.png coder true
vm
windows
gcp

Remote Development on Google Compute Engine (Windows)

Prerequisites

Authentication

This template assumes that coderd is run in an environment that is authenticated with Google Cloud. For example, run gcloud auth application-default login to import credentials on the system and user running coderd. For other ways to authenticate consult the Terraform docs.

Coder requires a Google Cloud Service Account to provision workspaces. To create a service account:

  1. Navigate to the CGP console, and select your Cloud project (if you have more than one project associated with your account)

  2. Provide a service account name (this name is used to generate the service account ID)

  3. Click Create and continue, and choose the following IAM roles to grant to the service account:

    • Compute Admin
    • Service Account User

    Click Continue.

  4. Click on the created key, and navigate to the Keys tab.

  5. Click Add key > Create new key.

  6. Generate a JSON private key, which will be what you provide to Coder during the setup process.

Architecture

This template provisions the following resources:

  • GCP VM (ephemeral)
  • GCP Disk (persistent, mounted to root)

Coder persists the root volume. The full filesystem is preserved when the workspace restarts. See this community example of an ephemeral AWS instance.

Note This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

code-server

code-server is installed via the startup_script argument in the coder_agent resource block. The coder_app resource is defined to access code-server through the dashboard UI over localhost:13337.