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

[Bug]: New revisions of aws_batch_job_definition forgets tags #39795

Closed
t0yv0 opened this issue Oct 18, 2024 · 4 comments · Fixed by #39797
Closed

[Bug]: New revisions of aws_batch_job_definition forgets tags #39795

t0yv0 opened this issue Oct 18, 2024 · 4 comments · Fixed by #39797
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service. tags Pertains to resource tagging.
Milestone

Comments

@t0yv0
Copy link
Contributor

t0yv0 commented Oct 18, 2024

Terraform Core Version

1.8.3

AWS Provider Version

5.72.1

Affected Resource(s)

  • aws_batch_job_definition

Expected Behavior

When making changes to an aws_batch_job_definition with tags, newly introduced revisions of the job definition should continue to be tagged with the tags specified in the Terraform file.

Actual Behavior

When making changes to an aws_batch_job_definition with tags, newly introduced revisions are not tagged. Only the first revision carries the tags specified in the Terraform file.

Relevant Error/Panic Output Snippet

N/A

Terraform Configuration Files

resource "aws_batch_job_definition" "jobdef1" {
  name = "my_test_batch_job_def"
  type = "container"
  tags = {
    env = "prod"
  }
  container_properties = <<EOF
{
    "command": [
        "ls", "--help"
    ],
    "image": "busybox",
    "resourceRequirements": [
        {
            "type": "VCPU",
            "value": "1"
        },
        {
            "type": "MEMORY",
            "value": "512"
        }
    ]
}
EOF
}

Steps to Reproduce

terraform apply
# edit ["ls", "--help"] to ["ls"]
terraform apply
aws batch describe-job-definitions --job-definition-name my_test_batch_job_definition | jq '.jobDefinitions[]|{revision: .revision, tags: .tags}'

Observe that revision 2 is not tagged:

{
  "revision": 1,
  "tags": {
    "env": "prod"
  }
}
{
  "revision": 2,
  "tags": {}
}

Expected revision 2 to be tagged.

Debug Output

N/A

Panic Output

N/A

Important Factoids

N/A

References

N/A

Would you like to implement a fix?

No

@t0yv0 t0yv0 added the bug Addresses a defect in current functionality. label Oct 18, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/batch Issues and PRs that pertain to the batch service. needs-triage Waiting for first response or review from a maintainer. labels Oct 18, 2024
@ewbankkit ewbankkit added the tags Pertains to resource tagging. label Oct 18, 2024
@ewbankkit
Copy link
Contributor

ewbankkit commented Oct 18, 2024

Relates #38302.
Relates #38053.
Relates #37254.

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.73.0 milestone Oct 21, 2024
Copy link

This functionality has been released in v5.73.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. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service. tags Pertains to resource tagging.
Projects
None yet
2 participants