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

enableExecuteCommand for aws_ecs_service #18112

Closed
jtatum opened this issue Mar 16, 2021 · 8 comments · Fixed by #18347
Closed

enableExecuteCommand for aws_ecs_service #18112

jtatum opened this issue Mar 16, 2021 · 8 comments · Fixed by #18347
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@jtatum
Copy link

jtatum commented Mar 16, 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

Description

ECS services (Fargate and EC2) now allow commands to be executed inside the container. This must be enabled on every ECS task and service. The provider must send a new field to CreateService/UpdateService, enableExecuteCommand, to enable this functionality.

New or Affected Resource(s)

  • aws_ecs_service

Potential Terraform Configuration

resource "aws_ecs_service" "mongo" {
  name                   = "mongodb"
  cluster                = aws_ecs_cluster.foo.id
  task_definition        = aws_ecs_task_definition.mongo.arn
  enable_execute_command = true
}

References

@jtatum jtatum added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 16, 2021
@ghost ghost added the service/ecs Issues and PRs that pertain to the ecs service. label Mar 16, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 16, 2021
@iancward
Copy link
Contributor

I think an update is also required to aws_ecs_cluster to add support for the logging configuration.

@ewbankkit
Copy link
Contributor

@bill-rich bill-rich self-assigned this Mar 17, 2021
@bill-rich bill-rich removed the needs-triage Waiting for first response or review from a maintainer. label Mar 17, 2021
@shedimon
Copy link
Contributor

@ewbankkit, @bill-rich , I've opened a PR, that adds enable_execute_command to the aws_ecs_service resource. Would be grateful for the review.

@markbaird
Copy link

The merged PR only covers the aws_ecs_service portion, it doesn't add the executeCommandConfiguration configuration options to the aws_ecs_cluster resource.

@WhyNotHugo
Copy link

@markbaird Do you really need executeCommandConfiguration? I just updated the services and could run ExecuteCommand just fine (e.g.: it seems updating the cluster was not necessary).

@iancward
Copy link
Contributor

iancward commented Mar 25, 2021

@WhyNotHugo if you want any auditing of the commands run in the task, we'll need support for executeCommandConfiguration in aws_ecs_cluster. See my note above and included documentation link.

@ghost
Copy link

ghost commented Mar 26, 2021

This has been released in version 3.34.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!

@ghost
Copy link

ghost commented Apr 24, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 24, 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/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants