hashicorp / hashicorp/nomad

Include / Import External Files (split Job in more files)

Open
#7,954 7 comments 23 reactions 0 assignees View on GitHub
theme/hcl theme/jobspec type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Hi Folks,

I must start with a disclaimer, mentioning that I am new to NOMAD and might be missing something.

The question is simple:
Does HCL support some sort of include/import, so that I could split a job file among several files, for the sake of maintenance?

The scenario:
I do have one specific nomad job wich includes several Tasks. Those have some level of dependency among them, therefore we keep it within a single job. As the file is becoming somehow too big, we would like to split every Task within a separate file, including all of them on the main Job file.

Would that be possible? I have searched a little bit and found this issue, which seems somehow similar, but it is quite old (2017).
https://github.com/hashicorp/hcl/issues/187

Maybe there´s a good way to do it... I certainly could put up a script that merges files and so on... But just wanted to ensure that I am not missing any cool HCL / NOMAD feature! :-)

Would anyone has a suggestion?

BR
Pedro

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Nomad's job-file parsing documentation and the linked HCL issue to determine whether external-file composition is supported. Done would require either documented include/import behavior for splitting tasks across files or a clearly scoped feature proposal if it is not supported.

Written by the indexing model from the issue text.

Assessment

Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.