Skip to content

Commit

Permalink
Merge pull request #26407 from mc51/f-aws_glue_job-python_version
Browse files Browse the repository at this point in the history
Add support for python_version 3.9 in aws_glue_job
  • Loading branch information
ewbankkit authored Aug 22, 2022
2 parents 966d3cb + aaa578e commit b5a5d6d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/26407.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_glue_job: Add support for `3.9` as valid `python_version` value
```
2 changes: 1 addition & 1 deletion internal/service/glue/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func ResourceJob() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringInSlice([]string{"2", "3"}, true),
ValidateFunc: validation.StringInSlice([]string{"2", "3", "3.9"}, true),
},
},
},
Expand Down
10 changes: 10 additions & 0 deletions internal/service/glue/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,16 @@ func TestAccGlueJob_pythonShell(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "command.0.name", "pythonshell"),
),
},
{
Config: testAccJobConfig_pythonShellVersion(rName, "3.9"),
Check: resource.ComposeTestCheckFunc(
testAccCheckJobExists(resourceName, &job),
resource.TestCheckResourceAttr(resourceName, "command.#", "1"),
resource.TestCheckResourceAttr(resourceName, "command.0.script_location", "testscriptlocation"),
resource.TestCheckResourceAttr(resourceName, "command.0.python_version", "3.9"),
resource.TestCheckResourceAttr(resourceName, "command.0.name", "pythonshell"),
),
},
},
})
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/glue_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The following arguments are supported:

* `name` - (Optional) The name of the job command. Defaults to `glueetl`. Use `pythonshell` for Python Shell Job Type, or `gluestreaming` for Streaming Job Type. `max_capacity` needs to be set if `pythonshell` is chosen.
* `script_location` - (Required) Specifies the S3 path to a script that executes a job.
* `python_version` - (Optional) The Python version being used to execute a Python shell job. Allowed values are 2 or 3.
* `python_version` - (Optional) The Python version being used to execute a Python shell job. Allowed values are 2, 3 or 3.9. Version 3 refers to Python 3.6.

### execution_property Argument Reference

Expand Down

0 comments on commit b5a5d6d

Please sign in to comment.