hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.8k stars 9.15k forks source link

[Bug]: Ray Glue jobs fail to update #35013

Open bobthemighty opened 10 months ago

bobthemighty commented 10 months ago

Terraform Core Version

1.2.3

AWS Provider Version

5.31.0

Affected Resource(s)

Ray jobs on AWS Glue have a read only "timeout" property. Spark jobs have a writeable timeout property, and the two are created through the same API.

When creating a ray job resource, if timeout is null, the resource creates successfully, but when updating a resource, we read the hard-coded value from the remote resource, and submit it, causing an error.

Expected Behavior

Ray glue jobs update successfully

Actual Behavior

Error: updating Glue Job (tf-acc-test-4350313745659555033): InvalidInputException: Timeout not supported for Ray jobs

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Create with

resource "aws_glue_job" "test" {
  glue_version      = "4.0"
  name              =  "Ray-job"
  role_arn          = aws_iam_role.test.arn
  worker_type       = "Z.2X"
  number_of_workers = 10

  command {
    name            = "glueray"
    python_version  = "3.9"
    runtime         = "Ray2.4"
    script_location = "testscriptlocation"
  }
}

Update with

resource "aws_glue_job" "test" {
  glue_version      = "4.0"
  name              =  "Ray-job"
  description              =  "foo"
  role_arn          = aws_iam_role.test.arn
  worker_type       = "Z.2X"
  number_of_workers = 10

  command {
    name            = "glueray"
    python_version  = "3.9"
    runtime         = "Ray2.4"
    script_location = "testscriptlocation"
  }
}

Steps to Reproduce

Make a change to a ray job that requires the resource to update in place.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue