Closed guicane closed 6 months ago
When the module auto generates a root password there's no output for it so I can't throw the password in my secret manager.
generated_root_password should be available as an output just like generated_user_password is.
generated_root_password output isn't available to use.
module "sql-db_mysql" { source = "GoogleCloudPlatform/sql-db/google//modules/mysql" version = "18.2.0" name = var.mysql_instance_name project_id = var.project region = var.region zone = var.zone database_version = var.mysql_database_version deletion_protection = var.deletion_protection random_instance_name = true #master tier = var.tier edition = var.edition ip_configuration = { require_ssl = true ipv4_enabled = falseto OrgPolicy private_network = data.google_compute_network.peering_network.id allocated_ip_range = data.google_compute_global_address.sql_psc.name authorized_networks = [] } } resource "google_secret_manager_secret" "mysql_root_password" { project = var.project secret_id = "${module.sql-db_mysql.instance_name}-mysql-root-password" labels = var.user_labels replication { user_managed { replicas { location = "region-here" } } } } resource "google_secret_manager_secret_version" "mysql_root_password" { secret = google_secret_manager_secret.mysql_root_password.id secret_data = module.sql-db_mysql.generated_root_password }
terraform 1.5.7
No response
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
TL;DR
When the module auto generates a root password there's no output for it so I can't throw the password in my secret manager.
Expected behavior
generated_root_password should be available as an output just like generated_user_password is.
Observed behavior
generated_root_password output isn't available to use.
Terraform Configuration
Terraform Version
Additional information
No response