Skip to content

Commit

Permalink
resource/aws_glue_job: Address PR #9115 schema feedback
Browse files Browse the repository at this point in the history
Reference: #9115 (review)

Output from acceptance testing:

```
--- PASS: TestAccAWSGlueJob_Basic (20.19s)
--- PASS: TestAccAWSGlueJob_Timeout (41.58s)
--- PASS: TestAccAWSGlueJob_Command (51.15s)
--- PASS: TestAccAWSGlueJob_PythonShell (52.94s)
--- PASS: TestAccAWSGlueJob_MaxRetries (57.00s)
--- PASS: TestAccAWSGlueJob_MaxCapacity (58.24s)
--- PASS: TestAccAWSGlueJob_AllocatedCapacity (67.58s)
--- PASS: TestAccAWSGlueJob_GlueVersion (77.25s)
--- PASS: TestAccAWSGlueJob_DefaultArguments (78.53s)
--- PASS: TestAccAWSGlueJob_Description (82.81s)
--- PASS: TestAccAWSGlueJob_ExecutionProperty (90.17s)
--- PASS: TestAccAWSGlueJob_WorkerType (91.13s)
--- PASS: TestAccAWSGlueJob_SecurityConfiguration (105.39s)
```
  • Loading branch information
bflad committed Nov 20, 2019
1 parent a074641 commit 3a1caf3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions aws/resource_aws_glue_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package aws
import (
"fmt"
"log"
"regexp"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/glue"
Expand Down Expand Up @@ -122,13 +121,17 @@ func resourceAwsGlueJob() *schema.Resource {
"worker_type": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"allocated_capacity", "max_capacity", "allocated_capacity"},
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^Standard|G.1X|G.2X`), "Must be one of Standard, G.1X or G.2X. See https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html"),
ConflictsWith: []string{"allocated_capacity", "max_capacity"},
ValidateFunc: validation.StringInSlice([]string{
glue.WorkerTypeG1x,
glue.WorkerTypeG2x,
glue.WorkerTypeStandard,
}, false),
},
"number_of_workers": {
Type: schema.TypeInt,
Optional: true,
ConflictsWith: []string{"allocated_capacity", "max_capacity", "allocated_capacity"},
ConflictsWith: []string{"allocated_capacity", "max_capacity"},
ValidateFunc: validation.IntAtLeast(2),
},
},
Expand Down

0 comments on commit 3a1caf3

Please sign in to comment.