DrFaust92 / terraform-provider-airflow

Terraform Airflow provider.
https://registry.terraform.io/providers/DrFaust92/airflow
MIT License
14 stars 11 forks source link

Change User resource id from username to email. #15

Closed DJLemkes closed 1 year ago

DJLemkes commented 2 years ago

Reason is that GCP Cloud Composer changes username upon first user login. This makes Terraform think that the user has been deleted. An Airflow user is not only unique by its username but also e-mail. So changing the Terraform user id to e-mail fixes is safe.

note: I don't have any prior Go experience so excuse me for any non-idiomatic Go use. Happy to update!

DrFaust92 commented 2 years ago

Thanks @DJLemkes ill look at this over the coming weekend and test it.

DJLemkes commented 2 years ago

Hi @DrFaust92, any chance you were able to check it out?

DrFaust92 commented 2 years ago

yeah ive looked into this a bit, im not sure about this change. i think it might be easier to do some kind of state check and suppress diff (if new user value is email ). let me try to test this on the side.

DrFaust92 commented 1 year ago

DJLemkes would you care to rebase, i would like to look into this