Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: allow a minimum of 1 worker for a Glue Job #36458

Merged
merged 4 commits into from Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/36458.txt
@@ -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
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
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