forked from taysmith-test/githubactiongoat
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathecs.tf
More file actions
56 lines (51 loc) · 1.11 KB
/
ecs.tf
File metadata and controls
56 lines (51 loc) · 1.11 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
resource "aws_kms_key" "example" {
description = "example"
deletion_window_in_days = 7
}
resource "aws_cloudwatch_log_group" "example" {
name = "example"
}
resource "aws_ecs_cluster" "test" {
name = "example"
configuration {
execute_command_configuration {
kms_key_id = aws_kms_key.example.arn
logging = "OVERRIDE"
log_configuration {
cloud_watch_encryption_enabled = true
cloud_watch_log_group_name = aws_cloudwatch_log_group.example.name
}
}
}
}
resource "aws_ecs_task_definition" "service" {
family = "service"
container_definitions = jsonencode([
{
name = "first"
image = "nginx"
cpu = 10
memory = 512
essential = true
portMappings = [
{
containerPort = 80
hostPort = 80
}
]
},
{
name = "second"
image = "python:3.9-alpine"
cpu = 10
memory = 256
essential = true
portMappings = [
{
containerPort = 443
hostPort = 443
}
]
}
])
}