User Tools

Site Tools


start_a_new_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start_a_new_script [2017/08/04 20:14] walkeradminstart_a_new_script [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Start a New Script ====== ====== Start a New Script ======
 <color darkorange>Aug 2017</color> <color darkorange>Aug 2017</color>
 +\\ 
 +\\ 
 +{{:terraform_logo.jpg?100|}}  |  {{:amazonwebservices_logo.svg.png?75|}}
 \\  \\ 
 \\  \\ 
  
 ---- ----
 +
 As Terraform is a very small file (by todays standards) I generally create a new folder, and put the Terraform.exe executable in to that folder. I then keep Terraform and my script in that folder, creating a new folder containing a copy of Terraform for each script.  As Terraform is a very small file (by todays standards) I generally create a new folder, and put the Terraform.exe executable in to that folder. I then keep Terraform and my script in that folder, creating a new folder containing a copy of Terraform for each script. 
 \\  \\ 
Line 17: Line 21:
   - Create a new file in your preferred text editor and save it as "my_instance.tf"   - Create a new file in your preferred text editor and save it as "my_instance.tf"
 \\  \\ 
 +{{ :cmd_terraform_001.jpg?500 |}}
 \\  \\ 
 +\\ 
 +\\ 
 +Paste the following text in to your "my_instance.tf" file and save it.
 +\\ 
 +\\ 
 +<sxh>
 +provider "aws" {
 +        access_key = "XXXXXXXXXXXXXXXX"
 +        secret_key = "XXXXXXXXXXXXXXXXXXXXXX"
 +        region = "xxxxxxxx"
 +}
  
 +resource "aws_instance" "simple_example" {
 +        ami = "ami-xxxxxxxx"
 +        instance_type = "xxxxxxxx"
 +        key_name = "xxxxxxxx"
 +        security_groups= ["xxxxxxxx"]
 +        tags {
 +         Name = "terraform-instance"
 +        }
 +}
 +</sxh>
 +\\ 
 +As you go through each section of this guide, enter the relevant details in this script and save it each time. At the end of the guide you will have a finished script that you can test.
 +\\ 
 +\\ 
start_a_new_script.1501874070.txt.gz · Last modified: 2023/03/09 22:35 (external edit)