https://pulumi.com logo
#python
Title
# python
w

white-jewelry-95626

09/09/2019, 3:40 PM
stageapps_project_service = ecs.Service( resource_name= app_name +'-project_service', name=app_name, task_definition=stageapps_ts_task_definition.arn, desired_count=1, launch_type="FARGATE", cluster=ecs_cluster_name, network_configuration={ 'security_groups': [stageapps_ts_security_group], 'subnets': [private_subnets[0].id, private_subnets[1].id, private_subnets[2].id] }, load_balancers=[{ 'target_group_arn': alb_target_group.arn, 'container_name': 'nginx-node-proxy', 'container_port': app_container_port }], opts=pulumi.ResourceOptions(depends_on=[alb_target_group, load_balancer, stageapps_ts_task_definition]) ) appautoscaling_target = appautoscaling.Target( resource_name=app_name + '-appautoscaling_target', service_namespace='ecs', opts=pulumi.ResourceOptions(depends_on=[stageapps_project_service, ecs_module.ecs_cluster]), resource_id='service/' + str(ecs_cluster_name) + '/' + str(stageapps_project_service.name), scalable_dimension='ecsserviceDesiredCount', role_arn=ecs_autoscale_role_arn, min_capacity=scaling_min_capacity, max_capacity=scaling_max_capacity