Skip to content

Commit

Permalink
Create main_sage.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
try-panwiac authored Aug 30, 2024
1 parent aca91da commit 64c2eb4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ai/main_sage.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
resource "aws_sagemaker_model" "example" {
name = "my-model"
execution_role_arn = aws_iam_role.example.arn

primary_container {
image = data.aws_sagemaker_prebuilt_ecr_image.test.registry_path
}
}

resource "aws_iam_role" "example" {
assume_role_policy = data.aws_iam_policy_document.assume_role.json
}

data "aws_iam_policy_document" "assume_role" {
statement {
actions = ["sts:AssumeRole"]

principals {
type = "Service"
identifiers = ["sagemaker.amazonaws.com"]
}
}
}

data "aws_sagemaker_prebuilt_ecr_image" "test" {
repository_name = "kmeans"
}

0 comments on commit 64c2eb4

Please sign in to comment.