Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Improve and simplify tf structure for ecs fargate #90

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

akoufa
Copy link
Member

@akoufa akoufa commented Mar 1, 2022

No description provided.

@akoufa akoufa requested a review from eldimious March 1, 2022 20:08
resource "aws_launch_template" "this" {
name_prefix = var.lauch_template_name
image_id = data.aws_ami.amazon_linux.id
instance_type = "t2.micro"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can move it to a variable with default value

id = aws_launch_template.this.id
version = "$Latest"
}
desired_capacity = 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can move it to a variable with default value, same for the rest of props


action {
type = var.alb_listener_rule_type # Redirect all traffic from the ALB to the target group
type = var.alb.listener.rule_type # Redirect all traffic from the ALB to the target group
target_group_arn = aws_alb_target_group.this[0].arn
}

condition {
path_pattern {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we can add it in a dynamic block

Environment = var.environment
}

data "aws_availability_zones" "available" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm this way we fetch all aws_availability_zones right? If we want to deploy something only to 2 of 3 availability_zones ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants