All Questions
Tagged with terraform amazon-ecs
14
questions
0
votes
1
answer
33
views
ECS Dynamic Port Mapping: "port should be set when target type is instance"
I've set the following via Terraform:
Task-definition level:
network_mode = "bridge"
Container level:
portMappings = [
{
hostPort = 0,
containerPort = 8080
}
]
Terraform ...
0
votes
0
answers
121
views
How to use separated load balancers for frontend and backend in ECS?
I have the following terraform configuration for a load balancer running in ECS AWS for my django app container deployed in ECS:
resource "aws_lb" "api" {
name = &...
2
votes
0
answers
835
views
Why can't my ECS Fargate cluster write to my mounted EFS volume, all deployed with Terraform?
I've got a Terraform deployment that deploys a Docker image into ECS Fargate. It attaches an EFS volume to the container. When I SSH into the container, I see the volume mounted, but I am unable to ...
1
vote
3
answers
1k
views
terraform: Configuring load-balancer to use dynamic port of ECS task/service in AWS
This is sort-of a general question for how dynamic port assignments are supposed to work, though my specific context is trying to figure-out if there is a natural way for a target-group to know the ...
0
votes
1
answer
1k
views
ECS service is not starting tasks
Hello I am using aws ecs and terraform to deploy a few containers. I am trying to create an ecs cluster with ec2 instances and in each instance I want to run two nginx containers. I have a load ...
0
votes
1
answer
402
views
aws - ECS capacity provider permission
I'm trying out teraform for managing my infrastructure and got into a bit of an issue and I'm not sure what to look for.
I'm attempting to create a capacity provider for my ECS cluster however I'm ...
1
vote
1
answer
2k
views
Terraform ECS Capacity Provider not resulting in new ECS instances on demand
From what I read here ECS capacity providers should (generally) prevent tasks immediately failing on resource limits by putting them in a "Provisioning" state and spinning up a new EC2 ...
2
votes
1
answer
1k
views
AWS ECS task definition workflow
I've setup one of my services to be deployed to ECS (EC2). I have the service and task definition configured via terraform and then to deploy I'm using Github actions where it seems I need to define ...
1
vote
1
answer
2k
views
How do you tag EC2 instances spawned by ECS in Terraform?
I have an ECS service that spawns some containers:
resource "aws_ecs_service" "rocketchat" {
name = "rocketchat-ecs-service"
cluster = "${aws_ecs_cluster.rocketchat.id}"
...
3
votes
1
answer
2k
views
How do I attach, format and mount a volume on boot in ecs?
I want my persistence (ebs) volume to be separate from my auto-scaling group launch configuration. So that it won't be accidentally auto deleted by terraform, or something. Also I may do something ...
3
votes
3
answers
8k
views
TERRAFORM how do i have 1 ecs cluster with 2 or more ecs service/task definitions?
Using Terraform, I have tried the hardest to find out how to create 1 ECS cluster and have multiple services running under it. SO basically i have 2 different containers i want to run with this 1 ECS ...
3
votes
1
answer
3k
views
How do I determine the Container ID so that Terraform can attach it to an ALB target group?
I've used Terraform to create a VPC, subnets, ECS instances, routing and a task definition which I am able to run via the AWS console. That gives me a few instances of my small web app running in ...
3
votes
2
answers
4k
views
Terraform returns "Unsupported service namespace, resource type or scalable dimension" when I attach an auto-scaling group to an ECS service
In my terraform code, I am trying to attach an auto-scaling group to my ECS Service using aws_autoscaling_target.
resource "aws_appautoscaling_target" "service_app_asg_target" {
resource_id = "${...
0
votes
1
answer
877
views
In terraform, howto attach a backing ec2 instance to an ecs service
I’m using Terraform to upload a web to AWS. This ECS, with a docker image, that errors with 500 when I try to go to it’s assigned A-record DNS name. For this service, I’ve assigned a few AWS resources:...