You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# namecheap_domain_records.my-domain-com will be created
+ resource "namecheap_domain_records" "my-domain-com" {
+ domain = "some.domain"
+ email_type = "NONE"
+ id = (known after apply)
+ mode = "OVERWRITE"
+ record {
+ address = "some.address"
+ hostname = "hostname"
+ mx_pref = 10
+ ttl = 1799
+ type = "CNAME"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Expected Behavior
Should warn about removing existing resources that are created manually. Even thou the manual records are not in the TFState, if the API connection has already been made, and the OVERWRITE flag it true, some warning should be made.
Actual Behavior
Only says it is adding a resource, not deleting (outside of terraform, but still under the api call).
Steps to Reproduce
terraform apply
Important Factoids
Because of this mistake, I accidentally deleted all production records and had to contact Namecheap support to restore them. It's unclear from the docs that the terraform will manage anything that was not created first by it, as intuitively this is terraform's use case. If mass-deletion was required, it would be better not to provide it using this provider as it can create confusion. If it's necessary, a warning should be made on the docs wherever Overwrite is written.
The text was updated successfully, but these errors were encountered:
Thanks to your feedback. Honestly speaking I'm not really sure that it's technically possible to show such a diff (which would clearly indicate removal of records) in Terraform.
Terraform Version
v1.0.4
Namecheap provider version
v2.0.2
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
Terraform will perform the following actions:
Expected Behavior
Should warn about removing existing resources that are created manually. Even thou the manual records are not in the TFState, if the API connection has already been made, and the OVERWRITE flag it true, some warning should be made.
Actual Behavior
Only says it is adding a resource, not deleting (outside of terraform, but still under the api call).
Steps to Reproduce
terraform apply
Important Factoids
Because of this mistake, I accidentally deleted all production records and had to contact Namecheap support to restore them. It's unclear from the docs that the terraform will manage anything that was not created first by it, as intuitively this is terraform's use case. If mass-deletion was required, it would be better not to provide it using this provider as it can create confusion. If it's necessary, a warning should be made on the docs wherever Overwrite is written.
The text was updated successfully, but these errors were encountered: