From ee28e85e3b66ec64344b67fb68b798e0a033de65 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Tue, 19 Mar 2024 12:15:56 +0100 Subject: [PATCH 1/4] chore: allow a minimum of 1 worker for a Glue Job --- internal/service/glue/job.go | 2 +- internal/service/glue/job_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/service/glue/job.go b/internal/service/glue/job.go index 068f692f38a..139ba63a898 100644 --- a/internal/service/glue/job.go +++ b/internal/service/glue/job.go @@ -154,7 +154,7 @@ func ResourceJob() *schema.Resource { Type: schema.TypeInt, Optional: true, ConflictsWith: []string{"max_capacity"}, - ValidateFunc: validation.IntAtLeast(2), + ValidateFunc: validation.IntAtLeast(1), }, "role_arn": { Type: schema.TypeString, diff --git a/internal/service/glue/job_test.go b/internal/service/glue/job_test.go index 84b17e7a55b..df29c3e996e 100644 --- a/internal/service/glue/job_test.go +++ b/internal/service/glue/job_test.go @@ -976,7 +976,7 @@ func testAccJobConfig_versionNumberOfWorkers(rName, glueVersion string) string { resource "aws_glue_job" "test" { glue_version = %[1]q name = %[2]q - number_of_workers = 2 + number_of_workers = 1 role_arn = aws_iam_role.test.arn worker_type = "Standard" @@ -994,7 +994,7 @@ func testAccJobConfig_executionClass(rName, executionClass string) string { resource "aws_glue_job" "test" { execution_class = %[2]q name = %[1]q - number_of_workers = 2 + number_of_workers = 1 role_arn = aws_iam_role.test.arn worker_type = "G.1X" glue_version = "3.0" @@ -1102,7 +1102,7 @@ func testAccJobConfig_tags1(rName, tagKey1, tagValue1 string) string { return acctest.ConfigCompose(testAccJobConfig_base(rName), fmt.Sprintf(` resource "aws_glue_job" "test" { name = %[1]q - number_of_workers = 2 + number_of_workers = 1 role_arn = aws_iam_role.test.arn worker_type = "Standard" @@ -1123,7 +1123,7 @@ func testAccJobConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string return acctest.ConfigCompose(testAccJobConfig_base(rName), fmt.Sprintf(` resource "aws_glue_job" "test" { name = %[1]q - number_of_workers = 2 + number_of_workers = 1 role_arn = aws_iam_role.test.arn worker_type = "Standard" From 644a0039ac11084c1690aa410d05d4889f49ec85 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Tue, 19 Mar 2024 14:54:59 +0100 Subject: [PATCH 2/4] chore: worker_type G.1X > need more than 1 worker --- internal/service/glue/job_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/glue/job_test.go b/internal/service/glue/job_test.go index df29c3e996e..0059ce5276a 100644 --- a/internal/service/glue/job_test.go +++ b/internal/service/glue/job_test.go @@ -994,7 +994,7 @@ func testAccJobConfig_executionClass(rName, executionClass string) string { resource "aws_glue_job" "test" { execution_class = %[2]q name = %[1]q - number_of_workers = 1 + number_of_workers = 2 role_arn = aws_iam_role.test.arn worker_type = "G.1X" glue_version = "3.0" From ccb4405ca21605e98b4392fcf044af0ad3cffdfd Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Tue, 19 Mar 2024 14:58:14 +0100 Subject: [PATCH 3/4] chore: add changelog --- .changelog/36458.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/36458.txt diff --git a/.changelog/36458.txt b/.changelog/36458.txt new file mode 100644 index 00000000000..be7bb470f5d --- /dev/null +++ b/.changelog/36458.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_glue_job: Set the `number_of_workers` to a minimum of 1. +``` From 1184a16c8a6fbbc2f364612cc91c5618b60211ea Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 19 Mar 2024 16:50:28 -0400 Subject: [PATCH 4/4] Update 36458.txt --- .changelog/36458.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/36458.txt b/.changelog/36458.txt index be7bb470f5d..f0dfc59b549 100644 --- a/.changelog/36458.txt +++ b/.changelog/36458.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/aws_glue_job: Set the `number_of_workers` to a minimum of 1. +resource/aws_glue_job: Adjust `number_of_workers` minimum value to `1` ```