Skip to content

Commit

Permalink
fix: remove empty string from replicas output lists (#194)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Kaipov <andreykaipov@users.noreply.github.com>
Co-authored-by: Morgante Pell <morgantep@google.com>
  • Loading branch information
3 people committed Mar 19, 2021
1 parent ec0911c commit e14fc7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions modules/mysql/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ output "instance_service_account_email_address" {

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

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

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

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

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

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

Expand Down
12 changes: 6 additions & 6 deletions modules/postgresql/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,32 @@ output "instance_service_account_email_address" {

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

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

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

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

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

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

Expand Down

0 comments on commit e14fc7a

Please sign in to comment.