-
Notifications
You must be signed in to change notification settings - Fork 541
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_account_member status changes after user accepts invite #2187
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 |
Also happens in 3.33.1. Contrary to what the doc states at https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/account_member#status the status property is not optional as if you don't declare it, you get this drift forever:
and I don't understand why status is not read-only as there is no point modifying this. |
the status field isn't required but recommended now that we sync the state. I suspect in the near-ish future this will be required from both the API and provider to address sync issues like this.
there are accounts that are entitled to do "direct add" which uses this. |
Considering a user has to accept the invite in email, wouldn't the state change always happen outside of Terraform? If so, why require updating Terraform after it's accepted to avoid drift? |
please see above; not all cases requiring a user to accept the invite. |
@jacobbednarz that makes absolutely no sense.
Meaning a newly created resource will always have status
Then create a new resource that follows this behavior, don't break functionality for everyone else. |
@george-angel thanks for letting me how the APIs that i interact with on a daily basis work 😂 direct add is what the feature is called in the UI for those who have it entitled (and the user already has an account), which by the sound of things, is not an account you have access to. the functionality has existed for the better part of 2-3 years but it is gated as it's not behaviour we want for all users out of the box. unfortunately, bugs can happen. effort is made to avoid it but sometimes these things happen. if you don't like it, you're welcome not to use the software. simple as that. |
I have to use your software because our company has a 6 figure contract with your company. And we have had a Terraform module since 2019-10 defining users, and now you are introducing breaking changes to it. |
It is effectively required, because if you don't specify it, you get a terraform drift forever even after applying.
We usually don't have a choice like stated above, and out of the 30+ providers we have to use, cloudflare is the one that requires the most maintenance by not playing by the terraform provider rules. Example it's still is the only provider that has a deprecated warning with no workaround for 7 months now: #1716 (comment) The problem in this issue is not that you added a new |
Adding
to the resource works around this issue for our use case. I do agree with the sentiment of the other comments, and feel this could be handled better. It seems the only way to avoid drift entirely is the direct add scenario (which is many cases is not even possible due to the member not previously existing). Given that the API default is |
following |
Thanks for switching status to computed, and congrats on v4 RC1! |
This functionality has been released in v3.34.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! |
Confirmation
Terraform and Cloudflare provider version
Terraform 1.3.6
Cloudflare provider 3.32.0 (not latest, but no mention of cloudflare_account_member in last couple releases)
Affected resource(s)
cloudflare_account_member
Terraform configuration files
Link to debug output
None
Panic output
No response
Expected output
No changes
Actual output
The status field shows as a change in the plan. It's not clear if this is just clearing it from state or actually modifying the status.
Steps to reproduce
Additional factoids
Sorry this isn't a full bug report, but it seems a fairly straightforward bug with the status field. Just 2 weeks ago, this PR added status to the state: #2156
References
No response
The text was updated successfully, but these errors were encountered: