-
Notifications
You must be signed in to change notification settings - Fork 41
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
password_recipe
is not generasting password
field
#129
Comments
Thank you for raising! We'll address this in the future release! But if you want to help and have time, you're welcome to contribute and create a PR with the fix! 😃 |
I just ran into this as well. Is this because it is |
Had this issue also for |
I noticed that only the In the meantime, I used a separate resource "onepassword_item" "db_password" {
# This needs to be its own item because the provider doesn't generate a password if it's not a "password" item.
# See https://github.com/1Password/terraform-provider-onepassword/issues/129
title = "Wordpress MySQL RDS password"
vault = data.onepassword_vault.vault.uuid
category = "password"
password_recipe {
length = 32
letters = true
digits = true
symbols = false # Symbols recipe includes @, which can't be used in a MySQL password
}
}
resource "onepassword_item" "db_credentials" {
title = "Wordpress MySQL RDS"
vault = data.onepassword_vault.vault.uuid
category = "database"
type = "mysql"
hostname = aws_db_instance.db_instance.address
port = local.rds_credentials.port
database = local.rds_credentials.database
username = local.rds_credentials.username
password = onepassword_item.db_password.password
} The ugly part of this workaround is the fact that it generates an additional entry in the vault, but I prefer it over something like |
Would love to get this working as well. Does seem like the "Database" category's terraform-provider-onepassword/internal/onepassword/cli/utils.go Lines 54 to 68 in 69451ed
|
Your environment
Terraform Provider Version: 1.4.0
Connect Server Version:
CLI Version: 2.24.0
OS: macOS 14.2.1
Terraform Version: 1.6.3
What happened?
Using the following config, the
password
isn't being populated:What did you expect to happen?
I expected the following
onepassword_item
to generate apassword
value when only usepassword_recipe
:Steps to reproduce
Notes & Logs
Screen.Recording.2024-01-07.at.3.27.56.PM.mov
The text was updated successfully, but these errors were encountered: