diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index cce6252c82649..de8f446d05986 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -255,6 +255,9 @@ resource "aws_instance" "dev" { # Required if you are using our example policy, see template README Coder_Provisioned = "true" } + lifecycle { + ignore_changes = [ami] + } } resource "coder_metadata" "workspace_info" { diff --git a/examples/templates/aws-windows/main.tf b/examples/templates/aws-windows/main.tf index 39e10f473fa26..1b9bb54021499 100644 --- a/examples/templates/aws-windows/main.tf +++ b/examples/templates/aws-windows/main.tf @@ -191,6 +191,9 @@ resource "aws_instance" "dev" { # Required if you are using our example policy, see template README Coder_Provisioned = "true" } + lifecycle { + ignore_changes = [ami] + } } resource "coder_metadata" "workspace_info" {