From 7a75ea575db052e8db962320c8b06dd2bb99abe3 Mon Sep 17 00:00:00 2001
From: Matthew Baggett <matthew@baggett.me>
Date: Sat, 23 Nov 2024 17:55:01 +0100
Subject: [PATCH] Output docker_service consistently.

---
 docker/service/outputs.tf             | 4 ++++
 products/apt-caching-proxy/outputs.tf | 3 +++
 products/nginx/outputs.tf             | 3 +++
 products/pgbackweb/outputs.tf         | 7 +++++++
 products/postgres/outputs.tf          | 3 +++
 products/quassel/outputs.tf           | 8 +++++++-
 products/redis/outputs.tf             | 3 +++
 7 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 products/apt-caching-proxy/outputs.tf
 create mode 100644 products/nginx/outputs.tf
 create mode 100644 products/pgbackweb/outputs.tf

diff --git a/docker/service/outputs.tf b/docker/service/outputs.tf
index 23c8139..52d9514 100644
--- a/docker/service/outputs.tf
+++ b/docker/service/outputs.tf
@@ -10,4 +10,8 @@ output "ports" {
 
 output "volumes" {
   value = docker_service.instance.task_spec[0].container_spec[0].mounts[*].source
+}
+
+output "docker_service" {
+  value = docker_service.instance
 }
\ No newline at end of file
diff --git a/products/apt-caching-proxy/outputs.tf b/products/apt-caching-proxy/outputs.tf
new file mode 100644
index 0000000..37de56f
--- /dev/null
+++ b/products/apt-caching-proxy/outputs.tf
@@ -0,0 +1,3 @@
+output "docker_service" {
+  value = module.ap.docker_service
+}
\ No newline at end of file
diff --git a/products/nginx/outputs.tf b/products/nginx/outputs.tf
new file mode 100644
index 0000000..f58999b
--- /dev/null
+++ b/products/nginx/outputs.tf
@@ -0,0 +1,3 @@
+output "docker_service" {
+  value = docker_service.nginx
+}
\ No newline at end of file
diff --git a/products/pgbackweb/outputs.tf b/products/pgbackweb/outputs.tf
new file mode 100644
index 0000000..4b42d29
--- /dev/null
+++ b/products/pgbackweb/outputs.tf
@@ -0,0 +1,7 @@
+output "docker_service" {
+  value = module.pgbackweb.docker_service
+}
+
+output "postgres_service" {
+  value = module.postgres.docker_service
+}
\ No newline at end of file
diff --git a/products/postgres/outputs.tf b/products/postgres/outputs.tf
index b7bf837..0b03c3a 100644
--- a/products/postgres/outputs.tf
+++ b/products/postgres/outputs.tf
@@ -12,4 +12,7 @@ output "service_name" {
 }
 output "ports" {
   value = module.service.ports
+}
+output "docker_service" {
+  value = module.service.docker_service
 }
\ No newline at end of file
diff --git a/products/quassel/outputs.tf b/products/quassel/outputs.tf
index d77d55a..7fe1b0a 100644
--- a/products/quassel/outputs.tf
+++ b/products/quassel/outputs.tf
@@ -1,4 +1,4 @@
-output "quassel" {
+output "configuration" {
   value = {
     database = {
       username = module.postgres.username
@@ -10,4 +10,10 @@ output "quassel" {
       port = module.service.ports[0]
     }
   }
+}
+output "docker_service" {
+  value = module.service
+}
+output "postgres_service" {
+  value = module.postgres
 }
\ No newline at end of file
diff --git a/products/redis/outputs.tf b/products/redis/outputs.tf
index 35c2fc0..f09389c 100644
--- a/products/redis/outputs.tf
+++ b/products/redis/outputs.tf
@@ -6,4 +6,7 @@ output "service_name" {
 }
 output "ports" {
   value = module.service.ports
+}
+output "docker_service" {
+  value = module.service.docker_service
 }
\ No newline at end of file