-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use README.yaml
- Loading branch information
Showing
6 changed files
with
305 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ | |
.build-harness | ||
build-harness | ||
|
||
# sensitive files | ||
# Terraform tfvars files | ||
*.tfvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,132 @@ | ||
![Cloud Posse](https://cloudposse.com/logo-300x69.png) | ||
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. --> | ||
|
||
[![Cloud Posse](https://cloudposse.com/logo-300x69.png)](https://cloudposse.com) | ||
|
||
# terraform-aws-ecs-alb-service-task [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-ecs-alb-service-task.svg)](https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/releases) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) | ||
|
||
|
||
Terraform module to create an ECS Service for a web app (task), and an ALB target group to route requests. | ||
|
||
|
||
--- | ||
|
||
This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps. | ||
|
||
|
||
It's 100% Open Source and licensed under the [APACHE2](LICENSE). | ||
|
||
|
||
# terraform-aws-ecs-alb-service-task [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task) | ||
|
||
A Terraform module to create an ECS Service for a web app (task), and an ALB target group to route requests into it. | ||
|
||
## Usage | ||
|
||
```hcl | ||
module "ecs_alb_service_task" { | ||
source = "git::https://github.com/cloudposse/terraform-aws-ecs-alb-service-task.git?ref=tags/0.2.0" | ||
name = "app" | ||
namespace = "eg" | ||
stage = "staging" | ||
alb_target_group_arn = "xxxxxxx" | ||
container_definition_json = "${module.container_definition.json}" | ||
container_name = "${module.default_label.id}" | ||
ecr_repository_name = "${module.ecr.repository_name}" | ||
ecs_cluster_arn = "xxxxxxx" | ||
launch_type = "FARGATE" | ||
vpc_id = "xxxxxxx" | ||
security_group_ids = ["xxxxx", "yyyyy"] | ||
private_subnet_ids = ["xxxxx", "yyyyy", "zzzzz"] | ||
} | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Makefile Targets | ||
``` | ||
Available targets: | ||
help This help screen | ||
help/all Display help for all targets | ||
``` | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| alb_target_group_arn | The ALB target group ARN for the ECS service. | string | - | yes | | ||
| attributes | List of attributes to add to label. | list | `<list>` | no | | ||
| container_definition_json | The JSON of the task container definition. | string | - | yes | | ||
| container_name | The name of the container in task definition to associate with the load balancer. | string | - | yes | | ||
| container_port | The port on the container to associate with the load balancer. | string | `80` | no | | ||
| delimiter | The delimiter to be used in labels. | string | `-` | no | | ||
| deployment_maximum_percent | The upper limit of the number of tasks (as a percentage of desired_count) that can be running in a service during a deployment. | string | `200` | no | | ||
| deployment_minimum_healthy_percent | The lower limit (as a percentage of desired_count) of the number of tasks that must remain running and healthy in a service during a deployment. | string | `100` | no | | ||
| desired_count | The number of instances of the task definition to place and keep running. | string | `1` | no | | ||
| ecr_repository_name | The name of the ECR repository to store images. | string | - | yes | | ||
| ecs_cluster_arn | The ARN of the ECS cluster where service will be provisioned. | string | - | yes | | ||
| family | The name used for multiple versions of a task definition. | string | `web` | no | | ||
| launch_type | The launch type on which to run your service. Valid values are EC2 and FARGATE. | string | `FARGATE` | no | | ||
| name | The name of the app to be used in labels. | string | - | yes | | ||
| namespace | The namespace to be used in labels. | string | - | yes | | ||
| network_mode | The network mode to use for the task. This is required to be awsvpc for FARGATE launch_type. | string | `awsvpc` | no | | ||
| private_subnet_ids | Private subnet IDs. | list | - | yes | | ||
| security_group_ids | Security group IDs to allow in Service network_configuration. | list | - | yes | | ||
| stage | Stage to be used in labels. | string | - | yes | | ||
| tags | Map of key-value pairs to use for tags. | map | `<map>` | no | | ||
| task_cpu | The number of CPU units used by the task. If using Fargate launch type task_cpu must match supported memory values (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size). | string | `256` | no | | ||
| task_memory | The amount of memory (in MiB) used by the task. If using Fargate launch type task_memory must match supported cpu value (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size). | string | `512` | no | | ||
| vpc_id | The VPC ID where resources are created. | string | - | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| service_name | ECS Service name. | | ||
|
||
|
||
|
||
|
||
## Related Projects | ||
|
||
Check out these related projects. | ||
|
||
- [terraform-aws-alb](https://github.com/cloudposse/terraform-aws-alb) - Terraform module to provision a standard ALB for HTTP/HTTP traffic | ||
- [terraform-aws-alb-ingress](https://github.com/cloudposse/terraform-aws-alb-ingress) - Terraform module to provision an HTTP style ingress rule based on hostname and path for an ALB | ||
- [terraform-aws-codebuild](https://github.com/cloudposse/terraform-aws-codebuild) - Terraform Module to easily leverage AWS CodeBuild for Continuous Integration | ||
- [terraform-aws-ecr](https://github.com/cloudposse/terraform-aws-ecr) - Terraform Module to manage Docker Container Registries on AWS ECR | ||
- [terraform-aws-ecs-web-app](https://github.com/cloudposse/terraform-aws-ecs-web-app) - Terraform module that implements a web app on ECS and supporting AWS resources | ||
- [terraform-aws-ecs-codepipeline](https://github.com/cloudposse/terraform-aws-ecs-codepipeline) - Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS | ||
- [terraform-aws-ecs-cloudwatch-sns-alarms](https://github.com/cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms) - Terraform module to create CloudWatch Alarms on ECS Service level metrics | ||
- [terraform-aws-ecs-container-definition](https://github.com/cloudposse/terraform-aws-ecs-container-definition) - Terraform module to generate well-formed JSON documents that are passed to the aws_ecs_task_definition Terraform resource | ||
- [terraform-aws-lb-s3-bucket](https://github.com/cloudposse/terraform-aws-lb-s3-bucket) - Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs. | ||
|
||
|
||
## Help | ||
|
||
**Got a question?** | ||
|
||
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/issues), send us an [email](mailto:[email protected]) or reach out to us on [Gitter](https://gitter.im/cloudposse/). | ||
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/issues), send us an [email][email] or join our [Slack Community][slack]. | ||
|
||
## Commerical Support | ||
|
||
Work directly with our team of DevOps experts via email, slack, and video conferencing. | ||
|
||
We provide *commercial support* for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a fulltime engineer. | ||
|
||
- **Questions.** We'll use a Shared Slack channel between your team and ours. | ||
- **Troubleshooting.** We'll help you triage why things aren't working. | ||
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback. | ||
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects. | ||
- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure. | ||
- **Cloud Architecture.** We'll assist with your cloud strategy and design. | ||
- **Implementation.** We'll provide hands on support to implement our reference architectures. | ||
|
||
## Community Forum | ||
|
||
Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure. | ||
|
||
## Contributing | ||
|
||
|
@@ -21,21 +136,26 @@ Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-ecs-a | |
|
||
### Developing | ||
|
||
If you are interested in being a contributor and want to get involved in developing `terraform-aws-ecs-alb-service-task`, we would love to hear from you! Shoot us an [email](mailto:[email protected]). | ||
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:[email protected]). | ||
|
||
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. | ||
|
||
1. **Fork** the repo on GitHub | ||
2. **Clone** the project to your own machine | ||
3. **Commit** changes to your own branch | ||
4. **Push** your work back up to your fork | ||
5. Submit a **Pull request** so that we can review your changes | ||
5. Submit a **Pull Request** so that we can review your changes | ||
|
||
**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! | ||
|
||
**NOTE:** Be sure to merge the latest from "upstream" before making a pull request! | ||
## Copyright | ||
|
||
## License | ||
Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com) | ||
|
||
[APACHE 2.0](LICENSE) © 2018 [Cloud Posse, LLC](https://cloudposse.com) | ||
|
||
## License | ||
|
||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
|
||
See [LICENSE](LICENSE) for full details. | ||
|
||
|
@@ -47,7 +167,7 @@ See [LICENSE](LICENSE) for full details. | |
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
|
@@ -56,35 +176,46 @@ See [LICENSE](LICENSE) for full details. | |
specific language governing permissions and limitations | ||
under the License. | ||
|
||
## About | ||
|
||
This project is maintained and funded by [Cloud Posse, LLC][website]. | ||
## Trademarks | ||
|
||
![Cloud Posse](https://cloudposse.com/logo-300x69.png) | ||
All other trademarks referenced herein are the property of their respective owners. | ||
|
||
## About | ||
|
||
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at <[email protected]> | ||
|
||
[![Cloud Posse](https://cloudposse.com/logo-300x69.png)](https://cloudposse.com) | ||
|
||
Like it? Please let us know at <hello@cloudposse.com> | ||
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)! | ||
|
||
We love [Open Source Software](https://github.com/cloudposse/)! | ||
We offer paid support on all of our projects. | ||
|
||
See [our other projects][community] | ||
or [hire us][hire] to help build your next cloud platform. | ||
Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation. | ||
|
||
[docs]: https://docs.cloudposse.com/ | ||
[website]: https://cloudposse.com/ | ||
[community]: https://github.com/cloudposse/ | ||
[github]: https://github.com/cloudposse/ | ||
[jobs]: https://cloudposse.com/jobs/ | ||
[hire]: https://cloudposse.com/contact/ | ||
[slack]: https://slack.cloudposse.com/ | ||
[linkedin]: https://www.linkedin.com/company/cloudposse | ||
[twitter]: https://twitter.com/cloudposse/ | ||
[email]: mailto:[email protected] | ||
|
||
|
||
### Contributors | ||
|
||
| [![Erik Osterman][osterman_avatar]](osterman_homepage)<br/>[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]](goruha_homepage)<br/>[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]](aknysh_homepage)<br/>[Andriy Knysh][aknysh_homepage] | [![Sarkis Varozian][sarkis_avatar]](sarkis_homepage)<br/>[Sarkis Varozian][sarkis_homepage] | | ||
|---|---|---|---| | ||
|
||
## Contributors | ||
[osterman_homepage]: https://github.com/osterman | ||
[osterman_avatar]: https://github.com/osterman.png?size=150 | ||
[goruha_homepage]: https://github.com/goruha | ||
[goruha_avatar]: https://github.com/goruha.png?size=150 | ||
[aknysh_homepage]: https://github.com/aknysh | ||
[aknysh_avatar]: https://github.com/aknysh.png?size=150 | ||
[sarkis_homepage]: https://github.com/sarkis | ||
[sarkis_avatar]: https://github.com/sarkis.png?size=150 | ||
|
||
| [![Erik Osterman][erik_img]][erik_web]<br/>[Erik Osterman][erik_web] | [![Andriy Knysh][andriy_img]][andriy_web]<br/>[Andriy Knysh][andriy_web] |[![Igor Rodionov][igor_img]][igor_web]<br/>[Igor Rodionov][igor_img]|[![Sarkis Varozian][sarkis_img]][sarkis_web]<br/>[Sarkis Varozian][sarkis_web] | | ||
|-------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------| | ||
|
||
[erik_img]: http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144 | ||
[erik_web]: https://github.com/osterman/ | ||
[andriy_img]: https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144 | ||
[andriy_web]: https://github.com/aknysh/ | ||
[igor_img]: http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144 | ||
[igor_web]: https://github.com/goruha/ | ||
[sarkis_img]: https://avatars3.githubusercontent.com/u/42673?s=144&v=4 | ||
[sarkis_web]: https://github.com/sarkis/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
# | ||
# This is the canonical configuration for the `README.md` | ||
# Run `make readme` to rebuild the `README.md` | ||
# | ||
|
||
# Name of this project | ||
name: terraform-aws-ecs-alb-service-task | ||
|
||
# Logo for this project | ||
#logo: docs/logo.png | ||
|
||
# License of this project | ||
license: "APACHE2" | ||
|
||
# Canonical GitHub repo | ||
github_repo: cloudposse/terraform-aws-ecs-alb-service-task | ||
|
||
# Badges to display | ||
badges: | ||
- name: "Build Status" | ||
image: "https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task.svg?branch=master" | ||
url: "https://travis-ci.org/cloudposse/terraform-aws-ecs-alb-service-task" | ||
- name: "Latest Release" | ||
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-ecs-alb-service-task.svg" | ||
url: "https://github.com/cloudposse/terraform-aws-ecs-alb-service-task/releases" | ||
- name: "Slack Community" | ||
image: "https://slack.cloudposse.com/badge.svg" | ||
url: "https://slack.cloudposse.com" | ||
|
||
related: | ||
- name: "terraform-aws-alb" | ||
description: "Terraform module to provision a standard ALB for HTTP/HTTP traffic" | ||
url: "https://github.com/cloudposse/terraform-aws-alb" | ||
- name: "terraform-aws-alb-ingress" | ||
description: "Terraform module to provision an HTTP style ingress rule based on hostname and path for an ALB" | ||
url: "https://github.com/cloudposse/terraform-aws-alb-ingress" | ||
- name: "terraform-aws-codebuild" | ||
description: "Terraform Module to easily leverage AWS CodeBuild for Continuous Integration" | ||
url: "https://github.com/cloudposse/terraform-aws-codebuild" | ||
- name: "terraform-aws-ecr" | ||
description: "Terraform Module to manage Docker Container Registries on AWS ECR" | ||
url: "https://github.com/cloudposse/terraform-aws-ecr" | ||
- name: "terraform-aws-ecs-web-app" | ||
description: "Terraform module that implements a web app on ECS and supporting AWS resources" | ||
url: "https://github.com/cloudposse/terraform-aws-ecs-web-app" | ||
- name: "terraform-aws-ecs-codepipeline" | ||
description: "Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS" | ||
url: "https://github.com/cloudposse/terraform-aws-ecs-codepipeline" | ||
- name: "terraform-aws-ecs-cloudwatch-sns-alarms" | ||
description: "Terraform module to create CloudWatch Alarms on ECS Service level metrics" | ||
url: "https://github.com/cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms" | ||
- name: "terraform-aws-ecs-container-definition" | ||
description: "Terraform module to generate well-formed JSON documents that are passed to the aws_ecs_task_definition Terraform resource" | ||
url: "https://github.com/cloudposse/terraform-aws-ecs-container-definition" | ||
- name: "terraform-aws-lb-s3-bucket" | ||
description: "Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs." | ||
url: "https://github.com/cloudposse/terraform-aws-lb-s3-bucket" | ||
|
||
# Short description of this project | ||
description: |- | ||
Terraform module to create an ECS Service for a web app (task), and an ALB target group to route requests. | ||
# How to use this project | ||
usage: |- | ||
```hcl | ||
module "ecs_alb_service_task" { | ||
source = "git::https://github.com/cloudposse/terraform-aws-ecs-alb-service-task.git?ref=tags/0.2.0" | ||
name = "app" | ||
namespace = "eg" | ||
stage = "staging" | ||
alb_target_group_arn = "xxxxxxx" | ||
container_definition_json = "${module.container_definition.json}" | ||
container_name = "${module.default_label.id}" | ||
ecr_repository_name = "${module.ecr.repository_name}" | ||
ecs_cluster_arn = "xxxxxxx" | ||
launch_type = "FARGATE" | ||
vpc_id = "xxxxxxx" | ||
security_group_ids = ["xxxxx", "yyyyy"] | ||
private_subnet_ids = ["xxxxx", "yyyyy", "zzzzz"] | ||
} | ||
``` | ||
# Other files to include in this README from the project folder | ||
include: | ||
- "docs/targets.md" | ||
- "docs/terraform.md" | ||
|
||
# Contributors to this project | ||
contributors: | ||
- name: "Erik Osterman" | ||
github: "osterman" | ||
- name: "Igor Rodionov" | ||
github: "goruha" | ||
- name: "Andriy Knysh" | ||
github: "aknysh" | ||
- name: "Sarkis Varozian" | ||
github: "sarkis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Makefile Targets | ||
``` | ||
Available targets: | ||
help This help screen | ||
help/all Display help for all targets | ||
``` |
Oops, something went wrong.