Skip to content

Panic - DNS provider fails to trap error in Zone Name #103

Open
@ghost

Description

This issue was originally opened by @SteveBristow as hashicorp/terraform#24820. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.24
+ provider.dns v2.2.0

Terraform Configuration Files

provider "dns" {
  update {
    server        = "192.168.1.1"
  }
}
resource "dns_a_record_set" "test" {
    zone        = ".lab.environment.local."
    name        = "testrecord"
    addresses   = ["127.0.0.1"]
    ttl         = 300
}
...

Crash Output

crash.log

Expected Behavior

An illegal zone name (preceding dot) should have been reported, and ignored or failed on - ideally at plan stage.

Actual Behavior

DNS provider crashed Terraform.

Steps to Reproduce

  1. Create a TF template using the code excerpt above. A functioning DNS server is not necessary.
  2. terraform init to add the DNS provider to Terraform
  3. terraform apply
  4. Observe the successful plan - respond "yes" to apply.
  5. Observe crash state.

Additional Context

Terraform is running on Ubuntu on WSL. It seems unlikely that this is the problem, as removing the preceeding dot from the Zone name results in success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions