Add hcl extention for nomad files
to get syntax highlighting be default.
This commit is contained in:
@@ -4,13 +4,13 @@ provider "nomad" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "hello_world" {
|
resource "nomad_job" "hello_world" {
|
||||||
jobspec = file("hello-world.nomad")
|
jobspec = file("hello-world.nomad.hcl")
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "traefik" {
|
resource "nomad_job" "traefik" {
|
||||||
jobspec = file("traefik.nomad")
|
jobspec = file("traefik.nomad.hcl")
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "webapp" {
|
resource "nomad_job" "webapp" {
|
||||||
jobspec = file("webapp.nomad")
|
jobspec = file("webapp.nomad.hcl")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "1.11.4",
|
"terraform_version": "1.11.4",
|
||||||
"serial": 142,
|
"serial": 143,
|
||||||
"lineage": "15e0900c-88bc-9754-4600-e3977d018ba0",
|
"lineage": "15e0900c-88bc-9754-4600-e3977d018ba0",
|
||||||
"outputs": {},
|
"outputs": {},
|
||||||
"resources": [
|
"resources": [
|
||||||
@@ -70,7 +70,9 @@
|
|||||||
"schema_version": 0,
|
"schema_version": 0,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"allocation_ids": [],
|
"allocation_ids": [],
|
||||||
"datacenters": [],
|
"datacenters": [
|
||||||
|
"*"
|
||||||
|
],
|
||||||
"deployment_id": null,
|
"deployment_id": null,
|
||||||
"deployment_status": null,
|
"deployment_status": null,
|
||||||
"deregister_on_destroy": true,
|
"deregister_on_destroy": true,
|
||||||
@@ -123,7 +125,9 @@
|
|||||||
"schema_version": 0,
|
"schema_version": 0,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"allocation_ids": [],
|
"allocation_ids": [],
|
||||||
"datacenters": [],
|
"datacenters": [
|
||||||
|
"*"
|
||||||
|
],
|
||||||
"deployment_id": null,
|
"deployment_id": null,
|
||||||
"deployment_status": null,
|
"deployment_status": null,
|
||||||
"deregister_on_destroy": true,
|
"deregister_on_destroy": true,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "1.11.4",
|
"terraform_version": "1.11.4",
|
||||||
"serial": 139,
|
"serial": 142,
|
||||||
"lineage": "15e0900c-88bc-9754-4600-e3977d018ba0",
|
"lineage": "15e0900c-88bc-9754-4600-e3977d018ba0",
|
||||||
"outputs": {},
|
"outputs": {},
|
||||||
"resources": [
|
"resources": [
|
||||||
@@ -78,9 +78,9 @@
|
|||||||
"detach": true,
|
"detach": true,
|
||||||
"hcl2": [],
|
"hcl2": [],
|
||||||
"id": "traefik",
|
"id": "traefik",
|
||||||
"jobspec": "job \"traefik\" {\n group \"traefik\" {\n network {\n port \"http\" {\n static = 80\n }\n\n port \"api\" {\n static = 8081\n }\n }\n\n service {\n name = \"traefik\"\n\n tags = [\n \"traefik.enable=true\",\n ]\n\n check {\n name = \"alive\"\n type = \"tcp\"\n port = \"http\"\n interval = \"10s\"\n timeout = \"2s\"\n }\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 template {\n data = \u003c\u003cEOF\nentryPoints:\n http:\n address: \":80\"\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\"\nEOF\n\n destination = \"local/traefik.yml\"\n }\n\n template {\n data = \u003c\u003cEOF\nhttp:\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",
|
"jobspec": "job \"traefik\" {\n group \"traefik\" {\n network {\n port \"http\" {\n static = 80\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 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 template {\n data = \u003c\u003cEOF\nentryPoints:\n http:\n address: \":80\"\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\"\nEOF\n\n destination = \"local/traefik.yml\"\n }\n\n template {\n data = \u003c\u003cEOF\nhttp:\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,
|
"json": null,
|
||||||
"modify_index": "8559",
|
"modify_index": "8568",
|
||||||
"name": "traefik",
|
"name": "traefik",
|
||||||
"namespace": "default",
|
"namespace": "default",
|
||||||
"policy_override": null,
|
"policy_override": null,
|
||||||
@@ -123,9 +123,7 @@
|
|||||||
"schema_version": 0,
|
"schema_version": 0,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"allocation_ids": [],
|
"allocation_ids": [],
|
||||||
"datacenters": [
|
"datacenters": [],
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"deployment_id": null,
|
"deployment_id": null,
|
||||||
"deployment_status": null,
|
"deployment_status": null,
|
||||||
"deregister_on_destroy": true,
|
"deregister_on_destroy": true,
|
||||||
@@ -133,9 +131,9 @@
|
|||||||
"detach": true,
|
"detach": true,
|
||||||
"hcl2": [],
|
"hcl2": [],
|
||||||
"id": "demo-webapp",
|
"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 \"traefik.http.routers.http.rule=Host(`demo-webapp.othrayte.one`)\",\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}",
|
"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,
|
"json": null,
|
||||||
"modify_index": "8396",
|
"modify_index": "8567",
|
||||||
"name": "demo-webapp",
|
"name": "demo-webapp",
|
||||||
"namespace": "default",
|
"namespace": "default",
|
||||||
"policy_override": null,
|
"policy_override": null,
|
||||||
|
|||||||
Reference in New Issue
Block a user