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
fix: fly_volume does not allow using - in name.
fix: `fly_volume` does not allow using - in the name.
  • Loading branch information
matifali authored Mar 12, 2023
commit e151d7760825ef5357a38e78e8673f1bf6ac7894
4 changes: 3 additions & 1 deletion examples/templates/fly-docker-image/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ resource "fly_ip" "workspace-ip6" {

resource "fly_volume" "home-volume" {
app = fly_app.workspace.name
name = "coder_${data.coder_workspace.me.owner}_${lower(data.coder_workspace.me.name)}_home"
name = "coder_${data.coder_workspace.me.owner}_${lower(replace(data.coder_workspace.me.name, "-", "_"))}_home"
# or use workspace id
# name = "coder_${data.coder_workspace.me.owner}_${data.coder_workspace.me.id}_home"
size = data.coder_parameter.volume-size.value
region = data.coder_parameter.region.value
}
Expand Down