mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
expand README files for examples (#1946)
This commit is contained in:
@ -6,19 +6,40 @@ tags: [cloud, google, container]
|
||||
|
||||
# gcp-vm-container
|
||||
|
||||
## Getting started
|
||||
|
||||
Pick this template in `coder templates init` and follow instructions.
|
||||
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](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
|
||||
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](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials).
|
||||
|
||||
## Required permissions / policy
|
||||
## Service account
|
||||
|
||||
The user or service account used by the Terraform provisioner should have the following roles
|
||||
Coder requires a Google Cloud Service Account to provision workspaces. To create
|
||||
a service account:
|
||||
|
||||
- Compute Admin
|
||||
1. Navigate to the [CGP
|
||||
console](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create),
|
||||
and select your Cloud project (if you have more than one project associated
|
||||
with your account)
|
||||
|
||||
1. Provide a service account name (this name is used to generate the service
|
||||
account ID)
|
||||
|
||||
1. Click **Create and continue**, and choose the following IAM roles to grant to
|
||||
the service account:
|
||||
- Compute Admin
|
||||
- Service Account User
|
||||
|
||||
Click **Continue**.
|
||||
|
||||
1. Click on the created key, and navigate to the **Keys** tab.
|
||||
|
||||
1. Click **Add key** > **Create new key**.
|
||||
|
||||
1. Generate a **JSON private key**, which will be what you provide to Coder
|
||||
during the setup process.
|
||||
|
Reference in New Issue
Block a user