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

TXT DNS records for the apex domain are re-written over and over #664

Closed
ghomem opened this issue Aug 3, 2021 · 4 comments · Fixed by #672
Closed

TXT DNS records for the apex domain are re-written over and over #664

ghomem opened this issue Aug 3, 2021 · 4 comments · Fixed by #672
Labels

Comments

@ghomem
Copy link

ghomem commented Aug 3, 2021

Bug Report

Nothing changes on the code but TXT DNS records for the apex domain are re-written over and over. Every time we run terraform plan the "changes" are proposed. Everytime we runterraform applythe "changes" are applied. The "changes", however, do not change anything (see below).

Describe the bug

The problem is there is some kind of false positive on the change detection

Affected Resource(s)

  • digitalocean_record

Expected Behavior

I expected no changes proposed and no changes applied.

Actual Behavior

Changes proposed and changes applied.

Steps to Reproduce

Create a record like this one:

resource "digitalocean_record" "acme-spf-TXT" {
    domain = digitalocean_domain.acme.name
    type   = "TXT"
    name   = "acme.io."
    value  = "v=spf1 a:smtp01.acme.io a:smtp02.acme.io a:smtp.acme.io a:mailserver01.acme.io a:mail.acme.io -all"
}

And run terraform plan + terraform apply multiple times. The output will be:

  # digitalocean_record.acme-spf-TXT will be updated in-place
  ~ resource "digitalocean_record" "acme-spf-TXT" {
        id       = "164360618"
      ~ name     = "@" -> "acme.io."
        # (9 unchanged attributes hidden)
    }

Terraform Configuration Files

terraform {
  required_providers {
    digitalocean = {
      source = "digitalocean/digitalocean"
terraform {
  required_providers {
    digitalocean = {
      source = "digitalocean/digitalocean"
      version = "2.10.1"
    }
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.0"
    }
  }
}

# configure the providers

provider "digitalocean" {
  token = var.do_token
}
      version = "2.10.1"
    }
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.0"
    }
  }
}

# configure the providers

provider "digitalocean" {
  token = var.do_token
}

Expected behavior

The expected behaviour would be no changes reported or applied.

Terraform version

Terraform v1.0.3
on linux_amd64
+ provider registry.terraform.io/digitalocean/digitalocean v2.10.1
+ provider registry.terraform.io/hashicorp/aws v3.52.0
@ghomem
Copy link
Author

ghomem commented Aug 19, 2021

Thanks a lot for fixing this.

Will the fix be available on release v2.12.0 ?

@andrewsomething
Copy link
Member

@ghomem We'll be looking to cut a release soon. Since as of right now the only planned changes are bugfix only, the version would be v2.11.1

@ghomem
Copy link
Author

ghomem commented Aug 19, 2021

Thanks for the clarification and for the fix @andrewsomething .

@andrewsomething
Copy link
Member

@ghomem The new release should now be available. Please feel free to reopen the issue if it doesn't resolve the problem.

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