Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] No validation of reserved_ipv4 on civo_instance resource #269

Closed
fernando-villalba opened this issue Jul 22, 2024 · 0 comments · Fixed by #275
Closed

[BUG] No validation of reserved_ipv4 on civo_instance resource #269

fernando-villalba opened this issue Jul 22, 2024 · 0 comments · Fixed by #275
Labels
bug Something isn't working

Comments

@fernando-villalba
Copy link
Contributor

fernando-villalba commented Jul 22, 2024

Description

Using a completely wrong reserved_ipv4 field causes terraform to keep trying to provision this resource for two minutes rather than failing straight away:

resource "civo_instance" "foo" {
    hostname = "amazingthingy20"
    tags = ["python", "nginx"]
    notes = "This is a test-issue"
    size = "g3.xsmall"
    region = "LON1"
    reserved_ipv4 = "fsdfsdfsdfsdfsd" # This field is wrong
    firewall_id = "default-default"
    disk_image = "debian-11"
}
image

This should fail straight away as it does on the API, CLI, etc. Not keep retrying

Acceptance Criteria

  • Have this resource fail straight away when entering the wrong value.

This ticket should be used as a reference for a bigger piece of work revamping the way we handle errors in terraform. The default behaviour with our provider seems to be to keep trying and it does NOT return the error the API gives, which is a problem.

We need to go through the entire provider and change the behaviour for everything not by writing error messages in terraform provider, but returning errors from the API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant