Open bloudraak opened 10 months ago
Thanks for raising!👍 We'll consider this for future releases!
The time_rotating resource from https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/rotating and the replace_triggered_by lifecycle attribute in a Terraform random_password resource might be a helpful workaround to bring this into Terraform.
Just replace the password resource when the time rotation resource updates, and use that value in the password. It'd be nice to use 1password's password generation logic, of course, but this generally works for me. :)
Summary
Support invalidating passwords and regenerating them on a regular cadence similar to application_password
Use cases
Some requirements you'd encounter in most security-aware organizations:
Proposed solution
One option would be to introduce a new resource,
onepassword_item_password.
This allows the password to have a distinct lifecycle from the item. Noterotate_when_changed
. This method will enable us to use anything to trigger a password regeneration.Another option would be to have a data block to generate a password like this:
A third would be to have
rotate_when_changed
on theonepassword_item
resource, but this would complicate matters whenever there is more than one password in the resource.A fourth option would be to add
rotate_when_changed
to the password recipe.Is there a workaround to accomplish this today?
Resort to writing your code or scripts; call it from Terraform, which is less than ideal.
References & Prior Work
The best example of this behavior would be the application_password of Azure Active Directory.