diff --git a/terraform/backupbot.tf b/terraform/backupbot.tf index e2dc105..5cb148b 100644 --- a/terraform/backupbot.tf +++ b/terraform/backupbot.tf @@ -1,5 +1,4 @@ resource "nomad_job" "backupbot" { - provider = nomad.green count = 0 depends_on = [nomad_job.mysql_green] diff --git a/terraform/mediawiki.tf b/terraform/mediawiki.tf index 7c09782..b282c3b 100644 --- a/terraform/mediawiki.tf +++ b/terraform/mediawiki.tf @@ -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") @@ -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") @@ -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 diff --git a/terraform/volumes.tf b/terraform/volumes.tf index 6b4ae9a..794772d 100644 --- a/terraform/volumes.tf +++ b/terraform/volumes.tf @@ -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") @@ -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"