bitovi/Deploy an AWS ECS Cluster

Deploys an Amazon ECS Cluster with service, task and ALB definitions, even DNS with cert (If in Route53).

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jan 30, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: bitovi/github-actions-deploy-ecs@ee23fb28540c1cc35196b7e053e52b6f8f38a4f3 # v1.0.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
aws_access_key_idAWS access key IDno
aws_secret_access_keyAWS secret access keyno
aws_session_tokenAWS session tokenno
aws_default_regionAWS default regionnous-east-1
aws_resource_identifierSet to override the AWS resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources.no
aws_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
checkoutSpecifies if this action should checkout the codenotrue
bitops_code_onlyWill run only the generation phase of BitOps, where the Terraform and Ansible code is built.no
bitops_code_storeStore BitOps code as a GitHub artifactno
tf_stack_destroySet to "true" to Destroy the stack through Terraform.no
tf_state_file_nameChange this to be anything you want to. Careful to be consistent here. A missing file could trigger recreation, or stepping over destruction of non-defined objects.no
tf_state_file_name_appendAppend a string to the tf-state-file. Setting this to `unique` will generate `tf-state-aws-unique`. Can co-exist with the tf_state_file_name variable. no
tf_state_bucketAWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state`no
tf_state_bucket_destroyForce purge and deletion of S3 bucket defined. Any file contained there will be destroyed. `tf_stack_destroy` must also be `true`no
aws_ecs_enableToggle ECS Creationnotrue
aws_ecs_service_nameElastic Container Service nameno
aws_ecs_cluster_nameElastic Container Service cluster nameno
aws_ecs_service_launch_typeConfiguration type. Could be EC2, FARGATE or EXTERNALno
aws_ecs_task_typeConfiguration type. Could be EC2, FARGATE or empty. Will default to aws_ecs_service_launch_type if none defined. (Blank if EXTERNAL)no
aws_ecs_task_nameElastic Container Service task nameno
aws_ecs_task_ignore_definitionToggle to ignore task definition changes after first deployment. Useful when using external tools to manage the task definition.no
aws_ecs_task_execution_roleTask execution role name that the Amazon ECS container agent and the Docker daemon can assumeno
aws_ecs_task_roleName of the IAM role that allows your Amazon ECS container task to make calls to other AWS servicesno
aws_ecs_task_reuse_roleToggle reusing the task execution role as the task role.no
aws_ecs_task_json_definition_fileName of the json file containing task definition. Overrides every other input.no
aws_ecs_task_network_modeNetwork type to use in task definitionno
aws_ecs_task_cpuTask CPU Amountno
aws_ecs_task_memTask Mem Amountno
aws_ecs_container_cpuContainer CPU Amountno
aws_ecs_container_memContainer Mem Amountno
aws_ecs_container_userUser to run container asno
aws_ecs_node_countNode count for ECS Clusterno
aws_ecs_app_imageName of the image to be usedno
aws_ecs_security_group_nameECS Security group nameno
aws_ecs_assign_public_ipAssign public IP to nodeno
aws_ecs_container_portComma separated list of container portsno
aws_ecs_lb_portComma separated list of ports exposed by the load balancerno
aws_ecs_lb_redirect_enableToggle redirect from HTTP and/or HTTPS to the main port.no
aws_ecs_lb_container_pathPath for subsequent deployed images. eg. api.no
aws_ecs_lb_ssl_policySSL Policy for HTTPS listener in ALB. Will default to ELBSecurityPolicy-TLS13-1-2-2021-06 if none provided.no
aws_ecs_lb_www_to_apex_redirectToggle redirect from www to apex domain. aws_r53_domain_name must be set.no
aws_ecs_autoscaling_enableToggle ecs autoscaling policyno
aws_ecs_autoscaling_max_nodesMax amount of nodes to scale up to.no
aws_ecs_autoscaling_min_nodesMin amount of nodes to scale down to.no
aws_ecs_autoscaling_max_memMax amount of mem to scale up to.no
aws_ecs_autoscaling_max_cpuMax amount of cpu to scale up to.no
aws_ecs_cloudwatch_enableToggle cloudwatch for ECS. Defaults to falseno
aws_ecs_cloudwatch_lg_nameLog group name. Will default to aws_identifier if none.no
aws_ecs_cloudwatch_skip_destroyToggle deletion or not when destroying the stack.no
aws_ecs_cloudwatch_retention_daysNumber of days to retain logs. 0 to never expire. Default 14no
aws_ecs_efs_fs_idID of the EFS File Systemno
aws_ecs_efs_root_directoryDirectory within the FS to mount as the root directory. Defaults to /, ignored if access_point_id definedno
aws_ecs_efs_transit_encryptionEFS Volume Transit Encryption. Defaults to true (ENABLED)no
aws_ecs_efs_transit_encryption_portEFS Volume Transit Encryption Portno
aws_ecs_efs_access_point_idEFS Volume Access Point ID to useno
aws_ecs_efs_container_pathDirectory path within container to mount the EFS volume tono
aws_ecs_efs_readonlyWhether the EFS volume is mounted as read-onlyno
aws_ecs_efs_iamWhether or not to use the ECS task IAM role defined in a task definition when mounting the FS. Defaults to false. (DISABLED) no
aws_ecs_additional_tagsA list of strings that will be added to created resourcesno
env_aws_secretSecret name to pull env variables from AWS Secret Managerno
env_repoFile containing environment variables to be used with the appno
env_ghs`.env` file to be used with the app from Github secretsno
env_ghv`.env` file to be used with the app from Github variablesno
aws_waf_enableEnable WAF for load balancer.no
aws_waf_logging_enableEnable WAF logging to CloudWatch.no
aws_waf_log_retention_daysCloudWatch log retention period for WAF logs.no
aws_waf_rule_rate_limitRate limit for WAF rules.no
aws_waf_rule_rate_limit_priorityPriority for rate limit rule.no
aws_waf_rule_managed_rulesEnable common managed rule groups to use.no
aws_waf_rule_managed_rules_priorityPriority for managed rules group.no
aws_waf_rule_managed_bad_inputsEnable managed rule for bad inputs.no
aws_waf_rule_managed_bad_inputs_priorityPriority for bad inputs managed rule.no
aws_waf_rule_ip_reputationEnable managed rule for IP reputation.no
aws_waf_rule_ip_reputation_priorityPriority for IP reputation managed rule.no
aws_waf_rule_anonymous_ipEnable managed rule for anonymous IP.no
aws_waf_rule_anonymous_ip_priorityPriority for anonymous IP managed rule.no
aws_waf_rule_bot_controlEnable managed rule for bot control (costs extra).no
aws_waf_rule_bot_control_priorityPriority for bot control managed rule.no
aws_waf_rule_geo_block_countriesComma separated list of countries to block.no
aws_waf_rule_geo_block_countries_priorityPriority for geo block countries managed rule.no
aws_waf_rule_geo_allow_only_countriesComma separated list of countries to allow.no
aws_waf_rule_geo_allow_only_countries_priorityPriority for geo allow only countries managed rule.no
aws_waf_rule_sqliEnable managed rule for SQL injection.no
aws_waf_rule_sqli_priorityPriority for SQL injection managed rule.no
aws_waf_rule_linuxEnable managed rule for Linux.no
aws_waf_rule_linux_priorityPriority for Linux managed rule.no
aws_waf_rule_unixEnable managed rule for Unix.no
aws_waf_rule_unix_priorityPriority for Unix managed rule.no
aws_waf_rule_admin_protectionEnable managed rule for admin protection.no
aws_waf_rule_admin_protection_priorityPriority for admin protection managed rule.no
aws_waf_rule_user_arnARN of the user rule.no
aws_waf_rule_user_arn_priorityPriority for user defined rule.no
aws_waf_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
aws_efs_createToggle to indicate whether to create an EFS volume as a part of the provisioning. Note: The EFS will be managed by the stack and will be destroyed along with the stack.no
aws_efs_create_mount_targetToggle to indicate whether we should create a mount target for the EFS volume. Accepts incoming FS ID with no mount targets too.nofalse
aws_efs_create_haToggle to indicate whether the EFS resource should be highly available (mount points in all available zones within region).no
aws_efs_vol_encryptedToggle encryption of the EFS volume.no
aws_efs_kms_key_idThe ARN for the KMS encryption key. Default key will be used if none defined.no
aws_efs_performance_modeToggle performance mode. Options are: generalPurpose or maxIO.no
aws_efs_throughput_modeThroughput mode for the file system. Defaults to bursting. Valid values: bursting, provisioned, or elastic. When using provisioned, also set provisioned_throughput_in_mibps.no
aws_efs_throughput_speedThe throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with throughput_mode set to provisioned.no
aws_efs_security_group_nameThe name of the EFS security group. Defaults to SG for aws_resource_identifier - EFS.no
aws_efs_allowed_security_groupsComma separated list of security groups to be added to the EFS SG.no
aws_efs_ingress_allow_allAllow incoming traffic from 0.0.0.0/0.nofalse
aws_efs_create_replicaToggle to indicate whether a read-only replica should be created for the EFS primary file systemno
aws_efs_replication_destinationAWS Region to target for replicationno
aws_efs_enable_backup_policyToggle to indicate whether the EFS should have a backup policy, default is `false`no
aws_efs_transition_to_inactivehttps://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_iano
aws_efs_additional_tagsA list of strings that will be added to created resourcesno
aws_vpc_createDefine if a VPC should be createdno
aws_vpc_nameSet a specific name for the VPCno
aws_vpc_cidr_blockDefine Base CIDR block which is divided into subnet CIDR blocks. Defaults to 10.0.0.0/16.no
aws_vpc_public_subnetsComma separated list of public subnets. Defaults to 10.10.110.0/24no
aws_vpc_private_subnetsComma separated list of private subnets. If none, none will be created.no
aws_vpc_availability_zonesComma separated list of availability zones. Defaults to `aws_default_region.no
aws_vpc_idAWS VPC ID. Accepts `vpc-###` values.no
aws_vpc_subnet_idSpecify a Subnet to be used with the instance. If none provided, will pick one.no
aws_vpc_enable_nat_gatewayEnables NAT gatewayno
aws_vpc_single_nat_gatewayCreates only one NAT gatewayno
aws_vpc_external_nat_ip_idsComma separated list of IP IDS to reuse in the NAT gatewaysno
aws_vpc_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
aws_r53_enableEnables the usage of Route53 to manage DNS records.no
aws_r53_domain_nameDefine the root domain name for the application. e.g. app.comno
aws_r53_sub_domain_nameDefine the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}`
aws_r53_root_domain_deployDeploy to root domain. Will generate two DNS records, one for root, another for wwwno
aws_r53_enable_certMakes the application use a certificate by enabling a certificate lookup.no
aws_r53_cert_arnDefine the certificate ARN to use for the applicationno
aws_r53_create_root_certGenerates and manage the root cert for the applicationno
aws_r53_create_sub_certGenerates and manage the sub-domain certificate for the applicationno
aws_r53_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
namedescription
aws_vpc_idThe selected VPC ID used.
ecs_load_balancer_dnsECS ALB DNS Record
ecs_dns_recordECS DNS URL
ecs_sg_idECS SG ID
ecs_lb_sg_idECS LB SG ID
aws_efs_fs_idEFS FS ID
aws_efs_replica_fs_idEFS FS Replica ID
aws_efs_sg_idEFS FS SG ID