-
Notifications
You must be signed in to change notification settings - Fork 630
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
Fix partial risk behavior configuration bug #3463
Fix partial risk behavior configuration bug #3463
Conversation
changelog detected ✅ |
e12317e
to
b9dccf1
Compare
Previously, if a user's account supported risk behaviors A, B and C but only behaviors A and B were configured, a 'provider produced inconsistient results after apply' error occured. This is because the cloudflare API call for user risk behaviors returns the status of all behaviors. This PR changes the user risk behavior terraform provider to - on read, create and update calls - prune the API call results to only include the behaviors the terraform config includes A test confirming that the fix works has been included
b9dccf1
to
4e2cc28
Compare
this seems like a case where someone is only partially managing the resource in terraform. is that the case? |
Yes, but even in the case where someone is fully managing the resource in terraform, we sometimes add new risk behavior types, which would put them in a partially-managed state (which we want to handle gracefully). (sorry for the delayed response btw, I was out with covid for a bit) |
acceptance tests passing
|
This functionality has been released in v4.39.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! |
Previously, if a user's account supported risk behaviors A, B and C but only behaviors A and B were configured, a 'provider produced inconsistent results after apply' error occurred.
This is because the cloudflare API call for user risk behaviors returns the status of all behaviors.
This PR changes the user risk behavior terraform provider to - on read, create and update calls - prune the API call results to only include the behaviors the terraform config includes
A test confirming that the fix works has been included