From 49c3b9ef8c4361ab3914a5c4c5d6b7fecaaea72e Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sun, 30 Apr 2023 05:44:14 +0300 Subject: [PATCH 1/4] add `include_inference_response_in` and `s3_failure_path` args --- a.txt | 80 ++++++++++ .../sagemaker/endpoint_configuration.go | 34 ++++ .../sagemaker/endpoint_configuration_test.go | 149 ++++++++++++++++++ ...maker_endpoint_configuration.html.markdown | 2 + 4 files changed, 265 insertions(+) create mode 100644 a.txt diff --git a/a.txt b/a.txt new file mode 100644 index 00000000000..fcfbdd4d269 --- /dev/null +++ b/a.txt @@ -0,0 +1,80 @@ +==> Checking that code complies with gofmt requirements... +TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerEndpointConfiguration_' -timeout 180m +=== RUN TestAccSageMakerEndpointConfiguration_basic +=== PAUSE TestAccSageMakerEndpointConfiguration_basic +=== RUN TestAccSageMakerEndpointConfiguration_nameGenerated +=== PAUSE TestAccSageMakerEndpointConfiguration_nameGenerated +=== RUN TestAccSageMakerEndpointConfiguration_namePrefix +=== PAUSE TestAccSageMakerEndpointConfiguration_namePrefix +=== RUN TestAccSageMakerEndpointConfiguration_shadowProductionVariants +=== PAUSE TestAccSageMakerEndpointConfiguration_shadowProductionVariants +=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless +=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless +=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight +=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight +=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType +=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType +=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated +=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated +=== RUN TestAccSageMakerEndpointConfiguration_kmsKeyID +=== PAUSE TestAccSageMakerEndpointConfiguration_kmsKeyID +=== RUN TestAccSageMakerEndpointConfiguration_tags +=== PAUSE TestAccSageMakerEndpointConfiguration_tags +=== RUN TestAccSageMakerEndpointConfiguration_dataCapture +=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture +=== RUN TestAccSageMakerEndpointConfiguration_disappears +=== PAUSE TestAccSageMakerEndpointConfiguration_disappears +=== RUN TestAccSageMakerEndpointConfiguration_async +=== PAUSE TestAccSageMakerEndpointConfiguration_async +=== RUN TestAccSageMakerEndpointConfiguration_async_includeInference +=== PAUSE TestAccSageMakerEndpointConfiguration_async_includeInference +=== RUN TestAccSageMakerEndpointConfiguration_async_kms +=== PAUSE TestAccSageMakerEndpointConfiguration_async_kms +=== RUN TestAccSageMakerEndpointConfiguration_Async_notif +=== PAUSE TestAccSageMakerEndpointConfiguration_Async_notif +=== RUN TestAccSageMakerEndpointConfiguration_Async_client +=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client +=== RUN TestAccSageMakerEndpointConfiguration_Async_client_failurePath +=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client_failurePath +=== RUN TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess +=== PAUSE TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess +=== CONT TestAccSageMakerEndpointConfiguration_basic +=== CONT TestAccSageMakerEndpointConfiguration_dataCapture +=== CONT TestAccSageMakerEndpointConfiguration_Async_notif +=== CONT TestAccSageMakerEndpointConfiguration_Async_client_failurePath +=== CONT TestAccSageMakerEndpointConfiguration_kmsKeyID +=== CONT TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess +=== CONT TestAccSageMakerEndpointConfiguration_disappears +=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight +=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated +=== CONT TestAccSageMakerEndpointConfiguration_async_includeInference +=== CONT TestAccSageMakerEndpointConfiguration_tags +=== CONT TestAccSageMakerEndpointConfiguration_async_kms +=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless +=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType +=== CONT TestAccSageMakerEndpointConfiguration_async +=== CONT TestAccSageMakerEndpointConfiguration_Async_client +=== CONT TestAccSageMakerEndpointConfiguration_nameGenerated +=== CONT TestAccSageMakerEndpointConfiguration_namePrefix +=== CONT TestAccSageMakerEndpointConfiguration_shadowProductionVariants +--- PASS: TestAccSageMakerEndpointConfiguration_async_kms (57.52s) +--- PASS: TestAccSageMakerEndpointConfiguration_shadowProductionVariants (59.72s) +--- PASS: TestAccSageMakerEndpointConfiguration_basic (61.30s) +--- PASS: TestAccSageMakerEndpointConfiguration_Async_client_failurePath (63.65s) +--- PASS: TestAccSageMakerEndpointConfiguration_nameGenerated (67.82s) +--- PASS: TestAccSageMakerEndpointConfiguration_async (68.90s) +--- PASS: TestAccSageMakerEndpointConfiguration_disappears (73.99s) +--- PASS: TestAccSageMakerEndpointConfiguration_Async_client (75.80s) +--- PASS: TestAccSageMakerEndpointConfiguration_Async_notif (77.01s) +--- PASS: TestAccSageMakerEndpointConfiguration_async_includeInference (79.24s) +--- PASS: TestAccSageMakerEndpointConfiguration_dataCapture (82.27s) +--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType (82.72s) +--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight (82.82s) +--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated (85.02s) +--- PASS: TestAccSageMakerEndpointConfiguration_kmsKeyID (86.78s) +--- PASS: TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess (86.86s) +--- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless (90.10s) +--- PASS: TestAccSageMakerEndpointConfiguration_namePrefix (90.11s) +--- PASS: TestAccSageMakerEndpointConfiguration_tags (132.25s) +PASS +ok github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker 134.719s diff --git a/internal/service/sagemaker/endpoint_configuration.go b/internal/service/sagemaker/endpoint_configuration.go index 1f719eeae6a..5ebfcc8f26b 100644 --- a/internal/service/sagemaker/endpoint_configuration.go +++ b/internal/service/sagemaker/endpoint_configuration.go @@ -88,6 +88,15 @@ func ResourceEndpointConfiguration() *schema.Resource { ForceNew: true, ValidateFunc: verify.ValidARN, }, + "include_inference_response_in": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice(sagemaker.AsyncNotificationTopicTypes_Values(), false), + }, + }, "success_topic": { Type: schema.TypeString, Optional: true, @@ -97,6 +106,15 @@ func ResourceEndpointConfiguration() *schema.Resource { }, }, }, + "s3_failure_path": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringMatch(regexp.MustCompile(`^(https|s3)://([^/])/?(.*)$`), ""), + validation.StringLenBetween(1, 512), + ), + }, "s3_output_path": { Type: schema.TypeString, Required: true, @@ -848,6 +866,10 @@ func expandEndpointConfigOutputConfig(configured []interface{}) *sagemaker.Async c.KmsKeyId = aws.String(v) } + if v, ok := m["s3_failure_path"].(string); ok && v != "" { + c.S3FailurePath = aws.String(v) + } + if v, ok := m["notification_config"].([]interface{}); ok && len(v) > 0 { c.NotificationConfig = expandEndpointConfigNotificationConfig(v) } @@ -872,6 +894,10 @@ func expandEndpointConfigNotificationConfig(configured []interface{}) *sagemaker c.SuccessTopic = aws.String(v) } + if v, ok := m["include_inference_response_in"].(*schema.Set); ok && v.Len() > 0 { + c.IncludeInferenceResponseIn = flex.ExpandStringSet(v) + } + return c } @@ -964,6 +990,10 @@ func flattenEndpointConfigOutputConfig(config *sagemaker.AsyncInferenceOutputCon cfg["notification_config"] = flattenEndpointConfigNotificationConfig(config.NotificationConfig) } + if config.S3FailurePath != nil { + cfg["s3_failure_path"] = aws.StringValue(config.S3FailurePath) + } + return []map[string]interface{}{cfg} } @@ -982,6 +1012,10 @@ func flattenEndpointConfigNotificationConfig(config *sagemaker.AsyncInferenceNot cfg["success_topic"] = aws.StringValue(config.SuccessTopic) } + if config.IncludeInferenceResponseIn != nil { + cfg["include_inference_response_in"] = flex.FlattenStringSet(config.IncludeInferenceResponseIn) + } + return []map[string]interface{}{cfg} } diff --git a/internal/service/sagemaker/endpoint_configuration_test.go b/internal/service/sagemaker/endpoint_configuration_test.go index 139f245a0fd..7294e022a76 100644 --- a/internal/service/sagemaker/endpoint_configuration_test.go +++ b/internal/service/sagemaker/endpoint_configuration_test.go @@ -426,6 +426,41 @@ func TestAccSageMakerEndpointConfiguration_async(t *testing.T) { }) } +func TestAccSageMakerEndpointConfiguration_async_includeInference(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_sagemaker_endpoint_configuration.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, sagemaker.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckEndpointConfigurationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccEndpointConfigurationConfig_asyncNotifInferenceIn(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEndpointConfigurationExists(ctx, resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.output_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.output_config.0.notification_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "async_inference_config.0.output_config.0.notification_config.0.error_topic", "aws_sns_topic.test", "arn"), + resource.TestCheckResourceAttrPair(resourceName, "async_inference_config.0.output_config.0.notification_config.0.success_topic", "aws_sns_topic.test", "arn"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.output_config.0.notification_config.0.include_inference_response_in.#", "2"), + resource.TestCheckTypeSetElemAttr(resourceName, "async_inference_config.0.output_config.0.notification_config.0.include_inference_response_in.*", "SUCCESS_NOTIFICATION_TOPIC"), + resource.TestCheckTypeSetElemAttr(resourceName, "async_inference_config.0.output_config.0.notification_config.0.include_inference_response_in.*", "ERROR_NOTIFICATION_TOPIC"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccSageMakerEndpointConfiguration_async_kms(t *testing.T) { ctx := acctest.Context(t) rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) @@ -525,6 +560,39 @@ func TestAccSageMakerEndpointConfiguration_Async_client(t *testing.T) { }) } +func TestAccSageMakerEndpointConfiguration_Async_client_failurePath(t *testing.T) { + ctx := acctest.Context(t) + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_sagemaker_endpoint_configuration.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, sagemaker.EndpointsID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckEndpointConfigurationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccEndpointConfigurationConfig_asyncClientFailure(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEndpointConfigurationExists(ctx, resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.client_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.client_config.0.max_concurrent_invocations_per_instance", "1"), + resource.TestCheckResourceAttr(resourceName, "async_inference_config.0.output_config.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "async_inference_config.0.output_config.0.s3_output_path"), + resource.TestCheckResourceAttrSet(resourceName, "async_inference_config.0.output_config.0.s3_failure_path"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess(t *testing.T) { ctx := acctest.Context(t) rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) @@ -977,6 +1045,49 @@ resource "aws_sagemaker_endpoint_configuration" "test" { `, rName)) } +func testAccEndpointConfigurationConfig_asyncNotifInferenceIn(rName string) string { + return acctest.ConfigCompose(testAccEndpointConfigurationConfig_base(rName), fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = %[1]q + force_destroy = true +} + +resource "aws_sns_topic" "test" { + name = %[1]q +} + +resource "aws_kms_key" "test" { + description = %[1]q + deletion_window_in_days = 7 +} + +resource "aws_sagemaker_endpoint_configuration" "test" { + name = %[1]q + + production_variants { + variant_name = "variant-1" + model_name = aws_sagemaker_model.test.name + initial_instance_count = 2 + instance_type = "ml.t2.medium" + initial_variant_weight = 1 + } + + async_inference_config { + output_config { + s3_output_path = "s3://${aws_s3_bucket.test.bucket}/" + kms_key_id = aws_kms_key.test.arn + + notification_config { + error_topic = aws_sns_topic.test.arn + include_inference_response_in = ["SUCCESS_NOTIFICATION_TOPIC", "ERROR_NOTIFICATION_TOPIC"] + success_topic = aws_sns_topic.test.arn + } + } + } +} +`, rName)) +} + func testAccEndpointConfigurationConfig_asyncClient(rName string) string { return acctest.ConfigCompose(testAccEndpointConfigurationConfig_base(rName), fmt.Sprintf(` resource "aws_s3_bucket" "test" { @@ -1014,6 +1125,44 @@ resource "aws_sagemaker_endpoint_configuration" "test" { `, rName)) } +func testAccEndpointConfigurationConfig_asyncClientFailure(rName string) string { + return acctest.ConfigCompose(testAccEndpointConfigurationConfig_base(rName), fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = %[1]q + force_destroy = true +} + +resource "aws_kms_key" "test" { + description = %[1]q + deletion_window_in_days = 7 +} + +resource "aws_sagemaker_endpoint_configuration" "test" { + name = %[1]q + + production_variants { + variant_name = "variant-1" + model_name = aws_sagemaker_model.test.name + initial_instance_count = 2 + instance_type = "ml.t2.medium" + initial_variant_weight = 1 + } + + async_inference_config { + client_config { + max_concurrent_invocations_per_instance = 1 + } + + output_config { + s3_output_path = "s3://${aws_s3_bucket.test.bucket}/" + s3_failure_path = "s3://${aws_s3_bucket.test.bucket}/" + kms_key_id = aws_kms_key.test.arn + } + } +} +`, rName)) +} + func testAccEndpointConfigurationConfig_serverless(rName string) string { return acctest.ConfigCompose(testAccEndpointConfigurationConfig_base(rName), fmt.Sprintf(` resource "aws_sagemaker_endpoint_configuration" "test" { diff --git a/website/docs/r/sagemaker_endpoint_configuration.html.markdown b/website/docs/r/sagemaker_endpoint_configuration.html.markdown index 864303453ac..aa1238f0f58 100644 --- a/website/docs/r/sagemaker_endpoint_configuration.html.markdown +++ b/website/docs/r/sagemaker_endpoint_configuration.html.markdown @@ -99,11 +99,13 @@ The following arguments are supported: #### output_config * `s3_output_path` - (Required) The Amazon S3 location to upload inference responses to. +* `s3_failure_path` - (Optional) The Amazon S3 location to upload failure inference responses to. * `kms_key_id` - (Optional) The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the asynchronous inference output in Amazon S3. * `notification_config` - (Optional) Specifies the configuration for notifications of inference results for asynchronous inference. ##### notification_config +* `include_inference_response_in` - (Optional) The Amazon SNS topics where you want the inference response to be included. Valid values are `SUCCESS_NOTIFICATION_TOPIC` and `ERROR_NOTIFICATION_TOPIC`. * `error_topic` - (Optional) Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent on failure. * `success_topic` - (Optional) Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no notification is sent on success. From 2581409989b385b81e60b56e998dbb4f2bed034c Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sun, 30 Apr 2023 05:44:31 +0300 Subject: [PATCH 2/4] add `include_inference_response_in` and `s3_failure_path` args --- a.txt | 80 ----------------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 a.txt diff --git a/a.txt b/a.txt deleted file mode 100644 index fcfbdd4d269..00000000000 --- a/a.txt +++ /dev/null @@ -1,80 +0,0 @@ -==> Checking that code complies with gofmt requirements... -TF_ACC=1 go test ./internal/service/sagemaker/... -v -count 1 -parallel 20 -run='TestAccSageMakerEndpointConfiguration_' -timeout 180m -=== RUN TestAccSageMakerEndpointConfiguration_basic -=== PAUSE TestAccSageMakerEndpointConfiguration_basic -=== RUN TestAccSageMakerEndpointConfiguration_nameGenerated -=== PAUSE TestAccSageMakerEndpointConfiguration_nameGenerated -=== RUN TestAccSageMakerEndpointConfiguration_namePrefix -=== PAUSE TestAccSageMakerEndpointConfiguration_namePrefix -=== RUN TestAccSageMakerEndpointConfiguration_shadowProductionVariants -=== PAUSE TestAccSageMakerEndpointConfiguration_shadowProductionVariants -=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless -=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless -=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight -=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight -=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType -=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType -=== RUN TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated -=== PAUSE TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated -=== RUN TestAccSageMakerEndpointConfiguration_kmsKeyID -=== PAUSE TestAccSageMakerEndpointConfiguration_kmsKeyID -=== RUN TestAccSageMakerEndpointConfiguration_tags -=== PAUSE TestAccSageMakerEndpointConfiguration_tags -=== RUN TestAccSageMakerEndpointConfiguration_dataCapture -=== PAUSE TestAccSageMakerEndpointConfiguration_dataCapture -=== RUN TestAccSageMakerEndpointConfiguration_disappears -=== PAUSE TestAccSageMakerEndpointConfiguration_disappears -=== RUN TestAccSageMakerEndpointConfiguration_async -=== PAUSE TestAccSageMakerEndpointConfiguration_async -=== RUN TestAccSageMakerEndpointConfiguration_async_includeInference -=== PAUSE TestAccSageMakerEndpointConfiguration_async_includeInference -=== RUN TestAccSageMakerEndpointConfiguration_async_kms -=== PAUSE TestAccSageMakerEndpointConfiguration_async_kms -=== RUN TestAccSageMakerEndpointConfiguration_Async_notif -=== PAUSE TestAccSageMakerEndpointConfiguration_Async_notif -=== RUN TestAccSageMakerEndpointConfiguration_Async_client -=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client -=== RUN TestAccSageMakerEndpointConfiguration_Async_client_failurePath -=== PAUSE TestAccSageMakerEndpointConfiguration_Async_client_failurePath -=== RUN TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess -=== PAUSE TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess -=== CONT TestAccSageMakerEndpointConfiguration_basic -=== CONT TestAccSageMakerEndpointConfiguration_dataCapture -=== CONT TestAccSageMakerEndpointConfiguration_Async_notif -=== CONT TestAccSageMakerEndpointConfiguration_Async_client_failurePath -=== CONT TestAccSageMakerEndpointConfiguration_kmsKeyID -=== CONT TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess -=== CONT TestAccSageMakerEndpointConfiguration_disappears -=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight -=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated -=== CONT TestAccSageMakerEndpointConfiguration_async_includeInference -=== CONT TestAccSageMakerEndpointConfiguration_tags -=== CONT TestAccSageMakerEndpointConfiguration_async_kms -=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless -=== CONT TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType -=== CONT TestAccSageMakerEndpointConfiguration_async -=== CONT TestAccSageMakerEndpointConfiguration_Async_client -=== CONT TestAccSageMakerEndpointConfiguration_nameGenerated -=== CONT TestAccSageMakerEndpointConfiguration_namePrefix -=== CONT TestAccSageMakerEndpointConfiguration_shadowProductionVariants ---- PASS: TestAccSageMakerEndpointConfiguration_async_kms (57.52s) ---- PASS: TestAccSageMakerEndpointConfiguration_shadowProductionVariants (59.72s) ---- PASS: TestAccSageMakerEndpointConfiguration_basic (61.30s) ---- PASS: TestAccSageMakerEndpointConfiguration_Async_client_failurePath (63.65s) ---- PASS: TestAccSageMakerEndpointConfiguration_nameGenerated (67.82s) ---- PASS: TestAccSageMakerEndpointConfiguration_async (68.90s) ---- PASS: TestAccSageMakerEndpointConfiguration_disappears (73.99s) ---- PASS: TestAccSageMakerEndpointConfiguration_Async_client (75.80s) ---- PASS: TestAccSageMakerEndpointConfiguration_Async_notif (77.01s) ---- PASS: TestAccSageMakerEndpointConfiguration_async_includeInference (79.24s) ---- PASS: TestAccSageMakerEndpointConfiguration_dataCapture (82.27s) ---- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_acceleratorType (82.72s) ---- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_initialVariantWeight (82.82s) ---- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_variantNameGenerated (85.02s) ---- PASS: TestAccSageMakerEndpointConfiguration_kmsKeyID (86.78s) ---- PASS: TestAccSageMakerEndpointConfiguration_upgradeToEnableSSMAccess (86.86s) ---- PASS: TestAccSageMakerEndpointConfiguration_ProductionVariants_serverless (90.10s) ---- PASS: TestAccSageMakerEndpointConfiguration_namePrefix (90.11s) ---- PASS: TestAccSageMakerEndpointConfiguration_tags (132.25s) -PASS -ok github.com/hashicorp/terraform-provider-aws/internal/service/sagemaker 134.719s From 82363d52b49f6a3b496edaf2322aa4f0ee10746c Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sun, 30 Apr 2023 05:48:52 +0300 Subject: [PATCH 3/4] changelog --- .changelog/31070.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/31070.txt diff --git a/.changelog/31070.txt b/.changelog/31070.txt new file mode 100644 index 00000000000..d5b44c9af28 --- /dev/null +++ b/.changelog/31070.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_sagemaker_endpoint_configuration: Add `async_inference_config.output_config.notification_config.include_inference_response_in` and `async_inference_config.output_config.s3_failure_path` arguments +``` \ No newline at end of file From 5989cfc36f8ac1a184776803b5c6703249f6982c Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sun, 30 Apr 2023 05:55:16 +0300 Subject: [PATCH 4/4] fmt --- internal/service/sagemaker/endpoint_configuration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/sagemaker/endpoint_configuration_test.go b/internal/service/sagemaker/endpoint_configuration_test.go index 7294e022a76..3ad77f3fd1c 100644 --- a/internal/service/sagemaker/endpoint_configuration_test.go +++ b/internal/service/sagemaker/endpoint_configuration_test.go @@ -1079,7 +1079,7 @@ resource "aws_sagemaker_endpoint_configuration" "test" { notification_config { error_topic = aws_sns_topic.test.arn - include_inference_response_in = ["SUCCESS_NOTIFICATION_TOPIC", "ERROR_NOTIFICATION_TOPIC"] + include_inference_response_in = ["SUCCESS_NOTIFICATION_TOPIC", "ERROR_NOTIFICATION_TOPIC"] success_topic = aws_sns_topic.test.arn } } @@ -1155,7 +1155,7 @@ resource "aws_sagemaker_endpoint_configuration" "test" { output_config { s3_output_path = "s3://${aws_s3_bucket.test.bucket}/" - s3_failure_path = "s3://${aws_s3_bucket.test.bucket}/" + s3_failure_path = "s3://${aws_s3_bucket.test.bucket}/" kms_key_id = aws_kms_key.test.arn } }