Skip to content

Commit

Permalink
Merge pull request #16 from calimanfilho/master
Browse files Browse the repository at this point in the history
Add Tags in Services
  • Loading branch information
brunodasilvalenga authored Jun 24, 2024
2 parents 176dc74 + d4e2231 commit 014d454
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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
}

0 comments on commit 014d454

Please sign in to comment.