Skip to content

Correct Terraform state addresses in README.md note about the off by one error #80

Closed
@jmcgeheeiv

Description

@jmcgeheeiv

Description

While useful, the note about removing the duplicate DNS entry is not quite correct. In particular, the state addresses are incorrect. Currently it says this:

  • If you're upgrading to v2.13.0 or above, you might be subject to off-by-one validation record issue. You can solve this without compromising existing validation records by issuing terraform state rm <your_module_name>.validation[1] where [1] can be a different index # depending on the number of validation records your module creates (you can check this with terraform state list module.<your_module_name>.validation).

I believe that the following would be clearer and more correct:

  • If you're upgrading to v2.13.0 or above, you might encounter the off-by-one validation record issue. You can check for and solve this without compromising existing validation with the following procedure:

    1. List the Route 53 validation DNS records:
      terraform state list module.<your_module_name>.aws_route53_record.validation
    2. If more than one validation record is present, delete all but validation[0] from the Terraform state:
      terraform state rm module.<your_module_name>.aws_route53_record.validation[1]
      # Also delete validation[2] and so on if present

(End of improved documentation)

Versions

  • Terraform: 0.12..29
  • Provider(s):
    .
    ├── provider.aws
    ├── provider.local
    ├── module.acm
    │   └── provider.aws >= 2.53
    ├── module.gitlab-label
    ├── module.label
    ├── module.lambda-label
    └── module.this
  • Module:
    Terraform v0.12.29
  • provider.aws v3.34.0
  • provider.local v2.1.0

Reproduction

Steps to reproduce the behavior:

  • I am not using workspaces. I am using Terragrunt.
  • I cleared the local cache
  • I followed the instructions in the note, but I have some corrections

Code Snippet to Reproduce

Expected behavior

Actual behavior

Terminal Output Screenshot(s)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions