· 7 years ago · Dec 22, 2018, 11:24 PM
1provider "aws" {
2 access_key = "YOURACCESSKEYHERE"
3 secret_key = "YOURSECRETKEYHERE"
4 region = "us-west-1"
5}
6
7resource "aws_instance" "example" {
8 ami = "ami-00048435fed26a8d1" # Ubuntu 14.04 LTS
9 instance_type = "t2.micro"
10 key_name = "my_keypair"
11
12 tags = {
13 Name = "terrabuntu"
14 }
15
16 security_groups = [ "ssh_access", "rdp_access" ]
17}