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

fix tags and providers version update #10

Merged
merged 1 commit into from
Jun 28, 2023
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
19 changes: 16 additions & 3 deletions infra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ resource "aws_autoscaling_group" "master" {
id = aws_launch_template.master[count.index].id
version = "$Latest"
}
tags = local.master_tags

dynamic "tag" {
for_each = local.master_tags
content {
key = tag.value.key
propagate_at_launch = tag.value.propagate_at_launch
value = tag.value.value
}
}
depends_on = [
aws_route53_record.alb_ingress,
aws_lb.kubeapi
Expand All @@ -86,7 +92,14 @@ resource "aws_autoscaling_group" "worker" {
version = "$Latest"
}

tags = each.value.tags
dynamic "tag" {
for_each = local.master_tags
content {
key = tag.value.key
propagate_at_launch = tag.value.propagate_at_launch
value = tag.value.value
}
}

depends_on = [
aws_route53_record.alb_ingress,
Expand Down
8 changes: 4 additions & 4 deletions init.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
version = "~> 5.0"
}
null = "~> 2.1"
random = "~> 2.2"
template = "~> 2.1"
null = "~> 3.2"
random = "~> 3.4"
template = "~> 2.2"
}
}

Expand Down