Skip to content

Commit

Permalink
Remove Blue resources (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 authored Oct 6, 2024
1 parent 4717ca2 commit 1da0101
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
1 change: 0 additions & 1 deletion terraform/backupbot.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "nomad_job" "backupbot" {
provider = nomad.green
count = 0
depends_on = [nomad_job.mysql_green]

Expand Down
37 changes: 1 addition & 36 deletions terraform/mediawiki.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ resource "nomad_job" "mysql_green" {
}
}

resource "nomad_job" "memcached" {
jobspec = file("../jobs/memcached.nomad")
detach = false

hcl2 {
allow_fs = true
}
}

resource "nomad_job" "memcached_green" {
provider = nomad.green
jobspec = file("../jobs/memcached.nomad")
Expand All @@ -37,23 +28,10 @@ resource "nomad_job" "memcached_green" {
}
}

resource "nomad_job" "fastcgi" {
depends_on = [
nomad_job.memcached,
]

jobspec = file("../jobs/fastcgi.nomad")
detach = false

hcl2 {
allow_fs = true
}
}

resource "nomad_job" "fastcgi_green" {
provider = nomad.green
depends_on = [
nomad_job.memcached,
nomad_job.memcached_green,
]

jobspec = file("../jobs/fastcgi.nomad")
Expand All @@ -68,19 +46,6 @@ resource "nomad_job" "fastcgi_green" {
}
}

resource "nomad_job" "http" {
depends_on = [
nomad_csi_volume_registration.caddycerts,
]

jobspec = file("../jobs/http.nomad")
detach = false

hcl2 {
allow_fs = true
}
}

resource "nomad_job" "http_green" {
provider = nomad.green
# TODO Replace EBS CSI with S3 CSI or something
Expand Down
32 changes: 0 additions & 32 deletions terraform/volumes.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
resource "nomad_job" "plugin-ebs-controller" {
jobspec = file("../jobs/plugin-ebs-controller.nomad")

hcl2 {
allow_fs = true
}
}

resource "nomad_job" "plugin-ebs-nodes" {
jobspec = file("../jobs/plugin-ebs-nodes.nomad")

hcl2 {
allow_fs = true
}
}

resource "nomad_job" "plugin_ebs_controller_green" {
provider = nomad.green
jobspec = file("../jobs/plugin-ebs-controller.nomad")
Expand Down Expand Up @@ -45,22 +29,6 @@ resource "nomad_csi_volume_registration" "mysql_green" {
}
}

import {
id = "caddycerts@default"
to = nomad_csi_volume_registration.caddycerts
}
resource "nomad_csi_volume_registration" "caddycerts" {
plugin_id = "aws-ebs0"
volume_id = "caddycerts"
name = "caddycerts"
external_id = data.terraform_remote_state.aws.outputs.ebs_caddycerts_id

capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
}

resource "nomad_csi_volume_registration" "caddycerts_green" {
provider = nomad.green
plugin_id = "aws-ebs0"
Expand Down

0 comments on commit 1da0101

Please sign in to comment.