Skip to content

Commit

Permalink
Replace tags with tag blocks (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiPrasannaGopularam authored Mar 20, 2023
1 parent a7c0bc2 commit 864d7d7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
32 changes: 15 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,21 @@ resource "aws_autoscaling_group" "app" {
launch_configuration = aws_launch_configuration.app.name
vpc_zone_identifier = var.asg_subnets

tags = [
{
key = "Name"
value = "AS-${var.env}-${var.app}"
propagate_at_launch = true
},
{
key = "App"
value = var.app
propagate_at_launch = true
},
{
key = "CrowdStrikeEnv"
value = "production"
propagate_at_launch = true
},
]
tag {
key = "Name"
value = "AS-${var.env}-${var.app}"
propagate_at_launch = true
}
tag {
key = "App"
value = var.app
propagate_at_launch = true
}
tag {
key = "CrowdStrikeEnv"
value = "production"
propagate_at_launch = true
}

lifecycle {
create_before_destroy = true
Expand Down
1 change: 0 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ output "autoscaling_group_id" {
output "autoscaling_group_name" {
value = aws_autoscaling_group.app.name
}

2 changes: 1 addition & 1 deletion providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.75.2"
version = "~> 4.9.0"
}
}
}
1 change: 0 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,3 @@ variable "associate_public_ip_address" {
description = "Associate a public IP address with app server instances"
default = "false"
}

0 comments on commit 864d7d7

Please sign in to comment.