Skip to content

Commit 0df6efe

Browse files
committed
ignore instance_type & key
1 parent 4e2a344 commit 0df6efe

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

custom.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ variable "alarm_sns_topic_arn" {
88
description = "The ARN of the SNS topic to notify when on critical alerts"
99
}
1010

11-
variable "ignore_in_lifecycle" {
12-
default = []
13-
description = "ignore instance type changes"
14-
}
15-
1611
variable "environment" {
1712
type = string
1813
description = "The environment tag to apply to all resources. eg: production, testing, staging, etc"

main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ resource "aws_instance" "this" {
189189
}
190190

191191
lifecycle {
192-
ignore_changes = var.ignore_in_lifecycle
192+
ignore_changes = [
193+
key_name,
194+
instance_type,
195+
]
193196
}
194197

195198
tags = merge({

0 commit comments

Comments
 (0)