koyeb / terraform-provider-koyeb

Terraform Koyeb provider
https://registry.terraform.io/providers/koyeb/koyeb/latest/docs
Mozilla Public License 2.0
3 stars 2 forks source link

Bug: Changing the definition of a service force a replacement and a down time. #39

Closed seuros closed 1 year ago

seuros commented 1 year ago

Terraform Version

1.4.4

Affected Resource(s)

Terraform Configuration Files

resource "koyeb_service" "app-service" {
  app_name = koyeb_app.app.name
  definition {
    name = "web"
    instance_types {
      type = var.instance_type
    }
    ports {
      port     = 80
      protocol = "http"
    }
    routes {
      path = "/"
      port = 80
    }
    scalings {
      min = 1
      max = 1
    }
    regions = ["fra"]
    docker {
      image                 = "nginx/nginx"
    }
  }

  depends_on = [
    koyeb_app.app
  ]
}

Expected Behavior

changing the var.instance_type to from micro to small should replace the service instance type without any downtime

Actual Behavior

The service is deleted and fail to be replaced as the name is still taken for few seconds.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
edouardb commented 1 year ago

Thanks for reporting this.

Fixed by #40