You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
I created a fly.io app with the flyctl launch command, and it generated an app with a shared ipv4 ip address and an ipv6 address.
leejjon@leejjon-XPS:~/projects/node-sqlite-fly-tutorial/steps/02-docker$ flyctl apps list
NAME OWNER STATUS PLATFORM LATEST DEPLOY
fly-builder-quiet-snow-9145 personal suspended machines
leejjon-node-sqlite-fly-tutorial personal deployed machines 2023-10-07T09:26:45Z
leejjon@leejjon-XPS-:~/projects/node-sqlite-fly-tutorial/steps/02-docker$ flyctl ip list
VERSION IP TYPE REGION CREATED AT
v6 2a09:8280:1::2d:7e61 public global 2023-10-01T21:18:25Z
v4 66.241.125.225 public (shared)
I created a main.tf file that has definitions for the app and two ip addresses:
terraform {
required_providers {
fly = {
source = "fly-apps/fly"
version = "0.0.23"
}
}
}
provider "fly" {
fly_api_token = var.token
}
resource "fly_app" "our-fly-app" {
name = "leejjon-node-sqlite-fly-tutorial" #Replace this with your own app name
org = "personal"
}
resource "fly_ip" "ourIpv4" {
app = fly_app.our-fly-app.name
type = "v4"
}
resource "fly_ip" "ourIpv6" {
app = fly_app.our-fly-app.name
type = "v6"
}
I could import the app perfectly fine with the command: terraform import fly_app.our-fly-app leejjon-node-sqlite-fly-tutorial
Now terraform nicely shows that my app exists.
leejjon@leejjon-XPS:~/projects/node-sqlite-fly-tutorial/steps/02-docker/terraform$ terraform show
resource "fly_app" "our-fly-app" {
appurl = "https://2a09:8280:1::2d:7e61"
id = "leejjon-node-sqlite-fly-tutorial"
name = "leejjon-node-sqlite-fly-tutorial"
org = "personal"
orgid = "3KXm0g39B6X2ZT01Nkv4g83lV4hgYYXBp"
}
According to the docs you can do this command: terraform import fly_ip.exampleIp <app_id>,<ip_address>
leejjon@leejjon-XPS:~/projects/node-sqlite-fly-tutorial/steps/02-docker/terraform$ terraform import fly_ip.ourIpv4 "leejjon-node-sqlite-fly-tutorial,66.241.125.225"
fly_ip.ourIpv4: Importing from ID "leejjon-node-sqlite-fly-tutorial,66.241.125.225"...
fly_ip.ourIpv4: Import prepared!
Prepared fly_ip for import
fly_ip.ourIpv4: Refreshing state...
╷
│ Error: Could not find IPAssignment
│
│ app.ipAddress
╵
I also tried it without the quotes.
The ipv6 command does work:
leejjon@leejjon-XPS:~/projects/node-sqlite-fly-tutorial/steps/02-docker/terraform$ terraform import fly_ip.ourIpv6 "leejjon-node-sqlite-fly-tutorial,2a09:8280:1::2d:7e61"
fly_ip.ourIpv6: Importing from ID "leejjon-node-sqlite-fly-tutorial,2a09:8280:1::2d:7e61"...
fly_ip.ourIpv6: Import prepared!
Prepared fly_ip for import
fly_ip.ourIpv6: Refreshing state...
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
I cannot find the Error: Could not find IPAssignment on Google and I want to know if I'm doing something wrong or if this is a bug in the terraform provider.
The text was updated successfully, but these errors were encountered:
Shared ip addresses aren't actually "ip address" resources apparently. It's a property of the app. I think just importing the app would be enough to get it using the (my updated) fork in #257
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I created a fly.io app with the flyctl launch command, and it generated an app with a shared ipv4 ip address and an ipv6 address.
I created a main.tf file that has definitions for the app and two ip addresses:
I could import the app perfectly fine with the command:
terraform import fly_app.our-fly-app leejjon-node-sqlite-fly-tutorial
Now terraform nicely shows that my app exists.
According to the docs you can do this command:
terraform import fly_ip.exampleIp <app_id>,<ip_address>
I also tried it without the quotes.
The ipv6 command does work:
I cannot find the
Error: Could not find IPAssignment
on Google and I want to know if I'm doing something wrong or if this is a bug in the terraform provider.The text was updated successfully, but these errors were encountered: