Skip to content

Commit

Permalink
OPS-6304 Radomize job name for examples (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
snovikov authored Nov 8, 2024
1 parent 43105e4 commit b951ec1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions examples/titan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.73 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.6 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.73 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.6 |

## Modules

Expand All @@ -30,6 +32,7 @@
| [aws_s3_bucket.output](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket.training](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_object.data](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |
| [random_string.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
| [aws_iam_policy_document.s3_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.trust_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

Expand Down
7 changes: 6 additions & 1 deletion examples/titan/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ resource "aws_s3_object" "data" {
source = "train.jsonl"
}

resource "random_string" "this" {
length = 16
special = false
}

module "model" {
source = "../../"

name = "titan"
job_name = "titan-job-1"
job_name = "titan-job-${random_string.this.result}"
foundation_model_id = "amazon.titan-text-express-v1"
model_role_arn = aws_iam_role.this.arn

Expand Down
4 changes: 4 additions & 0 deletions examples/titan/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ terraform {
source = "hashicorp/aws"
version = "~> 5.73"
}
random = {
source = "hashicorp/random"
version = "~> 3.6"
}
}
}

0 comments on commit b951ec1

Please sign in to comment.