Merge branch 'pr-4258'

* pr-4258:
  update docs for updated us-east AMIs
  Trivial change for AWS upgraded T2 instance type and AMI ami-5189a661
This commit is contained in:
clint shryock 2015-12-11 10:07:19 -06:00
commit eceb8c88f7
5 changed files with 26 additions and 26 deletions

View File

@ -59,8 +59,8 @@ provider "aws" {
} }
resource "aws_instance" "example" { resource "aws_instance" "example" {
ami = "ami-408c7f28" ami = "ami-d05e75b8"
instance_type = "t1.micro" instance_type = "t2.micro"
} }
``` ```
@ -95,7 +95,7 @@ Within the resource block itself is configuration for that
resource. This is dependent on each resource provider and resource. This is dependent on each resource provider and
is fully documented within our is fully documented within our
[providers reference](/docs/providers/index.html). For our EC2 instance, we specify [providers reference](/docs/providers/index.html). For our EC2 instance, we specify
an AMI for Ubuntu, and request a "t1.micro" instance so we an AMI for Ubuntu, and request a "t2.micro" instance so we
qualify under the free tier. qualify under the free tier.
## Execution Plan ## Execution Plan
@ -111,9 +111,9 @@ $ terraform plan
... ...
+ aws_instance.example + aws_instance.example
ami: "" => "ami-408c7f28" ami: "" => "ami-d05e75b8"
availability_zone: "" => "<computed>" availability_zone: "" => "<computed>"
instance_type: "" => "t1.micro" instance_type: "" => "t2.micro"
key_name: "" => "<computed>" key_name: "" => "<computed>"
private_dns: "" => "<computed>" private_dns: "" => "<computed>"
private_ip: "" => "<computed>" private_ip: "" => "<computed>"
@ -148,8 +148,8 @@ since Terraform waits for the EC2 instance to become available.
``` ```
$ terraform apply $ terraform apply
aws_instance.example: Creating... aws_instance.example: Creating...
ami: "" => "ami-408c7f28" ami: "" => "ami-d05e75b8"
instance_type: "" => "t1.micro" instance_type: "" => "t2.micro"
Apply complete! Resources: 1 added, 0 changed, 0 destroyed. Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
@ -172,9 +172,9 @@ You can inspect the state using `terraform show`:
$ terraform show $ terraform show
aws_instance.example: aws_instance.example:
id = i-e60900cd id = i-e60900cd
ami = ami-408c7f28 ami = ami-d05e75b8
availability_zone = us-east-1c availability_zone = us-east-1c
instance_type = t1.micro instance_type = t2.micro
key_name = key_name =
private_dns = domU-12-31-39-12-38-AB.compute-1.internal private_dns = domU-12-31-39-12-38-AB.compute-1.internal
private_ip = 10.200.59.89 private_ip = 10.200.59.89

View File

@ -28,8 +28,8 @@ resource in your configuration and change it to the following:
``` ```
resource "aws_instance" "example" { resource "aws_instance" "example" {
ami = "ami-aa7ab6c2" ami = "ami-8eb061e6"
instance_type = "t1.micro" instance_type = "t2.micro"
} }
``` ```
@ -47,7 +47,7 @@ $ terraform plan
... ...
-/+ aws_instance.example -/+ aws_instance.example
ami: "ami-408c7f28" => "ami-aa7ab6c2" (forces new resource) ami: "ami-d05e75b8" => "ami-8eb061e6" (forces new resource)
availability_zone: "us-east-1c" => "<computed>" availability_zone: "us-east-1c" => "<computed>"
key_name: "" => "<computed>" key_name: "" => "<computed>"
private_dns: "domU-12-31-39-12-38-AB.compute-1.internal" => "<computed>" private_dns: "domU-12-31-39-12-38-AB.compute-1.internal" => "<computed>"
@ -79,7 +79,7 @@ the change.
$ terraform apply $ terraform apply
aws_instance.example: Destroying... aws_instance.example: Destroying...
aws_instance.example: Modifying... aws_instance.example: Modifying...
ami: "ami-408c7f28" => "ami-aa7ab6c2" ami: "ami-d05e75b8" => "ami-8eb061e6"
Apply complete! Resources: 0 added, 1 changed, 1 destroyed. Apply complete! Resources: 0 added, 1 changed, 1 destroyed.

View File

@ -67,9 +67,9 @@ $ terraform plan
public_ip: "" => "<computed>" public_ip: "" => "<computed>"
+ aws_instance.example + aws_instance.example
ami: "" => "ami-aa7ab6c2" ami: "" => "ami-8eb061e6"
availability_zone: "" => "<computed>" availability_zone: "" => "<computed>"
instance_type: "" => "t1.micro" instance_type: "" => "t2.micro"
key_name: "" => "<computed>" key_name: "" => "<computed>"
private_dns: "" => "<computed>" private_dns: "" => "<computed>"
private_ip: "" => "<computed>" private_ip: "" => "<computed>"
@ -90,8 +90,8 @@ following:
``` ```
aws_instance.example: Creating... aws_instance.example: Creating...
ami: "" => "ami-aa7ab6c2" ami: "" => "ami-8eb061e6"
instance_type: "" => "t1.micro" instance_type: "" => "t2.micro"
aws_eip.ip: Creating... aws_eip.ip: Creating...
instance: "" => "i-0e737b25" instance: "" => "i-0e737b25"
@ -144,8 +144,8 @@ created in parallel to everything else.
``` ```
resource "aws_instance" "another" { resource "aws_instance" "another" {
ami = "ami-aa7ab6c2" ami = "ami-8eb061e6"
instance_type = "t1.micro" instance_type = "t2.micro"
} }
``` ```

View File

@ -25,8 +25,8 @@ To define a provisioner, modify the resource block defining the
``` ```
resource "aws_instance" "example" { resource "aws_instance" "example" {
ami = "ami-aa7ab6c2" ami = "ami-8eb061e6"
instance_type = "t1.micro" instance_type = "t2.micro"
provisioner "local-exec" { provisioner "local-exec" {
command = "echo ${aws_instance.example.public_ip} > file.txt" command = "echo ${aws_instance.example.public_ip} > file.txt"
@ -61,8 +61,8 @@ then run `apply`:
``` ```
$ terraform apply $ terraform apply
aws_instance.example: Creating... aws_instance.example: Creating...
ami: "" => "ami-aa7ab6c2" ami: "" => "ami-8eb061e6"
instance_type: "" => "t1.micro" instance_type: "" => "t2.micro"
aws_eip.ip: Creating... aws_eip.ip: Creating...
instance: "" => "i-213f350a" instance: "" => "i-213f350a"

View File

@ -123,8 +123,8 @@ support for the "us-west-2" region as well:
``` ```
variable "amis" { variable "amis" {
default = { default = {
us-east-1 = "ami-aa7ab6c2" us-east-1 = "ami-8eb061e6"
us-west-2 = "ami-23f78e13" us-west-2 = "ami-ef5e24df"
} }
} }
``` ```
@ -137,7 +137,7 @@ Then, replace the "aws\_instance" with the following:
``` ```
resource "aws_instance" "example" { resource "aws_instance" "example" {
ami = "${lookup(var.amis, var.region)}" ami = "${lookup(var.amis, var.region)}"
instance_type = "t1.micro" instance_type = "t2.micro"
} }
``` ```