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

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

Closed
jmcgeheeiv opened this issue Mar 29, 2021 · 2 comments

Comments

@jmcgeheeiv
Copy link

jmcgeheeiv commented Mar 29, 2021

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

@antonbabenko
Copy link
Member

Thanks for the corrections.

I think the issue with the offset has been fixed in #89 and v3.1.0 has been just released.

It should be rather safe to upgrade, too.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants