Closed Evesy closed 5 years ago
Just hit exactly the same issue.
The ForceNew
property of zone_id
causes the problem as we don't have zone_id
set with resources originally created with the 1.x provider (they used the name
parameter).
This is preventing adoption to 2.x tree.
Hey, please check out if #502 fixes your issue. It will set zone_id
on Read, which happens before apply.
Just built branch from #502 (issue_501) and it seems to do the right things:
zone_id
matches the zone id name
pointed at originally and no param changed during an upgrade from 1.x.x.zone_id
changes.zone_id
matches and a param is changed.LGTM, Although @jacobbednarz is probably right about a regression test.
Terraform Version
Terraform:
0.12.7
CF Provider:2.0.0
Affected Resource(s)
Please list the resources as a list, for example:
cloudflare_zone_settings_override
Terraform Configuration Files
(
name
has been swapped out forzone_id
in this plan)Expected Behavior
Zone overrides should be a noop
Actual Behavior
Resource wants to be recreated:
Perhaps it's safe to recreate this resource but I'm not sure if settings will be wiped to defaults before being reapplied (potentially causing disruption)
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
<2.0.0
of provider specifying name.name
and usezone_id
instead, run a plan on version2.0.0
of provider.