-
Notifications
You must be signed in to change notification settings - Fork 22
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
Plugin crashes accessing a not existing zone via datasource #14
Comments
Hey @c33s, thanks for reporting this issue. Please share your Terraform code or share an example which helps me to reproduce the bug. |
it's only some minimal example code (this is the actual code i try to run): terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "1.20.1"
}
hetznerdns = {
source = "timohirt/hetznerdns"
version = "1.1.0"
}
}
}
provider "hcloud" {
token = "${var.hcloud_token}"
// token = var.hcloud_token
}
provider "hetznerdns" {
// apitoken = var.hcloud_dns_token
apitoken = "${var.hcloud_dns_token}"
}
data "hetznerdns_zone" "dns_zone" {
name = "example.com"
}
resource "hcloud_server" "node1" {
name = "node1"
image = "debian-9"
server_type = "cx11"
}
|
@timohirt i just looked into the code, i think i found the problem:
Within the datasource you only check if there is no error:
You should check if zone != nil too. Then the nil-point should be fixed. (I just did a short look as @c33s asked me to do so.) |
@LKaemmerling thanks you very much. +facepalm+ i just copied the example from the provider and had not recognized that it iss a |
@LKaemmerling thanks for looking into this issue. Handled @c33s next time you will see a proper error message:
|
terraform versions tried:
no problem with hcloud plugin but hetznerdns is always crashing. also tried lower versions of this plugin but also crashed all the time (there where different error messages which i haven't written down). can provide the crash log if required (left them off this ticket because it would need redacting). also removed some paths from the crashoutput below.
0.11.14:
0.12.29:
0.13.1:
The text was updated successfully, but these errors were encountered: