Open shaderecker opened 7 months ago
Hello @shaderecker I wasn't able to reproduce the issue.
opentelekomcloud_identity_user_v3
wasn't changed from provider side in a while.
Hmm, I can reproduce it just now. With the provided TF configuration files. Any ideas what we can do / debug further?
Maybe something was changed from API side regarding newly created projects. Can you try running the same config on existing one?
I now set the project_id to the id of the exiting "eu-nl" project. Then the TF apply worked correctly. What is different for newly created projects?
There shouldn't be any and as you mentioned it worked fine before. That's why my guess is that something was changed on cloud side, not provider.
Albeit, it seems I was just lucky. Now after a few retries, I am facing the issue also with the eu-nl project id:
Hi @shaderecker please ask support if there any restrictions for sending thise emails? This is not provider issue
I wrote an email to the OTC support
In the meantime I tracked the requests with mitmproxy and analyzed it a bit: request:
response:
detail:
It doesn't happen every time. but can be reproduced after 4-5 tries.
Did we find out what is the root cause of this behaviour? At first glimpse it looks like some IAM issue of POST https://iam.../v3.0/OS-USER/users/{project}/welcome. Could it be the special email receipient address (email = "myemail+test1@gmail.com") that triggers the issue? I have some suspicion that some validation regexp might fire here. This does not explain why it happens not every time, though.
TBH, technically this is not a Terraform issue, but, I'm pretty sure would also happen if we used the API directly here. Effectively that's what the API returns here (an 403 error). TF is just conveying this error to the user.
(Extra question: Is there a reason why I can't click on the screenshots to see it in original size? Those don't load for me?!)
Terraform provider version
Affected Resource(s)
opentelekomcloud_identity_user_v3
Terraform Configuration Files
Debug Output/Panic Output
https://gist.github.com/shaderecker/39a10b0d236c99a55df34fabee948492
Steps to Reproduce
terraform apply
Expected Behavior
Actual Behavior
error during user creation, fails at "error sending a welcome email:"
Important Factoids
I did not change anything on my side since the last run. The last time I ran my terraform code was on 04.04.24 and this was working back then. The user has the same IAM permissions as before (admin), nothing changed there.
References