Skip to content

Commit 763c8f7

Browse files
committed
refactor!: remove launch_template variable
1 parent 245c82e commit 763c8f7

File tree

4 files changed

+5
-22
lines changed

4 files changed

+5
-22
lines changed

iam.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ data "aws_iam_policy_document" "lambda" {
4949
"ec2:ModifyLaunchTemplate",
5050
]
5151

52-
resources = [
53-
data.aws_launch_template.template.arn,
54-
]
52+
resources = var.launch_templates_arns
5553
}
5654

5755
statement {

main.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@ data "aws_region" "current" {}
55
data "aws_autoscaling_group" "group" {
66
name = var.autoscaling_group_name
77
}
8-
9-
data "aws_launch_template" "template" {
10-
name = var.launch_template_name
11-
}

outputs.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
11
output "asg_arn" {
22
value = data.aws_autoscaling_group.group.arn
33
}
4-
5-
output "lt_arn" {
6-
value = data.aws_launch_template.template.arn
7-
}
8-
9-
output "lt_id" {
10-
value = data.aws_launch_template.template.id
11-
}
12-
13-
output "lt_name" {
14-
value = data.aws_launch_template.template.name
15-
}

variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ variable "lambda_timeout" {
9999
type = number
100100
}
101101

102-
variable "launch_template_name" {
103-
description = "Name of the launch template used by auto scaling group to refresh"
104-
type = string
102+
variable "launch_templates_arns" {
103+
description = "List of Launch Template ARNs to allow access to"
104+
default = ["*"]
105+
type = list(string)
105106
}
106107

107108
variable "launch_template_source_version" {

0 commit comments

Comments
 (0)