-
Notifications
You must be signed in to change notification settings - Fork 636
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
Read load_balancer rules from API when importing #2571
Read load_balancer rules from API when importing #2571
Conversation
changelog detected ✅ |
acceptance tests are failing for this change
|
… location_strategy and random_steering to sets
@jacobbednarz I fixed the panic, thanks for sharing. I need a hand resolving the 2 remaining errors, only 1 of which seems related to my change. |
@jacobbednarz I fixed the test related to my change. The remaining failing test fails on master:
I think this particular test failure was introduced here |
LGTM @joshuamsager. i've pushed a couple of fixes to the test suite which should address those failing on master. acceptance tests are now passng
|
Looks good to me! |
This functionality has been released in v4.10.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Potential solution for: #2561
I say potential because its a complete overhaul of how flattenRules works - perhaps an oversimplification in which I may have introduced regressions.
The solution reads the load balancer rules from the API response instead of the state. It shoves both:
overrides
andfixed_response
into a slice (as the schema demands).After a
terraform import
, printing the statefile includes the overrides:I've tried modifying override rules via Cloudflare's dashboard and re-planning changes in terraform - terraform is able to detect the differences and propose a correct plan:
Closes #2561