{ "version": 4, "terraform_version": "1.11.4", "serial": 11, "lineage": "15e0900c-88bc-9754-4600-e3977d018ba0", "outputs": {}, "resources": [ { "mode": "managed", "type": "nomad_job", "name": "app", "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 # Specifies the datacenter where this job should be run\n # This can be omitted and it will default to [\"*\"]\n datacenters = [\"*\"]\n\n meta {\n # User-defined key/value pairs that can be used in your jobs.\n # You can also use this meta block within Group and Task levels.\n foo = \"bar\"\n }\n\n # A group defines a series of tasks that should be co-located\n # on the same client (host). All tasks within a group will be\n # placed on the same host.\n group \"servers\" {\n\n # Specifies the number of instances of this group that should be running.\n # Use this to scale or parallelize your job.\n # This can be omitted and it will default to 1.\n count = 1\n\n network {\n port \"www\" {\n to = 8002\n }\n }\n\n service {\n provider = \"nomad\"\n port = \"www\"\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}\n", "json": null, "modify_index": "1133", "name": "hello-world", "namespace": "default", "policy_override": null, "purge_on_destroy": null, "read_allocation_ids": false, "region": "global", "rerun_if_dead": false, "status": "pending", "task_groups": [ { "count": 1, "meta": {}, "name": "servers", "task": [ { "driver": "docker", "meta": {}, "name": "web", "volume_mounts": null } ], "volumes": null } ], "timeouts": null, "type": "service" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsInVwZGF0ZSI6MzAwMDAwMDAwMDAwfX0=" } ] } ], "check_results": null }