Template to create instances on the basis of choices and display the output value with conditions Template my-ec2.tf is build to create number of instances on the basis of inputs. Use of mapping and data sources is to set variable for instance_type & fetch ami details on the baisis of choices. Then conditions has been implemented in output value to display required output as per the inputs.