fly_machine.surreal_db_machine: Creation complete after 8s [id=e148ede5c93389]
╷
│ Error: Failed to create ip addr
│
│ with fly_ip.surreal_db_ipv4,
│ on main.tf line 34, in resource “fly_ip” “surreal_db_ipv4”:
│ 34: resource “fly_ip” “surreal_db_ipv4” {
│
│ returned error 500 Internal Server Error: {“errors”:[{“message”:“You hit a Fly API error
│ with request ID:
│ 01GDYYP9A1DCCDMSY6ZBPTDE0X-lax”,“extensions”:{“code”:“SERVER_ERROR”,“fly_request_id”:“01GDYYP9A1DCCDMSY6ZBPTDE0X-lax”}}],“data”:{}}
terraform {
required_providers {
fly = {
source = "fly-apps/fly"
version = "0.0.18"
}
}
}
variable "db_mounth_path" {
type = string
default = "/var/lib/surrealdb"
description = "the path of the data for the db"
}
variable "app_name" {
type = string
default = "surrsin"
description = "the name of the app"
}
variable "app_region" {
type = string
default = "sin"
description = "the regions of the app"
}
resource "fly_app" "surreal_db" {
name = var.app_name
org = "personal"
}
resource "fly_ip" "surreal_db_ipv4" {
app = var.app_name
type = "v4"
depends_on = [fly_app.surreal_db]
}
resource "fly_ip" "surreal_db_ipv6" {
app = var.app_name
type = "v6"
depends_on = [fly_app.surreal_db]
}
resource "fly_volume" "surreal_db_volume" {
name = "${var.app_name}volume"
app = var.app_name
size = 10
region = var.app_region
depends_on = [fly_app.surreal_db]
}
resource "fly_machine" "surreal_db_machine" {
app = var.app_name
name = "${var.app_name}machine"
region = var.app_region
image = "flyio/iac-tutorial:latest"
services = [
{
ports = [
{
port = 443
handlers = ["tls", "http"]
},
{
port = 80
handlers = ["http"]
}
]
protocol = "tcp",
internal_port = 80
},
]
cpus = 1
memorymb = 256
mounts = [
{
path: var.db_mounth_path,
volume: fly_volume.surreal_db_volume.id
}
]
depends_on = [fly_app.surreal_db]
}
flyctl ips allocate-v4 -a shy-thunder-5971
Update available 0.0.395 → v0.0.396.
Run “flyctl version update” to upgrade.
Error You hit a Fly API error with request ID: 01GDYZ2JNN2Z4WRSMJTZS79JGD-lax
We exhausted IPs we registered in our DB. Should be fixed now. Sorry about that! We’re making this alert easier to catch for next time.