Skip to content

docs: add template to provision docker image based workspaces on fly.io #6526

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 13 commits into from
Mar 17, 2023
Prev Previous commit
Next Next commit
add fly-auth-api managed variables
  • Loading branch information
matifali committed Mar 14, 2023
commit d8cf4373043b51da1b61f2dee129df1f0e85d92c
12 changes: 12 additions & 0 deletions examples/templates/fly-docker-image/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ provider "fly" {
useinternaltunnel = true
internaltunnelorg = var.fly_org
internaltunnelregion = data.coder_parameter.region.value
fly_api_token = var.fly_api_token == "" ? null : var.fly_api_token
}

provider "coder" {
Expand Down Expand Up @@ -85,6 +86,17 @@ resource "fly_machine" "workspace" {
]
}

variable "fly_api_token" {
type = string
description = <<-EOF
The Fly.io API token to use for deploying the workspace. You can generate one by running:

$ flyctl auth token
EOF
sensitive = true
default = ""
}

variable "fly_org" {
type = string
default = "coder-409"
Expand Down