Skip to content

Commit 0f16ffb

Browse files
authored
fix: fix output error for hostname and port (#256)
1 parent 5595e4a commit 0f16ffb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ output "cbr_rule_ids" {
4141

4242
output "hostname" {
4343
description = "Database hostname. Only contains value when var.service_credential_names or var.users are set."
44-
value = length(var.service_credential_names) > 0 ? nonsensitive(ibm_resource_key.service_credentials[keys(var.service_credential_names)[0]].credentials["connection.postgres.hosts.0.hostname"]) : length(var.users) > 0 ? nonsensitive(flatten(data.ibm_database_connection.database_connection[0].postgres[0].hosts[0].hostname)) : null
44+
value = length(var.service_credential_names) > 0 ? nonsensitive(ibm_resource_key.service_credentials[keys(var.service_credential_names)[0]].credentials["connection.postgres.hosts.0.hostname"]) : length(var.users) > 0 ? data.ibm_database_connection.database_connection[0].postgres[0].hosts[0].hostname : null
4545
}
4646

4747
output "port" {
4848
description = "Database port. Only contains value when var.service_credential_names or var.users are set."
49-
value = length(var.service_credential_names) > 0 ? nonsensitive(ibm_resource_key.service_credentials[keys(var.service_credential_names)[0]].credentials["connection.postgres.hosts.0.port"]) : length(var.users) > 0 ? nonsensitive(flatten(data.ibm_database_connection.database_connection[0].postgres[0].hosts[0].port)) : null
49+
value = length(var.service_credential_names) > 0 ? nonsensitive(ibm_resource_key.service_credentials[keys(var.service_credential_names)[0]].credentials["connection.postgres.hosts.0.port"]) : length(var.users) > 0 ? data.ibm_database_connection.database_connection[0].postgres[0].hosts[0].port : null
5050
}

0 commit comments

Comments
 (0)