Skip to content

Commit

Permalink
Switch from latest -> image_id
Browse files Browse the repository at this point in the history
former is deprecated
  • Loading branch information
captn3m0 committed Dec 26, 2022
1 parent 8a0ead5 commit 10ba575
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docker/got.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data "docker_registry_image" "gotviz" {
# }
# resource "docker_container" "gotviz" {
# name = "gotviz"
# image = "${docker_image.gotviz.latest}"
# image = "${docker_image.gotviz.image_id}"
# labels = "${merge(
# local.traefik_common_labels, map(
# "traefik.port", 8080,
Expand Down
2 changes: 1 addition & 1 deletion docker/lychee.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# resource "docker_container" "lychee" {
# name = "lychee"
# image = "${docker_image.lychee.latest}"
# image = "${docker_image.lychee.image_id}"
# restart = "unless-stopped"
# destroy_grace_seconds = 10
# must_run = true
Expand Down
2 changes: 1 addition & 1 deletion docker/ubooquity.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

resource "docker_container" "ubooquity" {
name = "ubooquity"
image = docker_image.ubooquity.latest
image = docker_image.ubooquity.image_id

restart = "unless-stopped"
destroy_grace_seconds = 30
Expand Down
7 changes: 2 additions & 5 deletions media/emby.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {

resource "docker_container" "emby" {
name = "emby"
image = docker_image.emby.latest
image = docker_image.emby.image_id

volumes {
host_path = "/mnt/xwing/config/emby"
Expand All @@ -36,10 +36,7 @@ resource "docker_container" "emby" {
destroy_grace_seconds = 10
must_run = true

devices {
host_path = "/dev/dri"
container_path = "/dev/dri"
}
gpus = "all"

# Running as lounge:tatooine
env = [
Expand Down
2 changes: 1 addition & 1 deletion media/lidarr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {

resource "docker_container" "lidarr" {
name = "lidarr"
image = docker_image.lidarr.latest
image = docker_image.lidarr.image_id

dynamic "labels" {
for_each = local.lidarr_labels
Expand Down
2 changes: 1 addition & 1 deletion media/transmission.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {

resource "docker_container" "transmission" {
name = "transmission"
image = docker_image.transmission.latest
image = docker_image.transmission.image_id

dynamic "labels" {
for_each = local.transmission_labels
Expand Down
2 changes: 1 addition & 1 deletion modules/container/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "docker_container" "container" {
name = var.name
image = docker_image.image.latest
image = docker_image.image.image_id

dynamic "ports" {
for_each = var.ports
Expand Down
2 changes: 1 addition & 1 deletion modules/image/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ resource "docker_image" "image" {
}

output "image" {
value = docker_image.image.latest
value = docker_image.image.image_id
}

2 changes: 1 addition & 1 deletion modules/outline/redis.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "docker_container" "redis" {
name = "outline-redis"
image = "${docker_image.redis.latest}"
image = "${docker_image.redis.image_id}"

volumes {
host_path = "/mnt/xwing/cache/outline"
Expand Down
2 changes: 1 addition & 1 deletion monitoring/act.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data "docker_registry_image" "act-exporter" {

resource "docker_container" "act-exporter" {
name = "act-exporter"
image = docker_image.act-exporter.latest
image = docker_image.act-exporter.image_id

entrypoint = ["/usr/local/bin/node", "server.js"]

Expand Down
2 changes: 1 addition & 1 deletion monitoring/prometheus.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "docker_container" "prometheus" {
name = "prometheus"
image = docker_image.prometheus.latest
image = docker_image.prometheus.image_id

# prometheus:prometheus
user = "985:983"
Expand Down
2 changes: 1 addition & 1 deletion timemachine/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resource "docker_image" "timemachine" {

resource "docker_container" "timemachine" {
name = "timemachine"
image = docker_image.timemachine.latest
image = docker_image.timemachine.image_id

volumes {
host_path = "/mnt/xwing/data/timemachine"
Expand Down

0 comments on commit 10ba575

Please sign in to comment.