-
Notifications
You must be signed in to change notification settings - Fork 625
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
Inconsistent final plans for IP addresses without CIDR notation #2728
Comments
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
the issue here is that the service wants the IP represented in one form however, it is provided in another. we don't duplicate the service logic here (yet) so this is working as expected until such a time we can unify the validation and bring it into the provider. |
I'm not sure it's fair to label this as 'working as intended' given Terraform cannot apply the resource and gives zero indication as to why. There are a whole class of bugs which are caused by the API mutating data, surely there just be a better way to handle this? |
the working as intended part is the drift that comes from one part of the service wanting the IP in one particular notion whereas it is provided it in another. you're right that there are improvements here but they reside with the service itself to either not remove the CIDR notation or fail the API response. here, terraform is comparing the two values and identifying their is a discrepancy. we do diff suppression in some cases (like correcting case) but here, we should really have the service decide how it wants the value and validate against it on the payload since this will also be an issue for anyone calling the API directly. additionally, I suspect you have two issues here as the error you are seeing about a the values not being present in the list is different to the drift error you are seeing. if you can provide the sanitised debug output logs, I can take a look at that. |
Confirmation
Terraform and Cloudflare provider version
cloudflare/cloudflare: 4.13.0
Affected resource(s)
cloudflare_tunnel_route
cloudflare_teams_list
Terraform configuration files
Link to debug output
N/A
Panic output
No response
Expected output
Should plan successfully, or not at all.
Actual output
Steps to reproduce
Apply the given resources.
Additional factoids
I noticed this output:
So, I modified the resources to use the CIDR notation and the apply was successful.
References
No response
The text was updated successfully, but these errors were encountered: