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] creating AAAA DNS record fails sometimes #860

Open
Koe-Greg opened this issue Feb 21, 2025 · 2 comments
Open

[BUG] creating AAAA DNS record fails sometimes #860

Koe-Greg opened this issue Feb 21, 2025 · 2 comments

Comments

@Koe-Greg
Copy link

Describe the bug

From time to time, Provider produced inconsistent final plan when creating AAAA DNS record

Terraform Version

Terraform v1.5.7

OVH Terraform Provider Version

ovh/ovh v1.6.0 (signed by a HashiCorp partner, key ID F56D1A6CBDAAADA5)

Affected Resource(s)

resources:

  • ovh_domain_zone_record

Terraform Configuration Files

nodes = {
  node1 = {
    name                = "node1"
    server_type         = "cpx31"
  }
}

resource "ovh_domain_zone_record" "server_dns_record_AAAA" {
  for_each = var.nodes

  zone      = "koopilot.tech"
  subdomain = each.value.name
  fieldtype = "AAAA"
  ttl       = 3600
  target    = hcloud_server.cloud_nodes[each.key].ipv6_address
}

Expected Behavior

user@server:~$ terraform apply
[...]
ovh_domain_zone_record.server_dns_record_AAAA["vmphch104"]: Creating...
ovh_domain_zone_record.server_dns_record_AAAA["vmphch104"]: Creation complete after 1s [id=5354269568]

Actual Behavior

user@server:~$ terraform apply
[...]
│
│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for
│ ovh_domain_zone_record.server_dns_record_AAAA["node1"] to include new
│ values learned so far during apply, provider
│ "registry.terraform.io/ovh/ovh" produced an invalid new value for .target:
│ was cty.StringVal(""), but now cty.StringVal("2a01:4f9:c013:87b::1").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
│

Additional context

This code have been used a 100s of time and failed twice so far with same output.
Running same code a second time makes creation successful.

terraform plan always present the same creation action:

 user@server:~$ terraform apply
[...]
 # ovh_domain_zone_record.server_dns_record_AAAA["node1"] will be created
  + resource "ovh_domain_zone_record" "server_dns_record_AAAA" {
      + fieldtype = "AAAA"
      + id        = (known after apply)
      + subdomain = "node1"
      + ttl       = 3600
      + zone      = "koopilot.tech"
    }
@amstuta
Copy link
Collaborator

amstuta commented Feb 26, 2025

Hello @Koe-Greg,

Thanks for opening this issue. Unfortunately I'm unable to reproduce this problem, would you be able to retrieve or get new error logs using TF_LOG=debug ?

@Koe-Greg
Copy link
Author

Koe-Greg commented Feb 26, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants