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

Add support for python_version 3.9 in aws_glue_job #26407

Merged
merged 3 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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