File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ resource "aws_ecs_service" "service" {
4
4
task_definition = var. always_use_latest_task_definition ? aws_ecs_task_definition. service . arn_without_revision : aws_ecs_task_definition. service . arn
5
5
desired_count = var. service_desired_count
6
6
iam_role = (! var. use_fargate && var. attach_to_load_balancer && var. service_task_network_mode != " awsvpc" ) ? var. ecs_cluster_service_role_arn : null
7
+ launch_type = var. use_fargate ? " FARGATE" : null
7
8
8
9
deployment_maximum_percent = var. service_deployment_maximum_percent
9
10
deployment_minimum_healthy_percent = var. service_deployment_minimum_healthy_percent
Original file line number Diff line number Diff line change 76
76
. to ( eq ( 'REPLICA' ) )
77
77
end
78
78
79
+ it 'has a launch type of "FARGATE"' do
80
+ expect ( ecs_service . launch_type )
81
+ . to ( eq ( 'FARGATE' ) )
82
+ end
83
+
79
84
# it 'has the correct load balancer' do
80
85
# expect(ecs_service.load_balancers.first.load_balancer_name)
81
86
# .to(eq(load_balancer_name))
Original file line number Diff line number Diff line change 675
675
. with_attribute_value ( :iam_role , a_nil_value ) )
676
676
end
677
677
678
+ it 'sets the launch type to "FARGATE"' do
679
+ expect ( @plan )
680
+ . to ( include_resource_creation ( type : 'aws_ecs_service' )
681
+ . with_attribute_value ( :launch_type , 'FARGATE' ) )
682
+ end
683
+
678
684
# it 'configures VPC networking using the provided subnets' do
679
685
# expect(@plan)
680
686
# .to(include_resource_creation(type: 'aws_ecs_service')
You can’t perform that action at this time.
0 commit comments