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

aws_batch_job_queue name should be ForceNew: true #18638

Closed
pdecat opened this issue Apr 7, 2021 · 2 comments · Fixed by #19121
Closed

aws_batch_job_queue name should be ForceNew: true #18638

pdecat opened this issue Apr 7, 2021 · 2 comments · Fixed by #19121
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.
Milestone

Comments

@pdecat
Copy link
Contributor

pdecat commented Apr 7, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.14.8
+ provider registry.terraform.io/hashicorp/aws v3.31.0

Affected Resource(s)

  • aws_batch_job_queue

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_batch_job_queue" "my_queue" {
  name                 = "my-job-queue"
  state                = "ENABLED"
  priority             = 1
  compute_environments = [aws_batch_compute_environment.my_compute.arn]
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

As aws_batch_job_queue name cannot be updated, the resource should be recreated.

Actual Behavior

After updating the job queue name:

resource "aws_batch_job_queue" "my_queue" {
  name                 = "my-job-queue-${sha256(aws_batch_compute_environment.my_compute.id)}"
  state                = "ENABLED"
  priority             = 1
  compute_environments = [aws_batch_compute_environment.my_compute.arn]
}

An update of the job queue was planned:

  # module.my_aws.aws_batch_job_queue.my_queue will be updated in-place
  ~ resource "aws_batch_job_queue" "my_queue" {
      ~ compute_environments = [
          - "arn:aws:batch:eu-west-3:123456789012:compute-environment/batch-compute-my",
        ] -> (known after apply)
        id                   = "arn:aws:batch:eu-west-3:123456789012:job-queue/my-job-queue"
      ~ name                 = "my-job-queue" -> (known after apply)
        tags                 = {}
        # (3 unchanged attributes hidden)
    }

And it failed during apply:

Error: : arn:aws:batch:eu-west-3:123456789012:job-queue/my-job-queue-6b5a43dda602a653f53578df720a10fbdc16ffe1782cde603778eb844c02c6a8 does not exist
        status code: 400, request id: 19dc7eae-308e-4353-ac94-64d2257f4a42

  on batch.tf line 269, in resource "aws_batch_job_queue" "my_queue":
 269: resource "aws_batch_job_queue" "my_queue" {

Steps to Reproduce

  1. terraform apply
  2. Update a compute environment field
  3. terraform apply

Important Factoids

N/A

References

  • N/A
@ghost ghost added the service/batch Issues and PRs that pertain to the batch service. label Apr 7, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 7, 2021
@bill-rich bill-rich added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 7, 2021
@github-actions github-actions bot added this to the v3.38.0 milestone Apr 27, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants