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

DXE-4293 EdgeDNS terraform fails with "Record not found" if real DNS record is deleted out of terraform #584

Open
martin-simek-gen opened this issue Oct 7, 2024 · 1 comment

Comments

@martin-simek-gen
Copy link

Hi there,

We currently get errors from the provider when DNS record is deleted out of terraform.
We use terraform as IaC to manage our large number of DNS records. But there are situations that someone destroys DNS record via Akamai API or WEB UI. In this case our terraform pipeline will fail with "Error: Record not found" which is quite annoying. We are expecting terraform to fix our DNS infra according to our terraform manifests.
There are 2 ways how to fix it, but it needs hands to do it, like remove record from terraform state file or create the DNS record via UI and then run terraform again.

We use terraform with other providers like google, aws, nsone .... and we experience different behaving, like if the resource is missing on cloud service, the terraform will fix it and create the resource again. I would expect exact the same behavior from Akamai provider.

I see the issue #577 --> #577 which is very similar to our issue, but for GTM. I think this is global issue for akamai provider how it handle resources.

Terraform and Akamai Terraform Provider Versions

Akamai provider: the latest release (6.4.0) and all previous one
Terraform: v1.9.7 + v1.7.5
Terragrunt version v0.67.14

Affected Resource(s)

  • akamai_dns_record
  • "maybe all akamai resources"

Terraform Configuration Files

resource "akamai_dns_record" "a" {
  for_each   = var.dns_a == null ? {} : { for fqdn, data in var.dns_a : fqdn => data }
  zone       = var.zone
  name       = "${each.key}"
  recordtype = "A"
  ttl        = each.value.ttl != null ? each.value.ttl : local.default_ttl
  target     = each.value.target
}

Expected Behavior

In case that record is destroyed out of terraform, the terraform plan/apply should create the record instead of failing.

Actual Behavior

Terraform plan/apply will fail with message:
Error: Record not found

Steps to Reproduce

  1. Create a DNS record via terraform
  2. Destroy the DNS record via Web UI
  3. Run terraform again ... it will fail on creating plan

References

@lsadlon
Copy link

lsadlon commented Oct 10, 2024

Hi @martin-simek-gen

I was able to reproduce this issue and create internal ticket to fix it. We will inform you about progress.

BR,
Lukasz

@lsadlon lsadlon changed the title EdgeDNS terraform fails with "Record not found" if real DNS record is deleted out of terraform DXE-4293 EdgeDNS terraform fails with "Record not found" if real DNS record is deleted out of terraform Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants