terraform-provider-stackit icon indicating copy to clipboard operation
terraform-provider-stackit copied to clipboard

HTTP status code 404 is used if creation of public IP fails

Open flobeier opened this issue 6 months ago • 1 comments

Description

│ Error: Error creating public IP
│ 
│   with stackit_public_ip.vpn_gateway,
│   on stackit.tf line 106, in resource "stackit_public_ip" "vpn_gateway":
│  106: resource "stackit_public_ip" "vpn_gateway" {
│ 
│ Calling API: 404 Not Found, status code 404, Body: {"code":404,"msg":"External network xxxx-xxxx-xxxx-xxxx-xxxx is not reachable from subnet xxxx-xxxx-xxxx-xxxx-xxxx.  Therefore, cannot associate Port xxxx-xxxx-xxxx-xxxx-xxxx with a Floating IP."}

HTTP status code 404 is used for the error, I think it should be 400 instead.

Steps to reproduce

Not sure at this point, I just want to report the issue with the API.

Actual behavior

Error is reported with HTTP status code 404 (Not Found).

Expected behavior

Error is reported with HTTP status code 400 (Bad Request).

Environment

  • OS: Ubuntu 25.04
  • Terraform version (see terraform --version): v1.12.1
  • Version of the STACKIT Terraform provider: v0.56.0

flobeier avatar Jul 09 '25 12:07 flobeier

Thank you for submitting the report. I have created an internal ticket for it.

Benjosh95 avatar Jul 10 '25 06:07 Benjosh95