Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions service/cloudsql/logs_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,24 @@ resource "observe_dataset" "mysql_data_access_logs" {
}
}

resource "observe_link" "sql_access_logs" {
workspace = var.workspace.oid
source = each.value.source
target = each.value.target
fields = each.value.fields
label = each.key

for_each = {
"PostGresDatabaseAccess" = {
target = observe_dataset.cloud_sql_instance.oid
fields = ["database_id"]
source = observe_dataset.postgres_data_access_logs.oid
}

"MySQLDatabaseAccess" = {
target = observe_dataset.cloud_sql_instance.oid
fields = ["database_id"]
source = observe_dataset.mysql_data_access_logs.oid
}
}
}
# resource "observe_link" "sql_access_logs" {
# workspace = var.workspace.oid
# source = each.value.source
# target = each.value.target
# fields = each.value.fields
# label = each.key

# for_each = {
# "PostGresDatabaseAccess" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.postgres_data_access_logs.oid
# }

# "MySQLDatabaseAccess" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.mysql_data_access_logs.oid
# }
# }
# }
68 changes: 34 additions & 34 deletions service/cloudsql/logs_error.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,40 @@ resource "observe_dataset" "cloud_sql_logs_error" {

}

resource "observe_link" "sql_error_logs" {
workspace = var.workspace.oid
source = each.value.source
target = each.value.target
fields = each.value.fields
label = each.key

for_each = {

"DatabaseErrors" = {
target = observe_dataset.cloud_sql_instance.oid
fields = ["database_id"]
source = observe_dataset.cloud_sql_logs_error.oid
}
## If we want to create an error log for each platform
# "PostGresDatabaseAccess" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.postgres_error_logs.oid
# }

# "MySQLDatabaseError" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.mysql_error_logs.oid
# }

# "SQLServerDatabaseError" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.sqlserver_error_logs.oid
# }
}
}
# resource "observe_link" "sql_error_logs" {
# workspace = var.workspace.oid
# source = each.value.source
# target = each.value.target
# fields = each.value.fields
# label = each.key

# for_each = {

# "DatabaseErrors" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.cloud_sql_logs_error.oid
# }
# ## If we want to create an error log for each platform
# # "PostGresDatabaseAccess" = {
# # target = observe_dataset.cloud_sql_instance.oid
# # fields = ["database_id"]
# # source = observe_dataset.postgres_error_logs.oid
# # }

# # "MySQLDatabaseError" = {
# # target = observe_dataset.cloud_sql_instance.oid
# # fields = ["database_id"]
# # source = observe_dataset.mysql_error_logs.oid
# # }

# # "SQLServerDatabaseError" = {
# # target = observe_dataset.cloud_sql_instance.oid
# # fields = ["database_id"]
# # source = observe_dataset.sqlserver_error_logs.oid
# # }
# }
# }

## If we want to create an error log for each platform

Expand Down
10 changes: 5 additions & 5 deletions service/cloudsql/metrics.tf
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ resource "observe_link" "cloud_sql_metrics" {
}


"Cloud SQL Metrics Wide" = {
target = observe_dataset.cloud_sql_instance.oid
fields = ["database_id"]
source = observe_dataset.cloud_sql_metrics_wide[0].oid
}
# "Cloud SQL Metrics Wide" = {
# target = observe_dataset.cloud_sql_instance.oid
# fields = ["database_id"]
# source = observe_dataset.cloud_sql_metrics_wide[0].oid
# }
} : {}

workspace = var.workspace.oid
Expand Down