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

Terraform import record with nameservers incorrectly setting mode to "IMPORT" #68

Open
nquayson opened this issue May 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@nquayson
Copy link

Error: expected mode to be one of [MERGE OVERWRITE], got IMPORT

How to recreate:
Import a namecheap record with nameservers. The import mode is set to "IMPORT"

https://github.com/namecheap/terraform-provider-namecheap/blob/master/namecheap/namecheap_domain_record.go#L17

@anorborg
Copy link

anorborg commented Aug 1, 2022

Just to add more details here, when following the import instructions, described here:

https://github.com/namecheap/terraform-provider-namecheap/blob/master/docs/resources/domain_records.md#import

Then attempting a plan or apply will result in a prompt of a potential change (even though none should be occurring):

Terraform will perform the following actions:

  # namecheap_domain_records.mydomain-com will be updated in-place
  ~ resource "namecheap_domain_records" "mydomain-com" {
        id          = "mydomain.com"
      ~ mode        = "IMPORT" -> "MERGE"
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

The import seems to set the mode to IMPORT even though according to the docs (and terraform) this is not a valid option. Perhaps to will not cause any issue, but the expectation would be no changes occurring and it would be preferred to be confident that no changes are occurring for a domain record so you are not worried it might create an unknown issue.

@vetal2409 vetal2409 added the bug Something isn't working label Feb 8, 2024
@vetal2409
Copy link
Contributor

Thanks for reporting! I will keep you updated with the status here.

@vetal2409 vetal2409 self-assigned this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants