{ "version": 4, "terraform_version": "1.11.4", "serial": 197, "lineage": "15e0900c-88bc-9754-4600-e3977d018ba0", "outputs": {}, "resources": [ { "mode": "managed", "type": "nomad_job", "name": "dns_server", "provider": "provider[\"registry.terraform.io/hashicorp/nomad\"]", "instances": [ { "schema_version": 0, "attributes": { "allocation_ids": [], "datacenters": [], "deployment_id": null, "deployment_status": null, "deregister_on_destroy": true, "deregister_on_id_change": true, "detach": true, "hcl2": [], "id": "dns-server", "jobspec": "job \"dns-server\" {\n group \"dns\" {\n count = 1\n\n network {\n port \"dns\" {\n static = 53\n }\n }\n\n task \"dnsmasq\" {\n driver = \"docker\"\n\n config {\n image = \"dockurr/dnsmasq:latest\"\n ports = [\"dns\"]\n args = [\n \"--address=/othrayte.one/2401:d002:b803:a000::223\",\n \"--address=/*.othrayte.one/2401:d002:b803:a000::223\"\n ]\n }\n\n resources {\n cpu = 500\n memory = 256\n }\n }\n }\n}", "json": null, "modify_index": "9394", "name": "dns-server", "namespace": "default", "policy_override": null, "purge_on_destroy": null, "read_allocation_ids": false, "region": "global", "rerun_if_dead": false, "status": "running", "task_groups": [ { "count": 1, "meta": {}, "name": "dns", "task": [ { "driver": "docker", "meta": {}, "name": "dnsmasq", "volume_mounts": [] } ], "volumes": [] } ], "timeouts": null, "type": "service" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=" } ] }, { "mode": "managed", "type": "nomad_job", "name": "hello_world", "provider": "provider[\"registry.terraform.io/hashicorp/nomad\"]", "instances": [ { "schema_version": 0, "attributes": { "allocation_ids": [], "datacenters": [ "*" ], "deployment_id": null, "deployment_status": null, "deregister_on_destroy": true, "deregister_on_id_change": true, "detach": true, "hcl2": [], "id": "hello-world", "jobspec": "job \"hello-world\" {\n group \"servers\" {\n network {\n port \"www\" {\n to = -1\n }\n }\n\n service {\n name = \"hello-world\"\n port = \"www\"\n \n tags = [\n \"traefik.enable=true\",\n ]\n\n check {\n name = \"alive\"\n type = \"tcp\"\n port = \"www\"\n interval = \"10s\"\n timeout = \"2s\"\n }\n }\n \n\n # Tasks are individual units of work that are run by Nomad.\n task \"web\" {\n # This particular task starts a simple web server within a Docker container\n driver = \"docker\"\n\n config {\n image = \"busybox:1\"\n command = \"httpd\"\n args = [\"-v\", \"-f\", \"-p\", \"${NOMAD_PORT_www}\", \"-h\", \"/local\"]\n ports = [\"www\"]\n }\n\n template {\n data = \u003c\u003c-EOF\n \u003ch1\u003eHello, Nomad!\u003c/h1\u003e\n \u003cul\u003e\n \u003cli\u003eTask: {{env \"NOMAD_TASK_NAME\"}}\u003c/li\u003e\n \u003cli\u003eGroup: {{env \"NOMAD_GROUP_NAME\"}}\u003c/li\u003e\n \u003cli\u003eJob: {{env \"NOMAD_JOB_NAME\"}}\u003c/li\u003e\n \u003cli\u003eMetadata value for foo: {{env \"NOMAD_META_foo\"}}\u003c/li\u003e\n \u003cli\u003eCurrently running on port: {{env \"NOMAD_PORT_www\"}}\u003c/li\u003e\n \u003c/ul\u003e\n EOF\n destination = \"local/index.html\"\n }\n\n # Specify the maximum resources required to run the task\n resources {\n cpu = 50\n memory = 64\n }\n }\n }\n}", "json": null, "modify_index": "8507", "name": "hello-world", "namespace": "default", "policy_override": null, "purge_on_destroy": null, "read_allocation_ids": false, "region": "global", "rerun_if_dead": false, "status": "running", "task_groups": [ { "count": 1, "meta": {}, "name": "servers", "task": [ { "driver": "docker", "meta": {}, "name": "web", "volume_mounts": [] } ], "volumes": [] } ], "timeouts": null, "type": "service" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=" } ] }, { "mode": "managed", "type": "nomad_job", "name": "traefik", "provider": "provider[\"registry.terraform.io/hashicorp/nomad\"]", "instances": [ { "schema_version": 0, "attributes": { "allocation_ids": [], "datacenters": [ "*" ], "deployment_id": null, "deployment_status": null, "deregister_on_destroy": true, "deregister_on_id_change": true, "detach": true, "hcl2": [], "id": "traefik", "jobspec": "job \"traefik\" {\n group \"traefik\" {\n network {\n port \"http\" {\n static = 80\n }\n\n port \"https\" {\n static = 443\n }\n\n port \"api\" {\n static = 8081\n }\n }\n\n service {\n name = \"traefik\"\n\n tags = [\n \"traefik.enable=true\",\n \"traefik.http.routers.traefik.rule=Host(`traefik.othrayte.one`)\",\n \"traefik.http.routers.traefik.service=traefik\",\n \"traefik.http.services.traefik.loadbalancer.server.port=8081\",\n ]\n\n check {\n name = \"alive\"\n type = \"tcp\"\n port = \"http\"\n interval = \"10s\"\n timeout = \"2s\"\n }\n }\n\n volume \"traefik\" {\n type = \"host\"\n read_only = false\n source = \"traefik\"\n }\n\n task \"traefik\" {\n driver = \"docker\"\n\n config {\n image = \"traefik:v3.3\"\n network_mode = \"host\"\n\n volumes = [\n \"local/traefik.yml:/etc/traefik/traefik.yml\",\n \"local/configs/:/etc/traefik/configs/\"\n ]\n }\n\n volume_mount {\n volume = \"traefik\"\n destination = \"/opt/traefik\"\n read_only = false\n }\n\n template {\n data = \u003c\u003cEOF\nentryPoints:\n web:\n address: \":80\"\n http:\n redirections:\n entryPoint:\n to: websecure\n scheme: https\n websecure:\n address: \":443\"\n http:\n middlewares:\n - auth@file\n tls:\n certResolver: letsencrypt\n traefik:\n address: \":8081\"\n\napi:\n dashboard: true\n insecure: true\n\nproviders:\n file:\n directory: \"/etc/traefik/configs/\"\n\n consulCatalog:\n prefix: \"traefik\"\n exposedByDefault: false\n defaultRule: {{\"Host(`{{ .Name }}.othrayte.one`)\"}}\n endpoint:\n address: \"127.0.0.1:8500\"\n scheme: \"http\"\n\ncertificatesResolvers:\n letsencrypt:\n acme:\n email: \"othrayte@gmail.com\"\n storage: \"/opt/traefik/acme.json\"\n httpChallenge:\n entryPoint: web\nEOF\n\n destination = \"local/traefik.yml\"\n }\n\n template {\n data = \u003c\u003cEOF\nhttp:\n middlewares:\n auth:\n basicAuth:\n users:\n - \"othrayte:$apr1$7PqVUfNm$Go/SNo6y331KYDnQdOLIt/\"\n \n routers:\n nomadui:\n rule: \"Host(`nomad.othrayte.one`)\"\n service: nomadui\n consului:\n rule: \"Host(`consul.othrayte.one`)\"\n service: consului\n\n services:\n nomadui:\n loadBalancer:\n servers:\n - url: \"http://127.0.0.1:4646\"\n consului:\n loadBalancer:\n servers:\n - url: \"http://127.0.0.1:8500\"\nEOF\n\n destination = \"local/configs/nomad.yml\"\n }\n\n resources {\n cpu = 100\n memory = 128\n }\n }\n }\n}\n", "json": null, "modify_index": "9314", "name": "traefik", "namespace": "default", "policy_override": null, "purge_on_destroy": null, "read_allocation_ids": false, "region": "global", "rerun_if_dead": false, "status": "running", "task_groups": [ { "count": 1, "meta": {}, "name": "traefik", "task": [ { "driver": "docker", "meta": {}, "name": "traefik", "volume_mounts": [ { "destination": "/opt/traefik", "read_only": false, "volume": "traefik" } ] } ], "volumes": [ { "name": "traefik", "read_only": false, "source": "traefik", "type": "host" } ] } ], "timeouts": null, "type": "service" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=" } ] }, { "mode": "managed", "type": "nomad_job", "name": "webapp", "provider": "provider[\"registry.terraform.io/hashicorp/nomad\"]", "instances": [ { "schema_version": 0, "attributes": { "allocation_ids": [], "datacenters": [ "*" ], "deployment_id": null, "deployment_status": null, "deregister_on_destroy": true, "deregister_on_id_change": true, "detach": true, "hcl2": [], "id": "demo-webapp", "jobspec": "job \"demo-webapp\" {\n group \"demo\" {\n count = 3\n\n network {\n port \"http\"{\n to = -1\n }\n }\n\n service {\n name = \"demo-webapp\"\n port = \"http\"\n\n tags = [\n \"traefik.enable=true\",\n ]\n\n check {\n type = \"http\"\n path = \"/\"\n interval = \"2s\"\n timeout = \"2s\"\n }\n }\n\n task \"server\" {\n env {\n PORT = \"${NOMAD_PORT_http}\"\n NODE_IP = \"${NOMAD_IP_http}\"\n }\n\n driver = \"docker\"\n\n config {\n image = \"hashicorp/demo-webapp-lb-guide\"\n ports = [\"http\"]\n }\n }\n }\n}", "json": null, "modify_index": "8567", "name": "demo-webapp", "namespace": "default", "policy_override": null, "purge_on_destroy": null, "read_allocation_ids": false, "region": "global", "rerun_if_dead": false, "status": "running", "task_groups": [ { "count": 3, "meta": {}, "name": "demo", "task": [ { "driver": "docker", "meta": {}, "name": "server", "volume_mounts": [] } ], "volumes": [] } ], "timeouts": null, "type": "service" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=" } ] } ], "check_results": null }