File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,30 @@ module "eks" {
58
58
}
59
59
}
60
60
61
+ resource "aws_ecs_task_definition" "my_task" {
62
+ family = " my-task"
63
+ requires_compatibilities = [" FARGATE" ]
64
+ network_mode = " awsvpc"
65
+ cpu = " 1024" # 1 vCPU
66
+ memory = " 2048" # 2 GB
67
+ execution_role_arn = " aws_iam_role.ecs_task_execution_role.arn"
68
+
69
+ container_definitions = jsonencode ([
70
+ {
71
+ name = " task-container"
72
+ image = " public.ecr.aws/nginx:latest"
73
+ essential = true
74
+ portMappings = [
75
+ {
76
+ containerPort = 80
77
+ hostPort = 80
78
+ protocol = " tcp"
79
+ }
80
+ ]
81
+ }
82
+ ])
83
+ }
84
+
61
85
provider "azurerm" {
62
86
skip_provider_registration = true
63
87
features {}
@@ -76,3 +100,4 @@ resource "azurerm_log_analytics_workspace" "azure_app2_logs" {
76
100
resource_group_name = " example-rg"
77
101
sku = " PerGB2018"
78
102
}
103
+
You can’t perform that action at this time.
0 commit comments