Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: cluster-wide ENV definitions #347
Use case: I'm running a mix of ECS, EC2, and AWS resources like RDS and ElastiCache. I have separate staging and production environments on different VPCs. Right now, to convey the connection URL for my ElastiCache redis instance, I have to set an environment variable REDIS_HOST on every single task definition that I create. It's different for staging vs. production, so this means I have to create different tasks for every container in every environment. This is manageable with automation, but also a bit overly complex.
Another use case would be setting RUBY_ENV or RAILS_ENV for every task.
Proposed solution: Add the ability to define env variables per ECS cluster, and have them applied to all containers run within that cluster.
Yes, I would absolutely love to see this as well. I'm in a similar situation using CloudFormation input params and wiring those to ENV vars passed to ECS task definitions. Right now that means 60 env vars duplicated in the CloudFormation template for every task definition. I'm currently trying to think through possible workarounds, but supporting this out of the box would make life much, much simpler.