Skip to content

Commit 9a780d9

Browse files
authored
task docs improvements (#402)
1 parent dceacb6 commit 9a780d9

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The Iterative Provider makes it easy to:
1010
- Rapidly move local machine learning experiments to a cloud infrastructure
1111
- Take advantage of training models on spot instances without losing any progress
1212
- Unify configuration of various cloud compute providers
13-
- Automatically destroy unused cloud resources (never forget to turn your GPU off again)
13+
- Automatically destroy unused cloud resources (compute instances are terminated on job completion/failure, and storage is removed when results are downloaded)
1414

1515
The Iterative Provider can provision resources with the following cloud providers and orchestrators:
1616

docs/guides/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "iterative_task" "task" {
3838

3939
See [the reference](https://registry.terraform.io/providers/iterative/iterative/latest/docs/resources/task) for a full list of options -- including more information on [`machine` types](https://registry.terraform.io/providers/iterative/iterative/latest/docs/resources/task#machine-type).
4040

41-
-> **Note:** The `script` argument can take any string, including a [heredoc](https://www.terraform.io/docs/language/expressions/strings.html#heredoc-strings) or the contents of a file returned by the [`file`](https://www.terraform.io/docs/language/functions/file.html) function.
41+
-> **Note:** The `script` argument must begin with a valid [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>), and can take the form of a [heredoc string](https://www.terraform.io/docs/language/expressions/strings.html#heredoc-strings) or [a `file()` function](https://www.terraform.io/docs/language/functions/file.html) function (e.g. `file("task_run.sh")`).
4242

4343
The project layout should look similar to this:
4444

docs/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,25 @@ $ terraform apply
3838
- `AWS_SECRET_ACCESS_KEY` - Secret access key.
3939
- `AWS_SESSION_TOKEN` - (Optional) Session token.
4040

41+
See the [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) for more information.
42+
4143
### Microsoft Azure
4244

4345
- `AZURE_CLIENT_ID` - Client identifier.
4446
- `AZURE_CLIENT_SECRET` - Client secret.
4547
- `AZURE_SUBSCRIPTION_ID` - Subscription identifier.
4648
- `AZURE_TENANT_ID` - Tenant identifier.
4749

50+
See the [Azure documentation](https://docs.microsoft.com/en-us/python/api/azure-identity/azure.identity.environmentcredential) for more information.
51+
4852
### Google Cloud Platform
4953

5054
- `GOOGLE_APPLICATION_CREDENTIALS` - Path to a service account JSON key file.
5155

5256
-> **Note:** you can also use `GOOGLE_APPLICATION_CREDENTIALS_DATA` with the **contents** of the service account JSON key file.
5357

58+
See the [GCP documentation](https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account) for more information.
59+
5460
### Kubernetes
5561

5662
- `KUBECONFIG` - Path to a [`kubeconfig` file](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable).

docs/resources/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "iterative_task" "task" {
3030
### Required
3131

3232
- `cloud` - (Required) Cloud provider to run the task on; valid values are `aws`, `gcp`, `az` and `k8s`.
33-
- `script` - (Required) Script to run; must begin with a valid [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>).
33+
- `script` - (Required) Script to run (relative to `workdir.input`); must begin with a valid [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>). Can use a string, including a [heredoc](https://www.terraform.io/docs/language/expressions/strings.html#heredoc-strings), or the contents of a file returned by the [`file`](https://www.terraform.io/docs/language/functions/file.html) function.
3434

3535
### Optional
3636

0 commit comments

Comments
 (0)