Skip to content

Separate input and output directory settings #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ resource "iterative_task" "task" {
cloud = "aws" # or any of: gcp, az, k8s
workdir {
input = "${path.root}/shared"
output = "${path.root}/shared"
}
script = <<-END
#!/bin/bash
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "iterative_task" "task" {
- `image` - (Optional) [Machine image](#machine-images) to run the task with.
- `parallelism` - (Optional) Number of machines to be launched in parallel.
- `workdir.input` - (Optional) Local working directory to upload.
- `workdir.output` - (Optional) Local directory to download results to (default: `workdir.input`).
- `workdir.output` - (Optional) Local directory to download results to (default: no download).
- `environment` - (Optional) Map of environment variable names and values for the task script. Empty string values are replaced with local environment values. Empty values may also be combined with a [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) name to import all matching variables.
- `timeout` - (Optional) Maximum number of seconds to run before termination.

Expand Down
3 changes: 0 additions & 3 deletions iterative/resource_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,6 @@ func resourceTaskBuild(ctx context.Context, d *schema.ResourceData, m interface{
return nil, errors.New("output directory " + directory_out + " is not empty!")
}
}
if directory_out == "" {
directory_out = directory
}

t := common.Task{
Size: common.Size{
Expand Down