Skip to content

Commit

Permalink
Merge pull request #36458 from bschaatsbergen/f/fix-validate-jobs-glue
Browse files Browse the repository at this point in the history
chore: allow a minimum of 1 worker for a Glue Job
  • Loading branch information
ewbankkit authored Mar 19, 2024
2 parents 2c9b6e9 + 1184a16 commit 6ec1be6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/36458.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_glue_job: Adjust `number_of_workers` minimum value to `1`
```
2 changes: 1 addition & 1 deletion internal/service/glue/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions internal/service/glue/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 6ec1be6

Please sign in to comment.