Skip to content

Commit d8cf437

Browse files
committed
add fly-auth-api managed variables
1 parent eb1caa3 commit d8cf437

File tree

1 file changed

+12
-0
lines changed
  • examples/templates/fly-docker-image

1 file changed

+12
-0
lines changed

examples/templates/fly-docker-image/main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ provider "fly" {
1515
useinternaltunnel = true
1616
internaltunnelorg = var.fly_org
1717
internaltunnelregion = data.coder_parameter.region.value
18+
fly_api_token = var.fly_api_token == "" ? null : var.fly_api_token
1819
}
1920

2021
provider "coder" {
@@ -85,6 +86,17 @@ resource "fly_machine" "workspace" {
8586
]
8687
}
8788

89+
variable "fly_api_token" {
90+
type = string
91+
description = <<-EOF
92+
The Fly.io API token to use for deploying the workspace. You can generate one by running:
93+
94+
$ flyctl auth token
95+
EOF
96+
sensitive = true
97+
default = ""
98+
}
99+
88100
variable "fly_org" {
89101
type = string
90102
default = "coder-409"

0 commit comments

Comments
 (0)