Skip to content

Commit

Permalink
Updating tags, updating family to use service_label (#9)
Browse files Browse the repository at this point in the history
* adding autoscaling capabilites

* removing ecs cluster name var

* fixing resource instance key

* fixing resource instance key

* adding count attribute for role

* adding count attribute

* removing role arn, not needed

* changing back to name

* updating to use ecs_service_name instead of mod name

* remove weird formatting for task policy arns

* testing new family setup and removing weird formatting

* testing tag updates

* updating container def tags

* testing attributes

* just going to use tags

* reverting formatting
  • Loading branch information
Mhart12 authored Jan 18, 2024
1 parent 8750ee0 commit b9103e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module "exec_label" {

resource "aws_ecs_task_definition" "default" {
count = local.create_task_definition ? 1 : 0
family = var.ecs_service_name
family = var.ecs_service_name != null ? var.ecs_service_name : module.service_label.id
container_definitions = var.container_definition_json
requires_compatibilities = [var.launch_type]
network_mode = var.network_mode
Expand Down Expand Up @@ -145,7 +145,7 @@ resource "aws_ecs_task_definition" "default" {
}
}

tags = var.use_old_arn ? null : module.this.tags
tags = var.use_old_arn ? null : module.task_label.tags
}

# IAM
Expand Down Expand Up @@ -427,7 +427,7 @@ resource "aws_ecs_service" "ignore_changes_task_definition" {

cluster = var.ecs_cluster_arn
propagate_tags = var.propagate_tags
tags = var.use_old_arn ? null : module.this.tags
tags = var.use_old_arn ? null : module.service_label.tags

deployment_controller {
type = var.deployment_controller_type
Expand Down Expand Up @@ -526,7 +526,7 @@ resource "aws_ecs_service" "ignore_changes_task_definition_and_desired_count" {

cluster = var.ecs_cluster_arn
propagate_tags = var.propagate_tags
tags = var.use_old_arn ? null : module.this.tags
tags = var.use_old_arn ? null : module.service_label.tags

deployment_controller {
type = var.deployment_controller_type
Expand Down Expand Up @@ -625,7 +625,7 @@ resource "aws_ecs_service" "ignore_changes_desired_count" {

cluster = var.ecs_cluster_arn
propagate_tags = var.propagate_tags
tags = var.use_old_arn ? null : module.this.tags
tags = var.use_old_arn ? null : module.service_label.tags

deployment_controller {
type = var.deployment_controller_type
Expand Down Expand Up @@ -724,7 +724,7 @@ resource "aws_ecs_service" "default" {

cluster = var.ecs_cluster_arn
propagate_tags = var.propagate_tags
tags = var.use_old_arn ? null : module.this.tags
tags = var.use_old_arn ? null : module.service_label.tags

deployment_controller {
type = var.deployment_controller_type
Expand Down

0 comments on commit b9103e7

Please sign in to comment.