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

Support AWS Batch Fargate compute environments #16592

Closed
mrosales opened this issue Dec 4, 2020 · 12 comments · Fixed by #16819
Closed

Support AWS Batch Fargate compute environments #16592

mrosales opened this issue Dec 4, 2020 · 12 comments · Fixed by #16819
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/batch Issues and PRs that pertain to the batch service.
Milestone

Comments

@mrosales
Copy link

mrosales commented Dec 4, 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

Description

AWS Batch now supports using Fargate or Fargate Spot as compute environments instead of a traditional EC2/Spot environment.

New or Affected Resource(s)

  • aws_batch_compute_environment
  • aws_batch_job_definition (ExecutionRoleArn parameter becomes required)

Potential Terraform Configuration

resource "aws_batch_compute_environment" "sample" {
  compute_environment_name = "sample"

  compute_resources {
    max_vcpus = 16

    security_group_ids = [
      aws_security_group.sample.id,
    ]

    subnets = [
      aws_subnet.sample.id,
    ]

    type = "FARGATE|FARGATE_SPOT"
  }

  service_role = aws_iam_role.aws_batch_service_role.arn
  type         = "MANAGED"
  depends_on   = [aws_iam_role_policy_attachment.aws_batch_service_role]
}

References

@mrosales mrosales added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 4, 2020
@ghost ghost added the service/batch Issues and PRs that pertain to the batch service. label Dec 4, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2020
@gmazelier
Copy link
Contributor

Need to update job definition too, to support platform capabilities (covered in another pull request):
https://docs.aws.amazon.com/batch/latest/APIReference/API_JobDefinition.html

@gmazelier
Copy link
Contributor

The two pull requests above should resolve this issue.

@tabvn
Copy link

tabvn commented Jan 19, 2021

i got same issue, it should have more option like: FARGATE

The type of compute environment: EC2 , SPOT , FARGATE , or FARGATE_SPOT . For more information, see Compute Environments in the AWS Batch User Guide .

@dmccaffery
Copy link

Anything left to do to see this make its way into the next release? We're really looking forward to it. Happy to lend a hand if there is outstanding blockers.

@grinszju
Copy link

Hi,

for the moment you can still use a "aws_cloudformation_stack" to manage the aws batch fargate component...

Regards,

@hbakkum-dotstar
Copy link

We are also looking forward to getting this change. Is it going to make the next release?

@nbzn
Copy link

nbzn commented Feb 24, 2021

Me too, Please include next release...

@ghost
Copy link

ghost commented Feb 24, 2021

We are also looking forward to this, we need it in a terraform way. (I just tried with the "aws_cloudformation_stack" and it was hell.)

@AndyMakings
Copy link

Any ETA for this, please?

@itsx
Copy link

itsx commented Mar 18, 2021

Hi @gmazelier , we are also waiting for this feature and your PR looks awesome!

Hi @DrFaust92 , thank you for Terraform at the first place.
This PR looks quite ready and we are wondering, when it could make its way to the release
(also #16850 looks quite ready, if I can say).

We will definitely use this, thanks for the work 👍

@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
enhancement Requests to existing resources that expand the functionality or scope. service/batch Issues and PRs that pertain to the batch service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants