Skip to content

Commit

Permalink
Merge pull request #10 from shalb/prov-versions-update
Browse files Browse the repository at this point in the history
fix tags and providers version update
  • Loading branch information
romanprog authored Jun 28, 2023
2 parents 16aea1c + 1cba5b7 commit 0004bf7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
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

0 comments on commit 0004bf7

Please sign in to comment.