Skip to content

feat(examples/templates/gcp-devcontainer): add envbuilder provider #14405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
  • Loading branch information
3 people authored Aug 23, 2024
commit fafb47cb1ed683afea85bc5b9a7df2dfa2b28521
10 changes: 5 additions & 5 deletions examples/templates/gcp-devcontainer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ provider "google" {

data "google_compute_default_service_account" "default" {}

data "coder_workspace" "me" {
}
data "coder_workspace" "me" {}
data "coder_workspace_owner" "me" {}

variable "project_id" {
Expand Down Expand Up @@ -120,7 +119,7 @@ data "coder_parameter" "devcontainer_builder" {
description = <<-EOF
Image that will build the devcontainer.
We highly recommend using a specific release as the `:latest` tag will change.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase it to indicate it is dangerous? For example: Do not use envbuilder:latest tag due to the risk of build instability.

Find the latest version of Envbuilder here: https://github.com/coder/envbuilder/pkgs/container/envbuilder
Find the latest version of Envbuilder here: https://ghcr.io/coder/envbuilder
EOF
display_name = "Devcontainer Builder"
mutable = true
Expand Down Expand Up @@ -222,7 +221,7 @@ locals {
META
}

# Create a persistent to store the workspace data.
# Create a persistent disk to store the workspace data.
resource "google_compute_disk" "root" {
name = "coder-${data.coder_workspace.me.id}-root"
type = "pd-ssd"
Expand Down Expand Up @@ -316,7 +315,8 @@ resource "coder_agent" "dev" {
# Install code-server via Terraform module.
module "code-server" {
count = data.coder_workspace.me.start_count
source = "https://registry.coder.com/modules/code-server"
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.17"
agent_id = coder_agent.dev[0].id
}

Expand Down