From 4a6f69bb323427a057edae44ec18bc5567d7c6b7 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Fri, 19 Apr 2024 17:40:27 +0700 Subject: [PATCH] Create sanitech_continuous_learning.tf --- func/sanitech_continuous_learning.tf | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 func/sanitech_continuous_learning.tf diff --git a/func/sanitech_continuous_learning.tf b/func/sanitech_continuous_learning.tf new file mode 100644 index 0000000..f7c0dbc --- /dev/null +++ b/func/sanitech_continuous_learning.tf @@ -0,0 +1,36 @@ +resource "aws_sagemaker_endpoint_configuration" "example" { + name = "example-endpoint-config" + + production_variants { + variant_name = "AllTraffic" + + model_name = aws_sagemaker_model.example.id + initial_instance_count = 1 + instance_type = "ml.m4.xlarge" + initial_variant_weight = 1 + } +} + +resource "aws_sagemaker_model" "example" { + name = "example-model" + + primary_container { + image = aws_ecr_repository.example.repository_url + + model_data_url = aws_s3_bucket_object.model_data.id + } +} + +resource "aws_s3_bucket_object" "model_data" { + bucket = aws_s3_bucket.example.id + key = "model.tar.gz" + source = "model.tar.gz" +} + +resource "aws_s3_bucket" "example" { +bucket = "example-bucket" +} + +resource "aws_ecr_repository" "example" { + name = "example-repository" +}