Skip to content

Simple example with creating separated VPC and EC2 instance in it

Notifications You must be signed in to change notification settings

mdihtyar/aws_terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Use the following instruction to deploy single server in own VPC on AWS cloud

  1. Download and install latest terraform binary
  2. Clone the code from repository
  3. Create own variable.tf file based on variable.tf.example. Without that file scenario is not valid.
  4. Put into variable.tf, variable ssh_public_key your public key.
  5. Define AWS region to work with.
  6. Another variables can be left as they are without any changes.
  7. When scenario is ready, at first run terraform init to download terraform dependencies
  8. Run terraform plan to see what will be updated or added.
  9. Run terraform apply to apply the scenario

PS. The command terraform plan can use used in such way only when it is available globally, it was installed into system and global path is updated.

At the end terraform will show public IP address of server. Please use the command: ssh ubuntu@<public ip> to get remove access to the server.

...
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

instance_ip_addr = 3.15.237.46

About

Simple example with creating separated VPC and EC2 instance in it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages