I’ve been following the AWS tutorial. AWS instances spins up fine and changes when I amend main.tf. However, when I amend main.tf to reference an input varialbe and add a variables.tf file, the instance isn’t changed.
$ terraform -v
Terraform v1.1.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v3.70.0
Console output
$ terraform apply
aws_instance.app_server: Refreshing state... [id=i-0eb77b679b65d2a35]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
If I create the main.tf and variables.tf on a fresh build it works as expected.
Is there a step I am missing?