Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tags in Services #16

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ In addition you have the option to create or not :
| schedule\_cron\_stop | Cron expression to define when to trigger a stop of the auto-scaling group. E.g. 'cron(00 09 ? \* MON-FRI \*)' to start at 8am UTC time | `string` | `""` | no |
| security\_groups | The security groups associated with the task or service | `any` | `null` | no |
| subnets | The subnets associated with the task or service. (REQUIRED IF 'LAUCH\_TYPE' IS FARGATE) | `any` | `null` | no |
| task\_role\_policies | Custom policies to be added on the task role. | `list` | `[]` | no |
| task\_role\_policies | Custom policies to be added on the task role | `list` | `[]` | no |
| task\_role\_policies\_managed | AWS Managed policies to be added on the task role. | `list` | `[]` | no |
| vpc\_id | VPC ID to deploy this app to | `any` | n/a | yes |
| without\_capacity\_provider | Launch service without capacity provider | `bool` | `false` | no |
| tags | A map of tags to add to service | `map(string)` | `{}`| no |

## Outputs

Expand Down
5 changes: 5 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,8 @@ variable "schedule_cron_stop" {
description = "Cron expression to define when to trigger a stop of the auto-scaling group. E.g. 'cron(00 09 ? * MON-FRI *)' to start at 8am UTC time"
}

variable "tags" {
description = "A map of tags to add to service"
type = map(string)
default = {}
}
2 changes: 2 additions & 0 deletions ecs-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ resource "aws_ecs_service" "default" {
lifecycle {
ignore_changes = [task_definition]
}

tags = var.tags
}
Loading