Terraform AWS CentOS EC2 Instance Deploying a CentOS EC2 Instance in AWS using Terraform To update the version of CentOS, just update the ami line in the linux-vm-main.tf file, with a variable from the centos-versions.tf file.