Skip to content

Commit e14fc7a

Browse files
fix: remove empty string from replicas output lists (#194)
Co-authored-by: Andrey Kaipov <[email protected]> Co-authored-by: Morgante Pell <[email protected]>
1 parent ec0911c commit e14fc7a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

modules/mysql/outputs.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,32 @@ output "instance_service_account_email_address" {
5757

5858
// Replicas
5959
output "replicas_instance_first_ip_addresses" {
60-
value = concat([for r in google_sql_database_instance.replicas : r.ip_address], [""])
60+
value = [for r in google_sql_database_instance.replicas : r.ip_address]
6161
description = "The first IPv4 addresses of the addresses assigned for the replica instances"
6262
}
6363

6464
output "replicas_instance_connection_names" {
65-
value = concat([for r in google_sql_database_instance.replicas : r.connection_name], [""])
65+
value = [for r in google_sql_database_instance.replicas : r.connection_name]
6666
description = "The connection names of the replica instances to be used in connection strings"
6767
}
6868

6969
output "replicas_instance_self_links" {
70-
value = concat([for r in google_sql_database_instance.replicas : r.self_link], [""])
70+
value = [for r in google_sql_database_instance.replicas : r.self_link]
7171
description = "The URIs of the replica instances"
7272
}
7373

7474
output "replicas_instance_server_ca_certs" {
75-
value = concat([for r in google_sql_database_instance.replicas : r.server_ca_cert], [""])
75+
value = [for r in google_sql_database_instance.replicas : r.server_ca_cert]
7676
description = "The CA certificates information used to connect to the replica instances via SSL"
7777
}
7878

7979
output "replicas_instance_service_account_email_addresses" {
80-
value = concat([for r in google_sql_database_instance.replicas : r.service_account_email_address], [""])
80+
value = [for r in google_sql_database_instance.replicas : r.service_account_email_address]
8181
description = "The service account email addresses assigned to the replica instances"
8282
}
8383

8484
output "read_replica_instance_names" {
85-
value = concat([for r in google_sql_database_instance.replicas : r.name], [""])
85+
value = [for r in google_sql_database_instance.replicas : r.name]
8686
description = "The instance names for the read replica instances"
8787
}
8888

modules/postgresql/outputs.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,32 +62,32 @@ output "instance_service_account_email_address" {
6262

6363
// Replicas
6464
output "replicas_instance_first_ip_addresses" {
65-
value = concat([for r in google_sql_database_instance.replicas : r.ip_address], [""])
65+
value = [for r in google_sql_database_instance.replicas : r.ip_address]
6666
description = "The first IPv4 addresses of the addresses assigned for the replica instances"
6767
}
6868

6969
output "replicas_instance_connection_names" {
70-
value = concat([for r in google_sql_database_instance.replicas : r.connection_name], [""])
70+
value = [for r in google_sql_database_instance.replicas : r.connection_name]
7171
description = "The connection names of the replica instances to be used in connection strings"
7272
}
7373

7474
output "replicas_instance_self_links" {
75-
value = concat([for r in google_sql_database_instance.replicas : r.self_link], [""])
75+
value = [for r in google_sql_database_instance.replicas : r.self_link]
7676
description = "The URIs of the replica instances"
7777
}
7878

7979
output "replicas_instance_server_ca_certs" {
80-
value = concat([for r in google_sql_database_instance.replicas : r.server_ca_cert], [""])
80+
value = [for r in google_sql_database_instance.replicas : r.server_ca_cert]
8181
description = "The CA certificates information used to connect to the replica instances via SSL"
8282
}
8383

8484
output "replicas_instance_service_account_email_addresses" {
85-
value = concat([for r in google_sql_database_instance.replicas : r.service_account_email_address], [""])
85+
value = [for r in google_sql_database_instance.replicas : r.service_account_email_address]
8686
description = "The service account email addresses assigned to the replica instances"
8787
}
8888

8989
output "read_replica_instance_names" {
90-
value = concat([for r in google_sql_database_instance.replicas : r.name], [""])
90+
value = [for r in google_sql_database_instance.replicas : r.name]
9191
description = "The instance names for the read replica instances"
9292
}
9393

0 commit comments

Comments
 (0)