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

cloudflare_firewall_rule import issue - zone not set #165

Closed
SteveGoldthorpe-Work opened this issue Nov 23, 2018 · 2 comments
Closed

cloudflare_firewall_rule import issue - zone not set #165

SteveGoldthorpe-Work opened this issue Nov 23, 2018 · 2 comments

Comments

@SteveGoldthorpe-Work
Copy link
Contributor

SteveGoldthorpe-Work commented Nov 23, 2018

terraform import for cloudflare_firewall_rule resource forces a new resource on next apply as zone is not added up on import.
zone: "" => "domain.name" (forces new resource)

Similar to #161

provider.cloudflare 1.9

@jacobbednarz
Copy link
Member

Pending direction in #162. Once that is 👍 , I'll port the changes to this resource.

jacobbednarz added a commit to jacobbednarz/terraform-provider-cloudflare that referenced this issue Dec 4, 2018
During an import of the `cloudflare_firewall_rule` resource, the `zone_id` is
defined within the composite ID. This value is then populated and synced
within `resourceCloudflareFirewallRuleRead` to match the expected schema
resource. However, we don't currently set zone (the zone name)
anywhere. This becomes problematic on subsequent terraform operations as
the Read attempts to sync the schema with the firewall rule and ends up
attempting to recreate the resource due to detecting a change.

This is a similar issue to cloudflare#161 and is addressed in a similar manner.

Fixes cloudflare#165
@jacobbednarz
Copy link
Member

#174 is applying the fix mentioned from #162 for the cloudflare_firewall_rule resource.

patryk pushed a commit that referenced this issue Dec 5, 2018
During an import of the `cloudflare_firewall_rule` resource, the `zone_id` is
defined within the composite ID. This value is then populated and synced
within `resourceCloudflareFirewallRuleRead` to match the expected schema
resource. However, we don't currently set zone (the zone name)
anywhere. This becomes problematic on subsequent terraform operations as
the Read attempts to sync the schema with the firewall rule and ends up
attempting to recreate the resource due to detecting a change.

This is a similar issue to #161 and is addressed in a similar manner.

Fixes #165
boekkooi-lengoo pushed a commit to boekkooi-lengoo/terraform-provider-cloudflare that referenced this issue Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants