Terraform : AWS : Terraform on AWS | Section 4: Terraform Input Variables and Datasources
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 25. Step-01: Introduction to Variables Section From the terraform perspective . we are going to learn the following on the left and from AWS perspective We are going to dynamically get the latest AMI id from AWS, using data source terraform concept and then create the EC2 Instance . In addition to that we are also going to associate an existing Key pair to for whatever is present in our EC2 key Pairs to our EC2 instance when it is creating . Earlier we manually configured the NSG - Network security group. here we are going to create two resources called VPC-SSH , VPC-Web, so that can be used to access the EC2 instance . So using ssh you should be able to access the EC2 instance and using VPC Web security will be used to access the web server. We also need to understand why are we creating two security groups ...