container modify disables the existing health check (sends healthCheck: null)
What happens Running nexaa container modify on a container that has a health check removes the health check, even when the command has nothing to do with it. For example: nexaa container modify --namespace my-ns --name backend --image ghcr.io/org/backend:sha-abc123 Before: the container has healthCheck { port: 2026, path: "/health" }. After: the health check is gone, and Terraform wants to add it back. We hit this because we set up containers with the Terraform provider (nexaacontainer.healthcheck) and roll out images from CI with the CLI. After every deploy, terraform plan shows drift: ~ resource "nexaa_container" "app" { health_check = { path = "/health" port = 2026 } Expected modify leaves fields you don't pass unchanged, the way it already does for registry, resources, command and entrypoint. Cause cmd/container.go (modifyContainerCmd) copies Registry, Resources, Command and Entrypoint from oldContainer, but never sets input.HealthCheck. api/generated.go: `HealthCheck *HealthCheckInput json:"healthCheck" has no omitempty (genqlient runs with optional: pointer), so the nil pointer is serialised as "healthCheck": null. The schema doc for ContainerModifyInput.healthCheck says: "When you want to disable the health check you must send us a null value. To leave the current health check unchanged you can omit this field." The CLI sends null. Suggested fix (either works) Copy the existing health check over, like the other fields: set input.HealthCheck from oldContainer's health check when no health-check flag is given. Optionally add --health-check-port / --health-check-path and a --remove-health-check flag to match the existing --remove-* flags. Or omit unset optional fields from the mutation (omitempty, or genqlient's optional: pointer_omitempty), so null is only sent on purpose. Other optional fields on ContainerModifyInput that are serialised the same way (e.g. scaling) may have the same problem. We haven't checked them. Versions nexaa-cli v1.4.0 (latest release; identical to main at cd99a7b`) terraform-provider-nexaa 0.6.9 🤖 Issue researched and written with Claude Code origin: GitHub
