title
Learn Terraform (and AWS) by Building a Dev Environment – Full Course for Beginners
description
Learn Terraform basics as you utilize Visual Studio Code (On Windows, Mac, or Linux!) to deploy AWS resources and an EC2 instance that you can SSH into to have your own redeployable environment.
✏️ Derek Morgan created this course. Check out more of his courses at: https://morethancertified.com
🔗 LinkedIn: https://linkedin.com/in/derekm1215
🔗 Twitter: https://twitter.com/derekm1215
⭐️ Course Contents ⭐️
⌨️ Welcome and Setup (0:00)
⌨️ What We're Going to Build
⌨️ AWS IAM Setup
⌨️ Local Environment Setup
⌨️ Let's Build! (7:22)
⌨️ AWS Provider and Terraform Init
⌨️ A VPC and Terraform Apply
⌨️ The Terraform State
⌨️ Terraform Destroy
⌨️ A Subnet and Referencing
⌨️ An IGW and Terraform fmt
⌨️ A Route Table
⌨️ A Route Table Association
⌨️ A Security Group
⌨️ An AMI Datasource
⌨️ A Key Pair
⌨️ An EC2 Instance
⌨️ Userdata and the File Function
⌨️ SSH Config Scripts
⌨️ The Provisioner and Templatefile
⌨️ The Deployment and Replace
⌨️ Variables
⌨️ Variable Precedence
⌨️ Conditional Expressions
⌨️ Outputs
⌨️ Conclusion
🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster
--
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://freecodecamp.org/news
detail
{'title': 'Learn Terraform (and AWS) by Building a Dev Environment – Full Course for Beginners', 'heatmap': [{'end': 301.376, 'start': 238.227, 'weight': 0.892}, {'end': 778.696, 'start': 709.038, 'weight': 0.715}, {'end': 1131.554, 'start': 1068.643, 'weight': 0.725}, {'end': 2858.515, 'start': 2796.952, 'weight': 0.769}, {'end': 3161.785, 'start': 3097.193, 'weight': 0.708}, {'end': 3932.496, 'start': 3864.184, 'weight': 1}], 'summary': 'Course introduces terraform with aws, covering foundational knowledge, deploying an ec2 instance, vpc configuration, state management, infrastructure deployment, managing ubuntu server, configuring provisioners, variable precedence, and dynamic interpreters for ssh config.', 'chapters': [{'end': 42.986, 'segs': [{'end': 42.986, 'src': 'embed', 'start': 0.089, 'weight': 0, 'content': [{'end': 4.814, 'text': 'Learn how to use Terraform with AWS in this course from Derek Morgan.', 'start': 0.089, 'duration': 4.725}, {'end': 10.159, 'text': "You'll realize within a few minutes of watching how amazing Derek is as an instructor.", 'start': 5.114, 'duration': 5.045}, {'end': 22.11, 'text': 'Hello and welcome to the Build a Development Environment with AWS and Terraform Resume Foundations project.', 'start': 14.383, 'duration': 7.727}, {'end': 38.383, 'text': 'So a resume foundations project is a short project that is tailored to cover the important aspects of a technology in order to help you build the foundations necessary to build your own projects and apply them to your resumes.', 'start': 22.955, 'duration': 15.428}, {'end': 42.986, 'text': "So let's take a look at what you're going to find in the course.", 'start': 39.344, 'duration': 3.642}], 'summary': 'Course on using terraform with aws by derek morgan for resume foundations.', 'duration': 42.897, 'max_score': 0.089, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB089.jpg'}], 'start': 0.089, 'title': 'Aws terraform foundations', 'summary': "Introduces a short project to build foundational knowledge in using terraform with aws, highlighting the instructor's expertise and the succinct nature of the course.", 'chapters': [{'end': 42.986, 'start': 0.089, 'title': 'Aws terraform foundations', 'summary': "Introduces a short project to build foundational knowledge in using terraform with aws, highlighting the instructor's expertise and the succinct nature of the course.", 'duration': 42.897, 'highlights': ['The course introduces a short project tailored to cover important aspects of using Terraform with AWS to build foundational knowledge.', "Derek Morgan's expertise as an instructor is highlighted, with his effectiveness mentioned within a few minutes of watching the course.", 'The project aims to help learners build foundations for their own projects and enhance their resumes by applying the knowledge gained.']}], 'duration': 42.897, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB089.jpg', 'highlights': ['The course introduces a short project tailored to cover important aspects of using Terraform with AWS to build foundational knowledge.', 'The project aims to help learners build foundations for their own projects and enhance their resumes by applying the knowledge gained.', "Derek Morgan's expertise as an instructor is highlighted, with his effectiveness mentioned within a few minutes of watching the course."]}, {'end': 795.266, 'segs': [{'end': 121.31, 'src': 'embed', 'start': 43.985, 'weight': 0, 'content': [{'end': 52.353, 'text': "In this two hour project centered around terraform, you're going to use VS code and deploy an AWS EC two instance,", 'start': 43.985, 'duration': 8.368}, {'end': 56.356, 'text': 'along with the VPC internet gateway, security groups, etc.', 'start': 52.353, 'duration': 4.003}, {'end': 62.062, 'text': 'that will serve as a remote development environment that you can log into directly from VS code.', 'start': 56.356, 'duration': 5.706}, {'end': 71.985, 'text': "We'll utilize several Terraform tools and functions, such as Terraform State Format, Replace Console, Variables, Conditionals, File,", 'start': 62.702, 'duration': 9.283}, {'end': 73.566, 'text': 'Template File and more.', 'start': 71.985, 'duration': 1.581}, {'end': 87.891, 'text': "We'll also use AWS user data and a local exec provisioner to bootstrap the EC2 instance and add its connection information to your VS Code SSH configuration file,", 'start': 74.406, 'duration': 13.485}, {'end': 90.912, 'text': 'allowing you to modify it for your own projects.', 'start': 87.891, 'duration': 3.021}, {'end': 100.664, 'text': "Since we'll make heavy use of documentation and highlight the process behind developing a brand new Terraform deployment,", 'start': 92.321, 'duration': 8.343}, {'end': 108.127, 'text': "you'll have the skills you need to dive deeper into Terraform and add this extremely in-demand skill to your resume.", 'start': 100.664, 'duration': 7.463}, {'end': 121.31, 'text': "So what are you waiting for? Sign up today and don't forget to Terraform Apply yourself! So let's start out right here in the AWS console.", 'start': 109.208, 'duration': 12.102}], 'summary': 'Learn to deploy aws ec2 instance with terraform in a two hour project using vs code and various terraform tools, enabling the creation of a remote development environment.', 'duration': 77.325, 'max_score': 43.985, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB043985.jpg'}, {'end': 301.376, 'src': 'heatmap', 'start': 238.227, 'weight': 0.892, 'content': [{'end': 240.008, 'text': 'And then search for AWS.', 'start': 238.227, 'duration': 1.781}, {'end': 246.293, 'text': "And once you've done that, we've got this AWS toolkit here, go ahead and click install.", 'start': 241.169, 'duration': 5.124}, {'end': 250.031, 'text': 'Looks like everything installed fine.', 'start': 248.41, 'duration': 1.621}, {'end': 254.573, 'text': "So I'm going to go ahead and close this pane and close this tab.", 'start': 250.051, 'duration': 4.522}, {'end': 257.815, 'text': "And then I'm going to click on this little AWS icon.", 'start': 255.194, 'duration': 2.621}, {'end': 262.464, 'text': "As you can see, we've got connect to AWS right here.", 'start': 259.901, 'duration': 2.563}, {'end': 266.007, 'text': 'But before we can do that, we need to get some credentials installed.', 'start': 262.744, 'duration': 3.263}, {'end': 269.01, 'text': 'So head up to view and command palette.', 'start': 266.307, 'duration': 2.703}, {'end': 272.053, 'text': "Then as you can see, I've searched for this before.", 'start': 269.751, 'duration': 2.302}, {'end': 278.699, 'text': 'But if you need to get to it, you can type AWS and then start typing create credentials profile, just like so.', 'start': 272.253, 'duration': 6.446}, {'end': 284.304, 'text': "And then open that And as you can see here, I've got a credentials profile called VS code.", 'start': 279.12, 'duration': 5.184}, {'end': 290.408, 'text': 'If yours looks different, make sure that you get this looking the same if you want to follow along in the course exactly.', 'start': 284.764, 'duration': 5.644}, {'end': 295.832, 'text': "But of course, if you don't, or you're comfortable making simple modifications, you can name this whatever you'd like.", 'start': 290.468, 'duration': 5.364}, {'end': 301.376, 'text': 'But what we need to do is populate this AWS access key ID in secret access key.', 'start': 296.253, 'duration': 5.123}], 'summary': 'Installation and setup of aws toolkit in vs code for connecting to aws and creating credentials.', 'duration': 63.149, 'max_score': 238.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0238227.jpg'}, {'end': 284.304, 'src': 'embed', 'start': 255.194, 'weight': 3, 'content': [{'end': 257.815, 'text': "And then I'm going to click on this little AWS icon.", 'start': 255.194, 'duration': 2.621}, {'end': 262.464, 'text': "As you can see, we've got connect to AWS right here.", 'start': 259.901, 'duration': 2.563}, {'end': 266.007, 'text': 'But before we can do that, we need to get some credentials installed.', 'start': 262.744, 'duration': 3.263}, {'end': 269.01, 'text': 'So head up to view and command palette.', 'start': 266.307, 'duration': 2.703}, {'end': 272.053, 'text': "Then as you can see, I've searched for this before.", 'start': 269.751, 'duration': 2.302}, {'end': 278.699, 'text': 'But if you need to get to it, you can type AWS and then start typing create credentials profile, just like so.', 'start': 272.253, 'duration': 6.446}, {'end': 284.304, 'text': "And then open that And as you can see here, I've got a credentials profile called VS code.", 'start': 279.12, 'duration': 5.184}], 'summary': 'Process for setting up aws credentials in vs code.', 'duration': 29.11, 'max_score': 255.194, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0255194.jpg'}, {'end': 496.324, 'src': 'embed', 'start': 466.505, 'weight': 5, 'content': [{'end': 469.986, 'text': "So what we're going to do is we're going to use VS code on our terminal.", 'start': 466.505, 'duration': 3.481}, {'end': 477.929, 'text': "And then we're going to use the terraform configuration files, providers, variables, main terraform.tf vars,", 'start': 470.326, 'duration': 7.603}, {'end': 481.272, 'text': 'which of course we will be explaining all of these throughout the course.', 'start': 477.929, 'duration': 3.343}, {'end': 492.161, 'text': "And then we've got a configuration file here that's going to configure VS code based on the IP and other information of our developer node.", 'start': 481.552, 'duration': 10.609}, {'end': 496.324, 'text': "And we've got our user data that's going to bootstrap that node.", 'start': 492.521, 'duration': 3.803}], 'summary': 'Using vs code and terraform to configure developer node.', 'duration': 29.819, 'max_score': 466.505, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0466505.jpg'}, {'end': 649.868, 'src': 'embed', 'start': 622.303, 'weight': 4, 'content': [{'end': 628.747, 'text': 'Now after that, we need to add our provider block that is the required providers block.', 'start': 622.303, 'duration': 6.444}, {'end': 632.23, 'text': 'And that provides configuration that terraform needs to know about.', 'start': 629.027, 'duration': 3.203}, {'end': 639.297, 'text': 'But the provider block itself provides the information needed to access AWS specifically.', 'start': 632.99, 'duration': 6.307}, {'end': 645.583, 'text': 'So if you scroll down here, you can actually see that we have some usage examples.', 'start': 640.057, 'duration': 5.526}, {'end': 649.868, 'text': 'And we have one right here with shared credentials file already here for us.', 'start': 646.084, 'duration': 3.784}], 'summary': 'Adding provider block for aws with usage examples.', 'duration': 27.565, 'max_score': 622.303, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0622303.jpg'}, {'end': 778.696, 'src': 'heatmap', 'start': 709.038, 'weight': 0.715, 'content': [{'end': 719.842, 'text': "Alright, so now that that's done, let's go ahead and run a terraform init to initialize this and connect to AWS to ensure everything works out.", 'start': 709.038, 'duration': 10.804}, {'end': 721.423, 'text': "So I'm going to click on terminal.", 'start': 720.142, 'duration': 1.281}, {'end': 724.299, 'text': 'and new terminal just like so.', 'start': 722.617, 'duration': 1.682}, {'end': 728.545, 'text': "Let's go ahead and I'm going to pull this up a little bit.", 'start': 725.12, 'duration': 3.425}, {'end': 733.612, 'text': "Clear this screen and let's go ahead and run Terraform init.", 'start': 729.286, 'duration': 4.326}, {'end': 740.348, 'text': 'All right, Terraform has been successfully initialized.', 'start': 736.986, 'duration': 3.362}, {'end': 745.36, 'text': "As you can see, we've got HashiCorp AWS version 3.71.", 'start': 740.508, 'duration': 4.852}, {'end': 746.49, 'text': "0 At least that's my version.", 'start': 745.36, 'duration': 1.13}, {'end': 748.951, 'text': 'If your version is different, that is perfectly fine.', 'start': 746.51, 'duration': 2.441}, {'end': 755.414, 'text': 'Also, you can see that Terraform has created a lock file, Terraform lock dot HCL.', 'start': 749.271, 'duration': 6.143}, {'end': 759.436, 'text': "And what that's going to do is ensure that the version is frozen.", 'start': 755.854, 'duration': 3.582}, {'end': 762.265, 'text': "Again, you can change this if you'd like.", 'start': 760.444, 'duration': 1.821}, {'end': 765.167, 'text': "And this should be the current version you're using.", 'start': 762.646, 'duration': 2.521}, {'end': 772.392, 'text': "But this is something you might want to keep in your GitHub or GitLab, or wherever you're storing your code repository,", 'start': 765.507, 'duration': 6.885}, {'end': 778.696, 'text': 'so that you can ensure that every time you run this code, it always uses the same version of the provider.', 'start': 772.392, 'duration': 6.304}], 'summary': 'Successfully initialized terraform with hashicorp aws version 3.71.0 and created a lock file for version control.', 'duration': 69.658, 'max_score': 709.038, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0709038.jpg'}], 'start': 43.985, 'title': 'Terraform aws ec2 deployment and setting up aws user', 'summary': 'Covers a two-hour project on deploying an aws ec2 instance using terraform and vs code, including vpc internet gateway, security groups, and various terraform tools. it also demonstrates setting up an aws user in visual studio code, installing the aws extension, and creating a working directory in vs code, emphasizing the importance of using a stable provider version for the terraform aws deployment.', 'chapters': [{'end': 121.31, 'start': 43.985, 'title': 'Terraform aws ec2 deployment', 'summary': 'Explores a two-hour project on deploying an aws ec2 instance using terraform and vs code, including vpc internet gateway, security groups, and the utilization of various terraform tools and functions, equipping learners with the skills to add terraform deployment to their resume.', 'duration': 77.325, 'highlights': ['The chapter explores a two-hour project on deploying an AWS EC2 instance using Terraform and VS code The project is centered around deploying an AWS EC2 instance using Terraform and VS code, providing hands-on experience for the learners.', "Utilization of various Terraform tools and functions The project involves the utilization of various Terraform tools and functions, such as Terraform State Format, Replace Console, Variables, Conditionals, File, Template File, and more, enhancing learners' understanding of Terraform.", 'Equipping learners with the skills to add Terraform deployment to their resume The chapter focuses on equipping learners with the skills needed to add Terraform deployment to their resume, emphasizing the in-demand nature of this skill in the job market.']}, {'end': 795.266, 'start': 121.951, 'title': 'Setting up aws user and terraform in visual studio code', 'summary': 'Covers setting up an aws user in visual studio code, installing the aws extension, adding terraform syntax highlighting, and creating a working directory in vs code. it also demonstrates setting up the aws provider within terraform and initializing the connection to aws, emphasizing the importance of using a stable provider version.', 'duration': 673.315, 'highlights': ['Setting up an AWS user in Visual Studio Code The process involves creating a new user, attaching administrator access policies, and obtaining access key and secret access key, with emphasis on installing the AWS extension and configuring credentials.', "Initializing AWS provider and connecting to AWS The demonstration includes setting up the AWS provider within Terraform, providing the necessary configuration, and initializing the connection to AWS using 'terraform init', highlighting the importance of freezing the provider version for stability.", 'Adding Terraform syntax highlighting and creating a working directory The process involves installing the Terraform extension in VS code, creating a working directory for Terraform, and emphasizing the importance of keeping the environment minimal to reduce potential issues.']}], 'duration': 751.281, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB043985.jpg', 'highlights': ['The project is centered around deploying an AWS EC2 instance using Terraform and VS code, providing hands-on experience for the learners.', 'The chapter focuses on equipping learners with the skills needed to add Terraform deployment to their resume, emphasizing the in-demand nature of this skill in the job market.', "The project involves the utilization of various Terraform tools and functions, enhancing learners' understanding of Terraform.", 'The process involves creating a new user, attaching administrator access policies, and obtaining access key and secret access key, with emphasis on installing the AWS extension and configuring credentials.', "The demonstration includes setting up the AWS provider within Terraform, providing the necessary configuration, and initializing the connection to AWS using 'terraform init', highlighting the importance of freezing the provider version for stability.", 'The process involves installing the Terraform extension in VS code, creating a working directory for Terraform, and emphasizing the importance of keeping the environment minimal to reduce potential issues.']}, {'end': 1327.394, 'segs': [{'end': 862.258, 'src': 'embed', 'start': 795.726, 'weight': 0, 'content': [{'end': 799.088, 'text': "And for Linux and Mac, you'll actually see another binary there.", 'start': 795.726, 'duration': 3.362}, {'end': 802.889, 'text': "But this is compiled and you're not going to go digging through it.", 'start': 799.568, 'duration': 3.321}, {'end': 807.431, 'text': 'As you can see here, the VPC is actually pretty straightforward.', 'start': 803.389, 'duration': 4.042}, {'end': 811.913, 'text': 'you basically specify the resource, this being the actual resource.', 'start': 807.431, 'duration': 4.482}, {'end': 817.616, 'text': 'as you can see, AWS VPC, This is a static value that cannot be changed.', 'start': 811.913, 'duration': 5.703}, {'end': 820.579, 'text': "If you change this, you're not going to deploy a VPC.", 'start': 817.817, 'duration': 2.762}, {'end': 827.705, 'text': "Now after that, we've got the name for this VPC, which in this case is main, we can name it whatever it is we want.", 'start': 820.819, 'duration': 6.886}, {'end': 831.908, 'text': 'This is a logical name that only terraform knows about.', 'start': 827.965, 'duration': 3.943}, {'end': 835.111, 'text': "So this isn't going to show up in AWS anywhere.", 'start': 832.168, 'duration': 2.943}, {'end': 837.372, 'text': 'So again, make sure you understand that.', 'start': 835.311, 'duration': 2.061}, {'end': 841.095, 'text': 'But this is how we will reference this VPC in future lessons.', 'start': 837.513, 'duration': 3.582}, {'end': 842.917, 'text': 'And then we just provide a cider block.', 'start': 841.276, 'duration': 1.641}, {'end': 849.344, 'text': 'Now there are also lots of other options that you can specify here, as you can see, it gets pretty complicated.', 'start': 843.177, 'duration': 6.167}, {'end': 855.39, 'text': 'If you go down to the argument reference, you can see that we have a lot of stuff here we can use,', 'start': 849.364, 'duration': 6.026}, {'end': 860.476, 'text': 'such as enable DNS support which defaults to true and enable DNS hostnames.', 'start': 855.39, 'duration': 5.086}, {'end': 862.258, 'text': 'which defaults to false.', 'start': 860.956, 'duration': 1.302}], 'summary': 'Setting up aws vpc using terraform, with options like dns support and hostnames.', 'duration': 66.532, 'max_score': 795.726, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0795726.jpg'}, {'end': 1094.552, 'src': 'embed', 'start': 1068.643, 'weight': 2, 'content': [{'end': 1073.184, 'text': "Now as you can see, we've got these green plus marks, that means that these are all being added.", 'start': 1068.643, 'duration': 4.541}, {'end': 1074.765, 'text': 'So that all looks good.', 'start': 1073.504, 'duration': 1.261}, {'end': 1080.727, 'text': "We've got one actual resource AWS VPC dot MTC VPC to add.", 'start': 1074.845, 'duration': 5.882}, {'end': 1086.649, 'text': 'So what we want to do next is apply will run a terraform apply just like so.', 'start': 1081.027, 'duration': 5.622}, {'end': 1094.552, 'text': 'And as you can see, it basically runs another plan, and then asks us to confirm.', 'start': 1089.07, 'duration': 5.482}], 'summary': 'Adding one aws vpc resource using terraform.', 'duration': 25.909, 'max_score': 1068.643, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01068643.jpg'}, {'end': 1131.554, 'src': 'heatmap', 'start': 1068.643, 'weight': 0.725, 'content': [{'end': 1073.184, 'text': "Now as you can see, we've got these green plus marks, that means that these are all being added.", 'start': 1068.643, 'duration': 4.541}, {'end': 1074.765, 'text': 'So that all looks good.', 'start': 1073.504, 'duration': 1.261}, {'end': 1080.727, 'text': "We've got one actual resource AWS VPC dot MTC VPC to add.", 'start': 1074.845, 'duration': 5.882}, {'end': 1086.649, 'text': 'So what we want to do next is apply will run a terraform apply just like so.', 'start': 1081.027, 'duration': 5.622}, {'end': 1094.552, 'text': 'And as you can see, it basically runs another plan, and then asks us to confirm.', 'start': 1089.07, 'duration': 5.482}, {'end': 1099.334, 'text': "And to confirm, I'm going to type Yes, scroll this up a little bit.", 'start': 1095.332, 'duration': 4.002}, {'end': 1102.535, 'text': 'And our VPC is being created.', 'start': 1100.414, 'duration': 2.121}, {'end': 1104.535, 'text': 'All right, perfect.', 'start': 1103.513, 'duration': 1.022}, {'end': 1107.198, 'text': 'Our apply is now complete.', 'start': 1105.115, 'duration': 2.083}, {'end': 1112.506, 'text': "So if we go over here to our AWS pane, I'm going to click No here.", 'start': 1107.539, 'duration': 4.967}, {'end': 1116.391, 'text': 'I do not need us east one right now, because I am in US West.', 'start': 1112.506, 'duration': 3.885}, {'end': 1117.934, 'text': "I'm then going to click on resources.", 'start': 1116.391, 'duration': 1.543}, {'end': 1124.408, 'text': "And as you can see, I've actually got some resources already shown here that's from a previous installation.", 'start': 1119.244, 'duration': 5.164}, {'end': 1129.853, 'text': 'If you click on this little sprocket type AWS colon colon EC.', 'start': 1124.909, 'duration': 4.944}, {'end': 1131.554, 'text': 'two colon colon VPC.', 'start': 1129.853, 'duration': 1.701}], 'summary': 'Creating aws vpc using terraform, 1 vpc added, apply complete', 'duration': 62.911, 'max_score': 1068.643, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01068643.jpg'}, {'end': 1199.97, 'src': 'embed', 'start': 1173.594, 'weight': 3, 'content': [{'end': 1177.256, 'text': 'This is probably one of the most important concepts with Terraform.', 'start': 1173.594, 'duration': 3.662}, {'end': 1183.86, 'text': 'So make sure you read over the documentation a good bit if you really want to understand how things work.', 'start': 1177.876, 'duration': 5.984}, {'end': 1192.345, 'text': "But essentially, we're just going to take a look here and see exactly what is stored in our state as we deploy resources.", 'start': 1184.1, 'duration': 8.245}, {'end': 1194.907, 'text': "As you can see, there's a lot here in the docs.", 'start': 1192.625, 'duration': 2.282}, {'end': 1199.97, 'text': "And we're going to explore several pieces of this as we build our infrastructure.", 'start': 1195.667, 'duration': 4.303}], 'summary': 'Understanding terraform concepts is crucial. explore state storage and deployment resources.', 'duration': 26.376, 'max_score': 1173.594, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01173594.jpg'}], 'start': 795.726, 'title': 'Vpc configuration and creation in terraform', 'summary': 'Covers the process of specifying a vpc resource in terraform, including naming the vpc, providing a cider block, enabling dns hostnames and support, adding tags, and exploring terraform state. it also emphasizes the importance of understanding deployment information storage for terraform to use.', 'chapters': [{'end': 862.258, 'start': 795.726, 'title': 'Terraform vpc configuration', 'summary': 'Explains the straightforward process of specifying a vpc resource in terraform, including specifying the resource, naming the vpc, and providing a cider block, while also mentioning the various other options and defaults available for configuration.', 'duration': 66.532, 'highlights': ['The VPC configuration process in Terraform involves specifying the resource, naming the VPC, and providing a cider block, with the logical name being exclusive to Terraform and not reflected in AWS.', 'The AWS VPC static value cannot be changed, as altering it would prevent VPC deployment.', 'Additional options for VPC configuration include enabling DNS support (defaults to true) and enabling DNS hostnames (defaults to false).']}, {'end': 1327.394, 'start': 862.698, 'title': 'Creating a vpc with terraform', 'summary': 'Demonstrates creating a vpc using terraform, specifying the vpc resource, enabling dns hostnames and support, adding tags, running a terraform plan and apply, and exploring the terraform state, with a focus on the importance of understanding how information about the deployment is stored for terraform to use.', 'duration': 464.696, 'highlights': ["Creating a VPC resource by specifying the cider block, enabling DNS hostnames and support, and adding tags The chapter demonstrates creating a VPC using Terraform by specifying the VPC resource, enabling DNS hostnames and support, and adding tags, with the cider block specified as 10.123.0.0/16, enabling DNS hostnames as true, and adding a 'dev' tag to the VPC.", "Running terraform plan and apply to build the VPC The chapter shows running a 'terraform plan' to verify the creation of the VPC, followed by 'terraform apply' to build the VPC, resulting in the addition of new pieces within the VPC resource and the successful creation of the VPC.", 'Exploring the Terraform state to understand how information about the deployment is stored The chapter emphasizes the importance of understanding the Terraform state and demonstrates exploring the state file to see the information about the deployed VPC, highlighting the significance of comprehending how information about the deployment is stored for Terraform to use.']}], 'duration': 531.668, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB0795726.jpg', 'highlights': ['The VPC configuration process in Terraform involves specifying the resource, naming the VPC, and providing a cider block, with the logical name being exclusive to Terraform and not reflected in AWS.', "The chapter demonstrates creating a VPC using Terraform by specifying the VPC resource, enabling DNS hostnames and support, and adding tags, with the cider block specified as 10.123.0.0/16, enabling DNS hostnames as true, and adding a 'dev' tag to the VPC.", "Running terraform plan and apply to build the VPC The chapter shows running a 'terraform plan' to verify the creation of the VPC, followed by 'terraform apply' to build the VPC, resulting in the addition of new pieces within the VPC resource and the successful creation of the VPC.", 'Exploring the Terraform state to understand how information about the deployment is stored The chapter emphasizes the importance of understanding the Terraform state and demonstrates exploring the state file to see the information about the deployed VPC, highlighting the significance of comprehending how information about the deployment is stored for Terraform to use.', 'The AWS VPC static value cannot be changed, as altering it would prevent VPC deployment.', 'Additional options for VPC configuration include enabling DNS support (defaults to true) and enabling DNS hostnames (defaults to false).']}, {'end': 1894.339, 'segs': [{'end': 1352.287, 'src': 'embed', 'start': 1327.515, 'weight': 0, 'content': [{'end': 1333.798, 'text': 'And of course, if you want to see the entire state, all you have to do is just type Terraform show.', 'start': 1327.515, 'duration': 6.283}, {'end': 1336.539, 'text': 'So keep that in mind.', 'start': 1335.539, 'duration': 1}, {'end': 1342.963, 'text': 'Terraform state show requires you to insert a resource.', 'start': 1338.36, 'duration': 4.603}, {'end': 1352.287, 'text': "Now Terraform show is just going to show you everything that you've got, which of course can be massive if you have a very large environment.", 'start': 1344.482, 'duration': 7.805}], 'summary': "Use 'terraform show' to display entire state; 'terraform state show' needs resource.", 'duration': 24.772, 'max_score': 1327.515, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01327515.jpg'}, {'end': 1457.671, 'src': 'embed', 'start': 1423.734, 'weight': 2, 'content': [{'end': 1427.255, 'text': "But for the most part, we're just going to run this terraform destroy.", 'start': 1423.734, 'duration': 3.521}, {'end': 1428.435, 'text': "So let's do that.", 'start': 1427.615, 'duration': 0.82}, {'end': 1433.416, 'text': "Let's knock out this VPC that we created completely delete everything we have applied.", 'start': 1428.515, 'duration': 4.901}, {'end': 1435.858, 'text': 'So just run Terraform destroy.', 'start': 1434.136, 'duration': 1.722}, {'end': 1442.183, 'text': "And then we can just use a dash auto approve if we don't want that confirmation dialog.", 'start': 1435.878, 'duration': 6.305}, {'end': 1443.945, 'text': 'Again, useful in automation.', 'start': 1442.423, 'duration': 1.522}, {'end': 1448.068, 'text': "Probably wouldn't use this in production if you're typing it yourself though.", 'start': 1444.425, 'duration': 3.643}, {'end': 1450.07, 'text': "Let's go ahead and run that.", 'start': 1448.769, 'duration': 1.301}, {'end': 1457.671, 'text': 'All right, the destruction is complete, everything is gone.', 'start': 1453.627, 'duration': 4.044}], 'summary': 'Ran terraform destroy to completely delete the vpc with successful destruction.', 'duration': 33.937, 'max_score': 1423.734, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01423734.jpg'}, {'end': 1527.755, 'src': 'embed', 'start': 1497.492, 'weight': 3, 'content': [{'end': 1502.695, 'text': 'And if you scroll down here is map public IP on launch.', 'start': 1497.492, 'duration': 5.203}, {'end': 1511.399, 'text': 'default is false, we want to make sure that our instance receives a public IP address whenever we launch into the subnet.', 'start': 1503.355, 'duration': 8.044}, {'end': 1513.78, 'text': 'So we want to ensure we add that.', 'start': 1511.679, 'duration': 2.101}, {'end': 1515.941, 'text': "So let's go ahead and get started.", 'start': 1514.02, 'duration': 1.921}, {'end': 1527.755, 'text': "Alright, so right here under my VPC, we're going to add another resource and that resources AWS underscore subnet, just like so.", 'start': 1517.526, 'duration': 10.229}], 'summary': 'Ensure instance receives public ip on launch in aws subnet.', 'duration': 30.263, 'max_score': 1497.492, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01497492.jpg'}, {'end': 1741.591, 'src': 'embed', 'start': 1707.549, 'weight': 4, 'content': [{'end': 1710.09, 'text': "Let's go ahead and run our terraform plan.", 'start': 1707.549, 'duration': 2.541}, {'end': 1713.982, 'text': "Alright, we've got one resource to add.", 'start': 1711.658, 'duration': 2.324}, {'end': 1714.783, 'text': "So that's good.", 'start': 1714.042, 'duration': 0.741}, {'end': 1717.267, 'text': 'And AWS subnet is going to get added.', 'start': 1714.863, 'duration': 2.404}, {'end': 1720.693, 'text': 'As you can see, everything we have specified is listed here.', 'start': 1717.327, 'duration': 3.366}, {'end': 1725.338, 'text': 'And of course, certain things like the ID are known after apply.', 'start': 1722.076, 'duration': 3.262}, {'end': 1728.681, 'text': "So let's go ahead and run a terraform apply.", 'start': 1725.959, 'duration': 2.722}, {'end': 1733.064, 'text': "And then I'm just going to add auto approve, you're not always going to do this.", 'start': 1728.701, 'duration': 4.363}, {'end': 1741.591, 'text': "But if you're running a plan first, it's usually pretty safe to go ahead and just auto approve it and not have to type that yes, every single time.", 'start': 1733.124, 'duration': 8.467}], 'summary': 'Terraform plan: 1 resource to add, aws subnet added, apply with auto approval.', 'duration': 34.042, 'max_score': 1707.549, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01707549.jpg'}, {'end': 1894.339, 'src': 'embed', 'start': 1867.235, 'weight': 5, 'content': [{'end': 1870.259, 'text': "So once we've done that, that's literally all we've got to do.", 'start': 1867.235, 'duration': 3.024}, {'end': 1874.405, 'text': "But let's go ahead and introduce that fun new command.", 'start': 1871.461, 'duration': 2.944}, {'end': 1887.114, 'text': "If you go ahead and run a Terraform FMT, just like so what that just did was that corrected any type of inconsistencies we've got in formatting.", 'start': 1875.367, 'duration': 11.747}, {'end': 1891.597, 'text': 'As you can see main.tf and providers.tf were both corrected.', 'start': 1887.775, 'duration': 3.822}, {'end': 1894.339, 'text': 'Now unfortunately, I was not scrolled up.', 'start': 1892.518, 'duration': 1.821}], 'summary': "Introducing 'terraform fmt' corrected formatting inconsistencies in main.tf and providers.tf.", 'duration': 27.104, 'max_score': 1867.235, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01867235.jpg'}], 'start': 1327.515, 'title': 'Terraform state management, destroy, and vpc subnet creation', 'summary': "Covers managing state in terraform, including the 'terraform show' command, and discusses using 'terraform destroy' to delete infrastructure. it also explores creating a vpc subnet with specific configurations and introduces 'terraform fmt' for code formatting.", 'chapters': [{'end': 1369.793, 'start': 1327.515, 'title': 'Terraform state management basics', 'summary': "Discusses the basics of managing state in terraform, including the 'terraform show' command to view the entire state and the benefits of manipulating and refreshing state.", 'duration': 42.278, 'highlights': ["Using 'Terraform show' to view the entire state can be beneficial, especially in large environments.", 'Terraform state show requires resource insertion to display specific information.']}, {'end': 1894.339, 'start': 1370.373, 'title': 'Terraform destroy and creating vpc subnet', 'summary': "Discusses using the 'terraform destroy' command to delete created infrastructure, including running 'terraform plan' in destroy mode for testing. it then delves into creating a vpc subnet with specific configurations and introduces 'terraform fmt' for formatting the code.", 'duration': 523.966, 'highlights': ["Running 'terraform destroy' to delete created infrastructure, with the option to use 'terraform apply -destroy' or 'terraform destroy' with '-auto-approve' for automation.", 'Creating a VPC subnet by adding an AWS subnet resource, specifying VPC ID, CIDR block, map public IP on launch, availability zone, and tags.', "Using 'terraform plan' to verify the addition of the subnet resource and running 'terraform apply' with 'auto approve' for successful deployment.", "Introducing the 'terraform fmt' command to ensure consistent formatting of the code in the main.tf and providers.tf files."]}], 'duration': 566.824, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01327515.jpg', 'highlights': ["Using 'Terraform show' to view the entire state can be beneficial, especially in large environments.", 'Terraform state show requires resource insertion to display specific information.', "Running 'terraform destroy' to delete created infrastructure, with the option to use 'terraform apply -destroy' or 'terraform destroy' with '-auto-approve' for automation.", 'Creating a VPC subnet by adding an AWS subnet resource, specifying VPC ID, CIDR block, map public IP on launch, availability zone, and tags.', "Using 'terraform plan' to verify the addition of the subnet resource and running 'terraform apply' with 'auto approve' for successful deployment.", "Introducing the 'terraform fmt' command to ensure consistent formatting of the code in the main.tf and providers.tf files."]}, {'end': 2931.762, 'segs': [{'end': 1987.489, 'src': 'embed', 'start': 1954.378, 'weight': 0, 'content': [{'end': 1957.24, 'text': "Aha, AWS Internet Gateway, we've got it.", 'start': 1954.378, 'duration': 2.862}, {'end': 1959.961, 'text': "So let's go ahead and check that and select OK.", 'start': 1957.64, 'duration': 2.321}, {'end': 1969.431, 'text': "And if I expand my resources here and take a look under EC2 internet gateway, we'll see we've got two.", 'start': 1961.664, 'duration': 7.767}, {'end': 1979.1, 'text': "So if I click on the one with the longer ID, we can see right here that we've got our internet gateway.", 'start': 1970.572, 'duration': 8.528}, {'end': 1987.489, 'text': "with the proper tag, we're going to create a route table to route traffic from our subnet to our internet gateway.", 'start': 1980.003, 'duration': 7.486}], 'summary': 'Two aws internet gateways found, creating route table for subnet to gateway', 'duration': 33.111, 'max_score': 1954.378, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01954378.jpg'}, {'end': 2214.298, 'src': 'embed', 'start': 2183.631, 'weight': 1, 'content': [{'end': 2187.773, 'text': "Let's go ahead and run our Terraform apply, auto approve.", 'start': 2183.631, 'duration': 4.142}, {'end': 2194.758, 'text': 'And everything was applied successfully.', 'start': 2192.156, 'duration': 2.602}, {'end': 2200.361, 'text': "Let's go ahead and click on the little sprocket next to resources and see what we have to offer.", 'start': 2194.778, 'duration': 5.583}, {'end': 2203.383, 'text': "So what we've deployed is a route table.", 'start': 2200.381, 'duration': 3.002}, {'end': 2207.166, 'text': 'AWS EC two route table, great.', 'start': 2203.403, 'duration': 3.763}, {'end': 2212.275, 'text': 'And then I actually do not see a route that we want to use.', 'start': 2208.407, 'duration': 3.868}, {'end': 2214.298, 'text': "So we're just going to take a look at the route table.", 'start': 2212.295, 'duration': 2.003}], 'summary': 'Successfully applied terraform changes, deployed aws ec2 route table.', 'duration': 30.667, 'max_score': 2183.631, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB02183631.jpg'}, {'end': 2762.016, 'src': 'embed', 'start': 2728.528, 'weight': 2, 'content': [{'end': 2732.928, 'text': 'But first, we need to provide the AMI from which we want to deploy.', 'start': 2728.528, 'duration': 4.4}, {'end': 2736.909, 'text': "To do this, we can utilize what's called a data source.", 'start': 2733.449, 'duration': 3.46}, {'end': 2745.251, 'text': 'A data source is basically just a query of the AWS API to receive information needed to deploy a resource.', 'start': 2737.249, 'duration': 8.002}, {'end': 2751.232, 'text': "In this case, we need an AMI ID based on some filters we're going to provide.", 'start': 2745.611, 'duration': 5.621}, {'end': 2752.912, 'text': "So let's get started.", 'start': 2751.472, 'duration': 1.44}, {'end': 2762.016, 'text': 'So if I head over here to my data source documents here for the AWS AMI, you can see an example, data AWS AMI.', 'start': 2753.132, 'duration': 8.884}], 'summary': 'Utilize a data source to query aws api for ami id based on filters.', 'duration': 33.488, 'max_score': 2728.528, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB02728528.jpg'}, {'end': 2858.515, 'src': 'heatmap', 'start': 2796.952, 'weight': 0.769, 'content': [{'end': 2805.463, 'text': 'So if I head into the management console here, going to type EC two up at the top, Going to open that.', 'start': 2796.952, 'duration': 8.511}, {'end': 2809.107, 'text': 'And if I go to instances and launch instance.', 'start': 2806.184, 'duration': 2.923}, {'end': 2810.748, 'text': "Let's take a look.", 'start': 2809.928, 'duration': 0.82}, {'end': 2812.79, 'text': "I'm just going to type Ubuntu here.", 'start': 2810.788, 'duration': 2.002}, {'end': 2816.434, 'text': "And I'm going to deploy Ubuntu server 1804.", 'start': 2813.331, 'duration': 3.103}, {'end': 2819.998, 'text': "That's one I've used in my other courses and I'm just going to stick to that for now.", 'start': 2816.434, 'duration': 3.564}, {'end': 2823.722, 'text': '2004 should work perfectly fine and whatever it is you want.', 'start': 2821.119, 'duration': 2.603}, {'end': 2824.743, 'text': 'you can choose.', 'start': 2824.062, 'duration': 0.681}, {'end': 2827.826, 'text': "But in our case, we're just going to use this 1804.", 'start': 2824.983, 'duration': 2.843}, {'end': 2834.312, 'text': "So what I'm going to do is copy this AMI ID because an owner ID is not provided here, which is a little annoying.", 'start': 2827.826, 'duration': 6.486}, {'end': 2837.435, 'text': "And then I'm going to head back to my EC2 console.", 'start': 2834.513, 'duration': 2.922}, {'end': 2840.659, 'text': "And I'm going to click on AMIs under images.", 'start': 2838.336, 'duration': 2.323}, {'end': 2846.625, 'text': 'And right there, make sure you have public images chosen and enter that AMI ID.', 'start': 2841.139, 'duration': 5.486}, {'end': 2850.092, 'text': 'And here is our owner.', 'start': 2848.331, 'duration': 1.761}, {'end': 2853.913, 'text': "So go ahead and copy that you're going to need it here shortly.", 'start': 2850.652, 'duration': 3.261}, {'end': 2858.515, 'text': "Alright, so once we have that, let's head back over and start coding this thing out.", 'start': 2854.113, 'duration': 4.402}], 'summary': 'Using ec2 console to deploy ubuntu server 1804, copying ami id for coding.', 'duration': 61.563, 'max_score': 2796.952, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB02796952.jpg'}], 'start': 1894.379, 'title': 'Aws infrastructure deployment', 'summary': 'Covers deploying an internet gateway and route table, resulting in the addition of two ec2 internet gateways. it also outlines the process of configuring aws resources with terraform, successfully deploying resources like route tables, subnet associations, and a security group. additionally, it discusses the manual setup of an aws security group, including attribute specification, terraform command verification, and utilizing a data source to query the aws api for an ami id based on filters.', 'chapters': [{'end': 2153.834, 'start': 1894.379, 'title': 'Deploying internet gateway and route table', 'summary': 'Discusses deploying an internet gateway, where a new internet gateway is added to the aws pane and a route table is created to route traffic from the subnet to the internet gateway, resulting in the addition of two ec2 internet gateways.', 'duration': 259.455, 'highlights': ['A new internet gateway is added to the AWS pane, and a route table is created to route traffic from the subnet to the internet gateway. The chapter demonstrates the addition of a new internet gateway and the creation of a route table to route traffic, resulting in the addition of two EC2 internet gateways.', 'The chapter discusses the creation of a route table to route traffic from the subnet to the internet gateway. It details the process of creating a route table to route traffic from the subnet to the internet gateway.', 'The addition of two EC2 internet gateways is observed after deploying the internet gateway and creating the route table. After the deployment of the internet gateway and the creation of the route table, two EC2 internet gateways are added.']}, {'end': 2456.249, 'start': 2155.095, 'title': 'Configuring aws resources with terraform', 'summary': 'Outlines the process of adding route tables, route table associations, and security groups using terraform, resulting in the successful deployment of resources such as route tables, subnet associations, and a security group.', 'duration': 301.154, 'highlights': ['The deployment process involves adding route tables and route table associations through Terraform, resulting in the addition of two resources and successful application of the changes.', 'The chapter demonstrates the association of a subnet with a route table by providing the subnet ID and route table ID, following the straightforward AWS route table association process as outlined in the documentation.', 'A security group is added to the deployment, with a focus on defining ingress and egress rules, allowing comprehensive access by specifying the protocol as negative 1 and hard coding the IP to prevent unauthorized access.']}, {'end': 2931.762, 'start': 2456.609, 'title': 'Aws security group setup', 'summary': 'Covers the manual setup of an aws security group, including adding a resource, specifying attributes such as name, description, vpc id, ingress and egress rules, and running terraform commands for verification. it then delves into utilizing a data source to query the aws api for an ami id based on filters, including specifying the most recent and owner, and setting up filters for the correct ami.', 'duration': 475.153, 'highlights': ['The chapter covers the manual setup of an AWS security group, including adding a resource, specifying attributes such as name, description, VPC ID, ingress and egress rules, and running Terraform commands for verification. Manual setup of AWS security group, specifying attributes, running Terraform commands.', 'Utilizing a data source to query the AWS API for an AMI ID based on filters, including specifying the most recent and owner, and setting up filters for the correct AMI. Using data source to query AMI ID, specifying filters for most recent and owner, setting up filters for correct AMI.']}], 'duration': 1037.383, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB01894379.jpg', 'highlights': ['The addition of two EC2 internet gateways is observed after deploying the internet gateway and creating the route table.', 'The deployment process involves adding route tables and route table associations through Terraform, resulting in the addition of two resources and successful application of the changes.', 'Utilizing a data source to query the AWS API for an AMI ID based on filters, including specifying the most recent and owner, and setting up filters for the correct AMI.']}, {'end': 4340.523, 'segs': [{'end': 2964.174, 'src': 'embed', 'start': 2932.659, 'weight': 4, 'content': [{'end': 2936.002, 'text': "And once again, this is plural, so make sure it's in brackets.", 'start': 2932.659, 'duration': 3.343}, {'end': 2950.936, 'text': 'Ubuntu slash images slash HVM dash SSD slash Ubuntu bionic dash 18.04 dash AMD 64.', 'start': 2937.123, 'duration': 13.813}, {'end': 2952.638, 'text': 'Make sure you have the right architecture there.', 'start': 2950.936, 'duration': 1.702}, {'end': 2954.339, 'text': 'Dash server.', 'start': 2953.619, 'duration': 0.72}, {'end': 2961.173, 'text': "dash. And then what we're going to do, since there's usually a date here and we're just going to pull the most recent.", 'start': 2955.27, 'duration': 5.903}, {'end': 2964.174, 'text': "no matter what, we're just going to add an asterisk.", 'start': 2961.173, 'duration': 3.001}], 'summary': 'Select the most recent ubuntu hvm ssd image with amd 64 architecture.', 'duration': 31.515, 'max_score': 2932.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB02932659.jpg'}, {'end': 3161.785, 'src': 'heatmap', 'start': 3087.401, 'weight': 2, 'content': [{'end': 3095.786, 'text': "So I'm going to run the same commands that I would run on OS X or Linux, SSH dash keygen dash T.", 'start': 3087.401, 'duration': 8.385}, {'end': 3106.28, 'text': "And we will use a more secure key than the typical RSA we use, let's use ED 25519 and hit enter.", 'start': 3097.193, 'duration': 9.087}, {'end': 3118.271, 'text': "Now we're going to rename this key pair here, I'm just going to copy this instead of retyping it basically everything before the ID ED 25519.", 'start': 3106.7, 'duration': 11.571}, {'end': 3119.512, 'text': "And I'm going to paste that in.", 'start': 3118.271, 'duration': 1.241}, {'end': 3125.936, 'text': "And then we're just going to name this MTC key, or at least I am name it whatever you want here.", 'start': 3119.832, 'duration': 6.104}, {'end': 3129.198, 'text': 'Just make sure you reference it properly throughout the rest of the course.', 'start': 3125.996, 'duration': 3.202}, {'end': 3130.159, 'text': "And I'll hit enter.", 'start': 3129.438, 'duration': 0.721}, {'end': 3132.22, 'text': "We're not going to bother with a passphrase.", 'start': 3130.299, 'duration': 1.921}, {'end': 3133.581, 'text': 'All right, perfect.', 'start': 3132.62, 'duration': 0.961}, {'end': 3135.322, 'text': 'Looks like everything is good to go.', 'start': 3133.801, 'duration': 1.521}, {'end': 3139.625, 'text': 'Just going to run an LS tilde slash dot SSH here.', 'start': 3135.702, 'duration': 3.923}, {'end': 3142.027, 'text': 'And that shows me that directory.', 'start': 3140.365, 'duration': 1.662}, {'end': 3150.214, 'text': "And MTC key is there and MTC key dot pub, which is what we'll use for our key resource.", 'start': 3142.807, 'duration': 7.407}, {'end': 3155.62, 'text': "So now let's take a look at the docs as we usually do resource AWS key pair.", 'start': 3150.575, 'duration': 5.045}, {'end': 3161.785, 'text': 'As you see, we basically need to specify a resource AWS key pair and then name that.', 'start': 3156.22, 'duration': 5.565}], 'summary': 'Creating a more secure ed 25519 key pair for ssh on os x or linux and setting it as the aws key pair resource.', 'duration': 32.111, 'max_score': 3087.401, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB03087401.jpg'}, {'end': 3640.892, 'src': 'embed', 'start': 3594.658, 'weight': 0, 'content': [{'end': 3600.464, 'text': "We're going to utilize user data to bootstrap our instance and install the Docker engine.", 'start': 3594.658, 'duration': 5.806}, {'end': 3607.988, 'text': 'This will allow us to have an EC two instance deployed with Docker ready to go for all of our development needs.', 'start': 3601.024, 'duration': 6.964}, {'end': 3610.15, 'text': "So let's get started.", 'start': 3608.549, 'duration': 1.601}, {'end': 3617.975, 'text': "Now the first thing I'm going to do is just clean up this AWS instance a little bit, I'm going to cut this out.", 'start': 3610.33, 'duration': 7.645}, {'end': 3623.338, 'text': "And I'm just going to take everything that's not in a block and place it together.", 'start': 3619.015, 'duration': 4.323}, {'end': 3625.96, 'text': 'So this will make things look a little more streamlined.', 'start': 3623.478, 'duration': 2.482}, {'end': 3633.606, 'text': "So as you can see, we've got all of our arguments here, followed by the tags block, and the root device block.", 'start': 3626.721, 'duration': 6.885}, {'end': 3640.892, 'text': "And just to be consistent, I'm actually going to cut out this root device block and put it above the tags block,", 'start': 3633.966, 'duration': 6.926}], 'summary': 'User data utilized to deploy ec2 instance with docker engine for development needs.', 'duration': 46.234, 'max_score': 3594.658, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB03594658.jpg'}, {'end': 3772.408, 'src': 'embed', 'start': 3745.025, 'weight': 1, 'content': [{'end': 3748.147, 'text': "So perfect, let's go ahead and see if everything works.", 'start': 3745.025, 'duration': 3.122}, {'end': 3750.509, 'text': "Let's run a terraform plan.", 'start': 3748.728, 'duration': 1.781}, {'end': 3758.315, 'text': "All right, one to add, as you can see, we've got our EC two instance here.", 'start': 3753.852, 'duration': 4.463}, {'end': 3760.642, 'text': "Everything's looking pretty good.", 'start': 3759.321, 'duration': 1.321}, {'end': 3764.244, 'text': 'As you can see, our user data is hashed here.', 'start': 3760.742, 'duration': 3.502}, {'end': 3772.408, 'text': 'So if this user data were to change, it actually would change that hash and indicate that we need to redeploy our instance.', 'start': 3764.784, 'duration': 7.624}], 'summary': 'Terraform plan shows 1 ec2 instance with hashed user data, indicating potential redeployment.', 'duration': 27.383, 'max_score': 3745.025, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB03745025.jpg'}, {'end': 3932.496, 'src': 'heatmap', 'start': 3864.184, 'weight': 1, 'content': [{'end': 3870.806, 'text': "Perfect So now what I'm going to do is just do an SSH dash i.", 'start': 3864.184, 'duration': 6.622}, {'end': 3879.187, 'text': "Then if you're on Linux or Windows, you can use the tilde slash dot SSH slash MTC key or whatever you name that key.", 'start': 3870.806, 'duration': 8.381}, {'end': 3886.249, 'text': "Now if I hit tab that will actually correct it for Windows users, but it doesn't matter it works either way.", 'start': 3879.888, 'duration': 6.361}, {'end': 3894.906, 'text': "And then I'm just going to use my Ubuntu username at in that public IP address, and hit enter, type Yes.", 'start': 3887.093, 'duration': 7.813}, {'end': 3897.29, 'text': 'And bam, we are in the instance now.', 'start': 3895.447, 'duration': 1.843}, {'end': 3900.656, 'text': 'So if I run a Docker version.', 'start': 3897.991, 'duration': 2.665}, {'end': 3907.279, 'text': 'As you can see, we now have Docker installed and the instance is running.', 'start': 3902.518, 'duration': 4.761}, {'end': 3916.702, 'text': "we're going to take a look at the configuration we're going to have to create to allow VS code to connect to our EC two instance.", 'start': 3907.279, 'duration': 9.423}, {'end': 3921.404, 'text': "So first of all, if you haven't already, head over to the extensions.", 'start': 3917.302, 'duration': 4.102}, {'end': 3925.085, 'text': 'And go ahead and search for SSH.', 'start': 3922.804, 'duration': 2.281}, {'end': 3929.446, 'text': 'And you should see this remote SSH app here.', 'start': 3925.865, 'duration': 3.581}, {'end': 3932.496, 'text': 'go ahead and install that extension.', 'start': 3930.236, 'duration': 2.26}], 'summary': 'Ssh into instance, install docker, configure vs code for ec2.', 'duration': 68.312, 'max_score': 3864.184, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB03864184.jpg'}], 'start': 2932.659, 'title': 'Managing ubuntu server and aws ec2 with terraform', 'summary': 'Covers updating ubuntu server image, creating key pair with terraform, setting up aws ec2 instance, optimizing terraform configuration, and configuring vs code with local exec provisioner.', 'chapters': [{'end': 2988.167, 'start': 2932.659, 'title': 'Updating ubuntu server image', 'summary': 'Explains the process of updating the ubuntu server image, emphasizing the importance of using the correct architecture and replacing the date with an asterisk to ensure the selection of the most recent version.', 'duration': 55.508, 'highlights': ['Replacing the date with an asterisk ensures the selection of the most recent version of the Ubuntu server image.', 'Emphasizing the importance of using the correct architecture for the Ubuntu server image.']}, {'end': 3315.349, 'start': 2990.69, 'title': 'Terraform key pair creation and ec2 instance deployment', 'summary': 'Covers the creation of a key pair using terraform for ssh access to an ec2 instance, utilizing a more secure key than the typical rsa, and deploying an aws instance.', 'duration': 324.659, 'highlights': ['Creation of a key pair using Terraform with a more secure key than RSA, the ED 25519, for SSH access to an EC2 instance The chapter demonstrates creating a key pair using Terraform with a more secure key than the typical RSA, the ED 25519, to enable SSH access to an EC2 instance.', 'Deployment of an AWS instance using Terraform The chapter covers deploying an AWS instance using Terraform, which will be scaffolded and deployed for future use.']}, {'end': 3617.975, 'start': 3315.789, 'title': 'Aws ec2 instance setup', 'summary': 'Covers the setup of an aws ec2 instance using terraform, including specifying instance type, ami, tags, key name, security groups, subnet, and root block device, with emphasis on using user data to bootstrap the instance and install the docker engine.', 'duration': 302.186, 'highlights': ['Setting up an AWS EC2 instance using Terraform The chapter provides a detailed guide on setting up an AWS EC2 instance using Terraform, including specifying instance type, AMI, tags, key name, security groups, subnet, and root block device.', 'Emphasizing the use of user data for bootstrapping and Docker installation The chapter emphasizes the use of user data to bootstrap the EC2 instance and install the Docker engine, enabling a seamless deployment with Docker ready for development needs.', "Clarification on key name usage for AWS key pair The chapter clarifies the usage of the key name (ID) for AWS key pair, highlighting the interchangeability of 'ID' and 'key name' for setting up the instance."]}, {'end': 4105.903, 'start': 3619.015, 'title': 'Optimizing terraform configuration', 'summary': 'Discusses optimizing terraform configuration by organizing code, creating user data, deploying instances, and configuring ssh access, resulting in improved code readability and efficient resource provisioning.', 'duration': 486.888, 'highlights': ['Organizing code by grouping arguments, tags block, and root device block together for streamlined look. The instructor explains grouping arguments, tags block, and root device block together to improve code organization and readability.', 'Creating user data file user_data.TPL to bootstrap instance with script updating apt, installing dependencies, and managing Docker. The user data file user_data.TPL is created to bootstrap the instance, containing a script that updates apt, installs dependencies, downloads Docker GPG key, adds Docker repository, installs Docker, and adds Ubuntu to the Docker group.', 'Deploying instance and verifying successful deployment using terraform plan and terraform apply. The process of deploying an instance and verifying its successful deployment using terraform plan and terraform apply is demonstrated.', 'Configuring SSH access using template files for Windows and Linux/Mac, including specifying hostname, user, and identity file. The chapter covers configuring SSH access using template files for Windows and Linux/Mac, specifying hostname, user, and identity file for SSH access.']}, {'end': 4340.523, 'start': 4106.243, 'title': 'Configuring vs code with local exec provisioner', 'summary': 'Discusses the utilization of a local exec provisioner to configure vs code on the local terminal for ssh into an ec2 instance, highlighting the limitations of provisioners, the use of local exec provisioner, and the template file function.', 'duration': 234.28, 'highlights': ['The limitations of provisioners Provisioners, unlike other resources, do not record or manage success/failure by terraform state, offering no rollback or management if something goes wrong.', 'Usage of local exec provisioner The lightweight operation of adding information to a config file on the local terminal is perfectly fine for the deployment and can be run again if something goes wrong.', 'Template file function for running files and passing variables The template file function is utilized to run files and pass in necessary variables, allowing for the configuration of VS code on the local terminal for SSH into an EC2 instance.']}], 'duration': 1407.864, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB02932659.jpg', 'highlights': ['Emphasizing the use of user data for bootstrapping and Docker installation', 'Setting up an AWS EC2 instance using Terraform', 'Creating a key pair using Terraform with a more secure key than RSA, the ED 25519, for SSH access to an EC2 instance', 'Organizing code by grouping arguments, tags block, and root device block together for streamlined look', 'Replacing the date with an asterisk ensures the selection of the most recent version of the Ubuntu server image']}, {'end': 5033.563, 'segs': [{'end': 4383.98, 'src': 'embed', 'start': 4340.963, 'weight': 0, 'content': [{'end': 4348.725, 'text': 'And then this here is the path which is using this interpolation syntax and path dot module, which is a built in variable, and then you use a comma.', 'start': 4340.963, 'duration': 7.762}, {'end': 4355.587, 'text': 'And then within an object here with these curly braces, you pass in the variables that you need to pass in.', 'start': 4349.646, 'duration': 5.941}, {'end': 4357.328, 'text': "So let's go ahead and do that.", 'start': 4355.727, 'duration': 1.601}, {'end': 4359.932, 'text': 'So for the path.', 'start': 4358.171, 'duration': 1.761}, {'end': 4368.134, 'text': "in my case, since I'm on a Windows machine, I'm just going to use quotes Windows dash, SSH, dash config, dot, TPL, just like.", 'start': 4359.932, 'duration': 8.202}, {'end': 4371.556, 'text': "so if you are on Linux or Mac, you'll use the Linux version.", 'start': 4368.134, 'duration': 3.422}, {'end': 4375.437, 'text': 'And then after that, we need to pass in our variables.', 'start': 4372.596, 'duration': 2.841}, {'end': 4383.98, 'text': "So I'll add a comma here, then open and close some curly braces, and we will pass in these variables, I'm actually going to indent this.", 'start': 4375.977, 'duration': 8.003}], 'summary': 'Demonstration of using interpolation syntax and passing variables in a path for different operating systems.', 'duration': 43.017, 'max_score': 4340.963, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04340963.jpg'}, {'end': 4464.945, 'src': 'embed', 'start': 4409.363, 'weight': 3, 'content': [{'end': 4417.21, 'text': "After that, we need to provide the user and that's going to be Ubuntu because that is the EC two instance username that we have.", 'start': 4409.363, 'duration': 7.847}, {'end': 4420.293, 'text': 'After that, we need to provide an identity file.', 'start': 4417.59, 'duration': 2.703}, {'end': 4426.078, 'text': 'So that identity file is going to be our private key.', 'start': 4422.335, 'duration': 3.743}, {'end': 4431.869, 'text': "And the private key is located We'll just use a tilde here, slash .", 'start': 4426.919, 'duration': 4.95}, {'end': 4435.315, 'text': 'ssh, slash mtckey, just like so.', 'start': 4431.869, 'duration': 3.446}, {'end': 4439.972, 'text': 'Alright, so that is all of the variables we need to pass in.', 'start': 4436.57, 'duration': 3.402}, {'end': 4444.834, 'text': 'And then after that, we need to pass in an interpreter.', 'start': 4440.812, 'duration': 4.022}, {'end': 4450.817, 'text': 'Now the interpreter basically just tells our provisioner what it needs to use to run this script.', 'start': 4445.094, 'duration': 5.723}, {'end': 4452.698, 'text': 'Now it defaults to bash.', 'start': 4451.138, 'duration': 1.56}, {'end': 4455.62, 'text': "So you don't necessarily need to add this for that.", 'start': 4452.739, 'duration': 2.881}, {'end': 4457.101, 'text': 'But we will just to be sure.', 'start': 4455.78, 'duration': 1.321}, {'end': 4461.603, 'text': "So I'm going to add interpreter, just like so equals.", 'start': 4457.321, 'duration': 4.282}, {'end': 4464.945, 'text': "And since I'm on Windows, we're going to use PowerShell.", 'start': 4462.444, 'duration': 2.501}], 'summary': 'Configure ubuntu user, private key, and interpreter for ec2 instance provisioning.', 'duration': 55.582, 'max_score': 4409.363, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04409363.jpg'}, {'end': 4577.378, 'src': 'embed', 'start': 4548.311, 'weight': 1, 'content': [{'end': 4559.034, 'text': 'This provisioner is going to run add the information required to our configuration file and allow us to SSH into the instance without any issues.', 'start': 4548.311, 'duration': 10.723}, {'end': 4561.594, 'text': "So let's go ahead and give it a shot.", 'start': 4559.314, 'duration': 2.28}, {'end': 4566.075, 'text': "So first up, once again, I'm just going to run that Terraform plan.", 'start': 4561.774, 'duration': 4.301}, {'end': 4577.378, 'text': "And as you can see, no changes, which means that this provisioner is not going to run because Terraform hasn't detected anything different.", 'start': 4568.496, 'duration': 8.882}], 'summary': 'Provisioner adds information to configuration file, enabling issue-free ssh access. terraform plan detects no changes.', 'duration': 29.067, 'max_score': 4548.311, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04548311.jpg'}, {'end': 4662.126, 'src': 'embed', 'start': 4629.2, 'weight': 4, 'content': [{'end': 4630.22, 'text': "And let's hit enter.", 'start': 4629.2, 'duration': 1.02}, {'end': 4633.262, 'text': 'Alright, as you can see, we are refreshing the state.', 'start': 4630.781, 'duration': 2.481}, {'end': 4639.415, 'text': "Okay, now we've got one to destroy and one to add.", 'start': 4635.774, 'duration': 3.641}, {'end': 4644.517, 'text': 'So it is removing and replacing our instance.', 'start': 4639.575, 'duration': 4.942}, {'end': 4648.979, 'text': 'And once that happens, it should run our local exec.', 'start': 4645.778, 'duration': 3.201}, {'end': 4657.723, 'text': 'replacing the content in our config file with what we need and allowing us to SSH into our instance from VS code.', 'start': 4649.798, 'duration': 7.925}, {'end': 4662.126, 'text': "So let's go ahead and type yes and pause this video.", 'start': 4658.404, 'duration': 3.722}], 'summary': 'Refreshing state, 1 instance destroyed, 1 added, enabling ssh access.', 'duration': 32.926, 'max_score': 4629.2, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04629200.jpg'}, {'end': 4948.994, 'src': 'embed', 'start': 4906.952, 'weight': 2, 'content': [{'end': 4916.081, 'text': 'And to do that we could either do it here in line in the main.tf or what I prefer to do and most everyone is to create a new file for it.', 'start': 4906.952, 'duration': 9.129}, {'end': 4919.484, 'text': "So I'm going to create a variables.tf file.", 'start': 4916.601, 'duration': 2.883}, {'end': 4923.606, 'text': "Once again, it's analyzed just like any other TF file.", 'start': 4920.385, 'duration': 3.221}, {'end': 4929.427, 'text': "It's all run at the same time, but this will just make sure that it's easier to find our variables when we need them.", 'start': 4924.006, 'duration': 5.421}, {'end': 4933.848, 'text': 'Now you can take a look here at the input variables documentation.', 'start': 4929.807, 'duration': 4.041}, {'end': 4937.709, 'text': 'Declaring an input variable is actually fairly straightforward.', 'start': 4934.649, 'duration': 3.06}, {'end': 4943.351, 'text': 'You use the variable, variable name, and then within braces, you give it a type.', 'start': 4937.969, 'duration': 5.382}, {'end': 4945.752, 'text': 'And you can also give it a default.', 'start': 4944.011, 'duration': 1.741}, {'end': 4948.994, 'text': 'Now, the type is not necessarily required,', 'start': 4946.233, 'duration': 2.761}], 'summary': 'Creating a new variables.tf file to declare input variables for easier access and organization in terraform.', 'duration': 42.042, 'max_score': 4906.952, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04906952.jpg'}], 'start': 4340.963, 'title': 'Configuring and running provisioner in terraform', 'summary': "Explains using interpolation syntax and passing variables in a path with examples of passing hostname, username, private key, and interpreter, including specific file paths and instances for a windows machine, and discusses configuring and running a provisioner in terraform to replace the hostname, user, and identity file, demonstrating the use of the 'terraform plan' and 'terraform apply -replace' commands, and introducing the use of variables and initialization in terraform scripts.", 'chapters': [{'end': 4496.137, 'start': 4340.963, 'title': 'Configuring path and passing variables', 'summary': 'Explains the process of using interpolation syntax and passing variables in a path with examples of passing hostname, username, private key, and interpreter, including specific file paths and instances for a windows machine, with a mention of the default interpreter as bash.', 'duration': 155.174, 'highlights': ['The chapter explains the process of using interpolation syntax and passing variables in a path with examples of passing hostname, username, private key, and interpreter, including specific file paths and instances for a Windows machine, with a mention of the default interpreter as bash. Using interpolation syntax and passing variables in a path, examples of passing hostname, username, private key, and interpreter, specific file paths and instances for a Windows machine, mention of default interpreter as bash', "The host name is passed as self dot public IP, the username as Ubuntu, and the private key's location as tilde slash . ssh slash mtckey, for the EC two instance username, and the interpreter is set as PowerShell for Windows. Host name passed as self dot public IP, username as Ubuntu, private key's location as tilde slash . ssh slash mtckey, interpreter set as PowerShell for Windows", 'Mention of the default interpreter being bash and the process of setting the interpreter as bash for Linux and PowerShell for Windows. Default interpreter as bash, setting interpreter as bash for Linux and PowerShell for Windows']}, {'end': 5033.563, 'start': 4496.397, 'title': 'Configuring and running provisioner in terraform', 'summary': "Discusses configuring and running a provisioner in terraform to replace the hostname, user, and identity file, demonstrating the use of the 'terraform plan' and 'terraform apply -replace' commands, and introducing the use of variables and initialization in terraform scripts.", 'duration': 537.166, 'highlights': ["Demonstrating the use of the 'terraform plan' command to verify changes before applying them, showing no changes due to the provisioner not affecting the state. No changes detected after running 'terraform plan' due to the provisioner not affecting the state.", "Introducing the 'terraform apply -replace' command to trigger the provisioner to run, resulting in the replacement of the instance and the execution of the local exec, ensuring the SSH configuration file is updated accordingly. Using 'terraform apply -replace' triggered the provisioner to run, replacing the instance and updating the SSH configuration file.", "Introducing the concept of variables in Terraform scripts by using interpolation syntax and initializing variables in a separate file, demonstrating the need to define variables during operations like 'terraform destroy', and mentioning best practices for declaring input variables. Introduction of variables using interpolation syntax and separate file initialization, demonstrating the need to define variables during operations, and best practices for declaring input variables."]}], 'duration': 692.6, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB04340963.jpg', 'highlights': ['Explains using interpolation syntax and passing variables in a path with examples of passing hostname, username, private key, and interpreter, including specific file paths and instances for a Windows machine', "Demonstrating the use of the 'terraform plan' command to verify changes before applying them, showing no changes due to the provisioner not affecting the state", "Introducing the concept of variables in Terraform scripts by using interpolation syntax and initializing variables in a separate file, demonstrating the need to define variables during operations like 'terraform destroy', and mentioning best practices for declaring input variables", "The host name is passed as self dot public IP, the username as Ubuntu, and the private key's location as tilde slash . ssh slash mtckey, for the EC two instance username, and the interpreter is set as PowerShell for Windows", "Introducing the 'terraform apply -replace' command to trigger the provisioner to run, resulting in the replacement of the instance and the execution of the local exec, ensuring the SSH configuration file is updated accordingly", 'Mention of the default interpreter being bash and the process of setting the interpreter as bash for Linux and PowerShell for Windows', 'Using interpolation syntax and passing variables in a path, examples of passing hostname, username, private key, and interpreter, specific file paths and instances for a Windows machine, mention of default interpreter as bash', 'Default interpreter as bash, setting interpreter as bash for Linux and PowerShell for Windows', "No changes detected after running 'terraform plan' due to the provisioner not affecting the state", "Host name passed as self dot public IP, username as Ubuntu, private key's location as tilde slash . ssh slash mtckey, interpreter set as PowerShell for Windows", 'Introduction of variables using interpolation syntax and separate file initialization, demonstrating the need to define variables during operations, and best practices for declaring input variables']}, {'end': 5953.654, 'segs': [{'end': 5134.256, 'src': 'embed', 'start': 5108.729, 'weight': 0, 'content': [{'end': 5114.49, 'text': 'So as we go down this list, these are processed in front of the other.', 'start': 5108.729, 'duration': 5.761}, {'end': 5116.911, 'text': 'So environment variables are processed last.', 'start': 5114.57, 'duration': 2.341}, {'end': 5124.012, 'text': "So if you have an environment variable set, but then you define a variable in terraform.tfvars, which we're going to look at,", 'start': 5117.511, 'duration': 6.501}, {'end': 5128.113, 'text': "then terraform.tfvars is the variable we're going to use.", 'start': 5124.012, 'duration': 4.101}, {'end': 5134.256, 'text': "And then you've got terraform.tfvars.json, which which not too many people use, but you can use it in automation.", 'start': 5128.393, 'duration': 5.863}], 'summary': 'In terraform, environment variables are processed last, followed by terraform.tfvars, and then terraform.tfvars.json for automation.', 'duration': 25.527, 'max_score': 5108.729, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB05108729.jpg'}, {'end': 5192.12, 'src': 'embed', 'start': 5168.618, 'weight': 1, 'content': [{'end': 5178.828, 'text': 'And this is a really good tool that will help you work with certain functions and play with different values and things like that that you might need to experiment with before you deploy.', 'start': 5168.618, 'duration': 10.21}, {'end': 5181.711, 'text': "So if you run terraform console, let's just take a look.", 'start': 5179.028, 'duration': 2.683}, {'end': 5184.513, 'text': 'As you can see, it did not ask us for a variable.', 'start': 5181.771, 'duration': 2.742}, {'end': 5192.12, 'text': "So if I run var dot host underscore OS, can see it's known after apply.", 'start': 5184.734, 'duration': 7.386}], 'summary': 'Tool helps work with functions and values before deployment.', 'duration': 23.502, 'max_score': 5168.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB05168618.jpg'}, {'end': 5440.287, 'src': 'embed', 'start': 5411.551, 'weight': 2, 'content': [{'end': 5420.294, 'text': "So, now that we've managed to choose our SSH config file dynamically, based on the definition of our host OS variable,", 'start': 5411.551, 'duration': 8.743}, {'end': 5423.255, 'text': 'we now need to make our interpreter dynamic.', 'start': 5420.294, 'duration': 2.961}, {'end': 5428.997, 'text': "Unfortunately, this isn't as simple as interpolation syntax replacements.", 'start': 5423.515, 'duration': 5.482}, {'end': 5431.439, 'text': 'So we need to look at a better way.', 'start': 5429.597, 'duration': 1.842}, {'end': 5440.287, 'text': "we're going to utilize conditional expressions to choose the interpreter we need dynamically, based on the definition of the host OS variable.", 'start': 5431.439, 'duration': 8.848}], 'summary': 'Choosing ssh config and interpreter dynamically based on host os variable.', 'duration': 28.736, 'max_score': 5411.551, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB05411551.jpg'}, {'end': 5756.524, 'src': 'embed', 'start': 5730.689, 'weight': 3, 'content': [{'end': 5735.171, 'text': 'We once again have our development environment all ready to go.', 'start': 5730.689, 'duration': 4.482}, {'end': 5744.276, 'text': "But this time, it's dynamic based on the host OS that we're using, we're going to add a nice little convenience feature to our script.", 'start': 5735.271, 'duration': 9.005}, {'end': 5748.258, 'text': 'by utilizing outputs to display information we need.', 'start': 5744.676, 'duration': 3.582}, {'end': 5754.263, 'text': "As you well know, we've been manually finding the public IP address of our instances to verify them.", 'start': 5748.479, 'duration': 5.784}, {'end': 5756.524, 'text': 'Well, that is incredibly inefficient.', 'start': 5754.483, 'duration': 2.041}], 'summary': 'Development environment now dynamic based on host os, added convenience feature for script output, addressing inefficiencies.', 'duration': 25.835, 'max_score': 5730.689, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB05730689.jpg'}], 'start': 5035.225, 'title': 'Terraform variable precedence and dynamic interpreters for ssh config', 'summary': 'Discusses the precedence of defining variables in terraform, highlighting the hierarchy of variable definitions and ways to override variable values, alongside dynamically choosing ssh interpreter based on host os variable using conditional expressions, resulting in successful application.', 'chapters': [{'end': 5152.767, 'start': 5035.225, 'title': 'Terraform variable definition precedence', 'summary': 'Discusses the precedence of different ways to define variables in terraform, highlighting that environment variables are processed last and explaining the hierarchy of variable definitions via terraform.tfvars, terraform.tfvars.json, auto.tfvars, auto.tfvars.json, and command line options.', 'duration': 117.542, 'highlights': ['Environment variables are processed last. This explains the precedence of variable definitions, indicating that environment variables are processed last in the hierarchy.', 'terraform.tfvars takes precedence over environment variables. The chapter emphasizes that if a variable is defined in terraform.tfvars and also set as an environment variable, the variable from terraform.tfvars takes precedence.', 'Hierarchy of variable definitions via terraform.tfvars, terraform.tfvars.json, auto.tfvars, auto.tfvars.json, and command line options. The chapter provides a hierarchy of variable definitions, detailing the precedence of terraform.tfvars, terraform.tfvars.json, auto.tfvars, auto.tfvars.json, and command line options, offering insights into their importance in defining variables.']}, {'end': 5411.251, 'start': 5152.767, 'title': 'Terraform variable precedence', 'summary': 'Explains the use of terraform console to work with variables, the precedence of variable definitions, and ways to override variable values in different scenarios, demonstrating the usage of default, defining variables in a file, and overriding variable values inline with commands.', 'duration': 258.484, 'highlights': ['Running terraform console helps work with functions and values before deployment, providing a tool for experimentation.', 'Terraform console indicates that variables need to be specified before it recognizes them, as seen when running var.host_OS.', 'Defining variables in terraform.tfvars takes precedence over default variable set within variables.tf, demonstrated by setting host OS as Linux in terraform.tfvars.', 'Specifying variables inline with commands, such as terraform console -var, allows overriding variable values, as shown by setting host OS as Unix.', 'Using -var-file option with terraform console allows passing a specific file to override variable values, exemplified by setting host OS as OSX using dev.tfvars.']}, {'end': 5693.517, 'start': 5411.551, 'title': 'Dynamic interpreters for ssh config', 'summary': 'Discusses dynamically choosing ssh interpreter based on host os variable using conditional expressions, showing powershell for windows and bash for linux, and implementing it in terraform configuration resulting in successful application.', 'duration': 281.966, 'highlights': ['Implemented conditional expressions to dynamically choose SSH interpreter based on host OS variable, demonstrating PowerShell for Windows and bash for Linux. Demonstrates the use of conditional expressions to dynamically select the interpreter based on the host OS variable, showcasing PowerShell for Windows and bash for Linux.', 'Successfully applied the dynamic interpreter implementation in Terraform configuration, leading to a successful Terraform apply. Successfully implemented the dynamic interpreter in the Terraform configuration, resulting in a successful Terraform apply.', 'Verified the effectiveness of the dynamic interpreter by running Terraform console with variable definition, confirming PowerShell for Windows and bash for Linux. Confirmed the effectiveness of the dynamic interpreter by running Terraform console with variable definition, verifying PowerShell for Windows and bash for Linux.']}, {'end': 5953.654, 'start': 5693.917, 'title': 'Implementing terraform outputs', 'summary': "Discusses implementing terraform outputs to display the public ip address of an instance, simplifying the verification process and enhancing automation, which is achieved by creating a new file 'outputs.tf' and utilizing 'terraform output'.", 'duration': 259.737, 'highlights': ['Utilizing outputs to display the public IP address of an instance The chapter emphasizes the use of outputs to simplify the process of finding the public IP address of instances, enhancing efficiency and automation.', "Creating a new file 'outputs.tf' to define the output The process involves creating a new file 'outputs.tf' to define the output, allowing for a structured and organized approach to managing outputs.", "Using 'terraform output' to access the defined output The utilization of 'terraform output' enables easy access to the defined output, providing a convenient way to retrieve necessary information.", 'Enhancing automation and simplifying verification process Implementing Terraform outputs enhances automation and simplifies the process of verifying instances, contributing to improved operational efficiency.']}], 'duration': 918.429, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/iRaai1IBlB0/pics/iRaai1IBlB05035225.jpg', 'highlights': ['Hierarchy of variable definitions: terraform.tfvars > environment variables', 'Running terraform console for pre-deployment experimentation', 'Dynamic interpreter implementation for SSH based on host OS', "Utilizing outputs for displaying instance's public IP address"]}], 'highlights': ['The project aims to help learners build foundations for their own projects and enhance their resumes by applying the knowledge gained.', 'The project is centered around deploying an AWS EC2 instance using Terraform and VS code, providing hands-on experience for the learners.', "The chapter demonstrates creating a VPC using Terraform by specifying the VPC resource, enabling DNS hostnames and support, and adding tags, with the cider block specified as 10.123.0.0/16, enabling DNS hostnames as true, and adding a 'dev' tag to the VPC.", "Running terraform plan and apply to build the VPC The chapter shows running a 'terraform plan' to verify the creation of the VPC, followed by 'terraform apply' to build the VPC, resulting in the addition of new pieces within the VPC resource and the successful creation of the VPC.", "Using 'Terraform show' to view the entire state can be beneficial, especially in large environments.", 'Creating a VPC subnet by adding an AWS subnet resource, specifying VPC ID, CIDR block, map public IP on launch, availability zone, and tags.', 'The addition of two EC2 internet gateways is observed after deploying the internet gateway and creating the route table.', 'Emphasizing the use of user data for bootstrapping and Docker installation', 'Explains using interpolation syntax and passing variables in a path with examples of passing hostname, username, private key, and interpreter, including specific file paths and instances for a Windows machine', 'Hierarchy of variable definitions: terraform.tfvars > environment variables', "Utilizing outputs for displaying instance's public IP address"]}