coder/examples/templates/gcp-linux
Geoffrey Huntley 26b54cd144
chore(autofix): upgrade-examples-terraform-provider-coder (#5498)
Automatically generated via https://github.com/coder/autofix
2022-12-23 12:25:56 +10:30
..
README.md chore: Add icons to templates (#5368) 2022-12-09 18:47:09 +00:00
main.tf chore(autofix): upgrade-examples-terraform-provider-coder (#5498) 2022-12-23 12:25:56 +10:30

README.md

name description tags icon
Develop in Linux on Google Cloud Get started with Linux development on Google Cloud.
cloud
google
/icon/gcp.png

gcp-linux

To get started, run coder templates init. When prompted, select this template, and follow the on-screen instructions to proceed.

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.

Service account

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.

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.