diff --git a/02-Terraform-Basics/02-02-Terraform-Command-Basics/terraform-manifests/ec2-instance.tf b/02-Terraform-Basics/02-02-Terraform-Command-Basics/terraform-manifests/ec2-instance.tf index eae6b74c..0d45397b 100644 --- a/02-Terraform-Basics/02-02-Terraform-Command-Basics/terraform-manifests/ec2-instance.tf +++ b/02-Terraform-Basics/02-02-Terraform-Command-Basics/terraform-manifests/ec2-instance.tf @@ -2,8 +2,8 @@ terraform { required_providers { aws = { - source = "hashicorp/aws" - #version = "~> 5.0" # Optional but recommended in production + source = "hashicorp/aws" + version = "5.31.0" } } } @@ -16,6 +16,6 @@ provider "aws" { # Resource Block resource "aws_instance" "ec2demo" { - ami = "ami-0533f2ba8a1995cf9" # Amazon Linux in us-east-1, update as per your region + ami = "ami-03643cf1426c9b40b" # Amazon Linux in us-east-1, update as per your region instance_type = "t2.micro" } diff --git a/03-Terraform-Settings-Providers-Resources/terraform-manifests/c1-versions.tf b/03-Terraform-Settings-Providers-Resources/terraform-manifests/c1-versions.tf index 08b8c8e3..8db1b4ed 100644 --- a/03-Terraform-Settings-Providers-Resources/terraform-manifests/c1-versions.tf +++ b/03-Terraform-Settings-Providers-Resources/terraform-manifests/c1-versions.tf @@ -1,13 +1,13 @@ # Terraform Block terraform { - required_version = ">= 1.6" # which means any version equal & above 0.14 like 0.15, 0.16 etc and < 1.xx required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.0" + version = "5.31.0" } - } -} + } +} + # Provider Block provider "aws" { region = "us-east-1" diff --git a/03-Terraform-Settings-Providers-Resources/terraform-manifests/c2-ec2instance.tf b/03-Terraform-Settings-Providers-Resources/terraform-manifests/c2-ec2instance.tf index e90b892e..1b85b54b 100644 --- a/03-Terraform-Settings-Providers-Resources/terraform-manifests/c2-ec2instance.tf +++ b/03-Terraform-Settings-Providers-Resources/terraform-manifests/c2-ec2instance.tf @@ -1,6 +1,6 @@ # Resource: EC2 Instance resource "aws_instance" "myec2vm" { - ami = "ami-0742b4e673072066f" + ami = "ami-079db87dc4c10ac91" instance_type = "t3.micro" user_data = file("${path.module}/app1-install.sh") tags = {