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.86k stars 9.21k forks source link

[Bug]: aws_glue_job created but terraform wait for it indefinitely #27552

Open Superpassteque opened 2 years ago

Superpassteque commented 2 years ago

Terraform Core Version

1.3.3

AWS Provider Version

4.34.0

Affected Resource(s)

aws_glue_job

Expected Behavior

Job create with success and terraform update the tfstate.tf

Actual Behavior

Job is created and operationnal

but terraform waiting indefinitely for an ending

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_glue_job" "ingestion_glue" {
  name     = "ingestion_glue"
  max_capacity = 0.0625
  role_arn = aws_iam_role.glue_role.arn

  default_arguments = {
    "--env" = "dev"
  }

  command {
    name= "pythonshell"
    python_version =3.9
    script_location = "s3://${aws_s3_bucket.config_bucket.bucket}/script/ingestion.py"
  }
}

resource "aws_iam_role" "glue_role" {
  name               = "glue_role"
  assume_role_policy = "${file("policies/glue_policy_role.json")}"
}

resource "aws_iam_policy" "policy_glue" {
  name        = "policy_glue"
  policy      = "${file("policies/policy_glue.json")}"
}

resource "aws_iam_policy_attachment" "test-attach" {
  name       = "glue_attach"
  roles      = ["${aws_iam_role.glue_role.name}"]
  policy_arn = "${aws_iam_policy.policy_glue.arn}"
}

Steps to Reproduce

terraform init terraform apply

Debug Output

https://gist.github.com/Superpassteque/0944bb720bbb955fabfea6b70bbe698b

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

Superpassteque commented 2 years ago

Is there a version I could use to avoid this issue?

github-actions[bot] commented 1 week ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!