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

Unmanaged aws_batch_compute_environment should not require compute_resources #12543

Closed
perrygeo opened this issue Mar 26, 2020 · 3 comments · Fixed by #16819
Closed

Unmanaged aws_batch_compute_environment should not require compute_resources #12543

perrygeo opened this issue Mar 26, 2020 · 3 comments · Fixed by #16819
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.
Milestone

Comments

@perrygeo
Copy link

perrygeo commented Mar 26, 2020

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 Version

$ terraform -v
Terraform v0.12.24
+ provider.aws v2.54.0
+ provider.template v2.1.2

Affected Resource(s)

  • aws_batch_compute_environment

Terraform Configuration Files

resource "aws_batch_compute_environment" "batch" {
  compute_environment_name = "${local.name}_batch_compute_environment"
  service_role             = aws_iam_role.this.arn
  type                     = "UNMANAGED"
  depends_on               = [aws_iam_role_policy_attachment.aws_batch_service_role]
}

Expected Behavior

terraform apply should create a batch compute environment.

Actual Behavior

aws_batch_compute_environment.batch: Modifying... [id=production_batch_compute_environment]

Error: : Error executing request, Exception : At least one compute-resources attribute must be specified, RequestId: 4e2a1592-65bc-462b-a5e0-3c68ba2257b4
	status code: 400, request id: 4e2a1592-65bc-462b-a5e0-3c68ba2257b4

  on main.tf line 153, in resource "aws_batch_compute_environment" "batch":
 153: resource "aws_batch_compute_environment" "batch" {

The compute-resources attribute should be optional in an unmanaged compute environment. Per the docs:

compute_resources - (Optional) Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.

Steps to Reproduce

  1. terraform apply
@ghost ghost added the service/batch Issues and PRs that pertain to the batch service. label Mar 26, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 26, 2020
@perrygeo
Copy link
Author

We had to destroy the environment and recreate it. Fixed now. Still curious how it got into this state but I'm not able to reproduce it.

@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 25, 2020
@github-actions github-actions bot added this to the v3.38.0 milestone Apr 23, 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