-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_ecs_task_defination.yaml
44 lines (39 loc) · 1.12 KB
/
create_ecs_task_defination.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- name: debug
debug:
msg: "{{ containerName }}-{{ country }}-{{ env }}"
- name: Create Task Defination ${{env}} {{country}}"
community.aws.ecs_taskdefinition:
state: present
family: "{{ containerName }}-{{ country }}-{{ env }}"
region: "{{ region }}"
launch_type: FARGATE
cpu: "256"
memory: "512"
network_mode: awsvpc
# execution_role_arn:
# task_role_arn:
containers:
- name: "{{ containerName }}-{{ country }}-{{ env }}"
essential: true
image: "{{ imageName }}:{{ version }}"
# respositoryCredentials:
# credentialsParameter: "ssm-arn"
portMappings:
- containerPort: 8080
hostPort: 8080
environment:
- name: "APP_PORT"
value: "8080"
- name: "DB_HOST"
value: "db_host"
# secrets:
# - name: DB_PASSWORD
# valueFrom: "ssm-arn"
# logConfigurations:
# logDriver: awslog
# options:
# awslogs-group: nginx
# awslogs-region: ap-south-1
# awslogs-stream-prefix: web
register: task_output