Merge pull request #9172 from dnABic/docs-p2

Documentation Update: Changing virtualization type in documentation for aws_instance
This commit is contained in:
Clint 2016-10-21 10:10:27 -05:00 committed by GitHub
commit 7d8a5e4423
2 changed files with 15 additions and 15 deletions

View File

@ -15,27 +15,27 @@ and deleted. Instances also support [provisioning](/docs/provisioners/index.html
``` ```
# Create a new instance of the latest Ubuntu 14.04 on an # Create a new instance of the latest Ubuntu 14.04 on an
# t1.micro node with an AWS Tag naming it "HelloWorld" # t2.micro node with an AWS Tag naming it "HelloWorld"
provider "aws" { provider "aws" {
region = "us-east-1" region = "us-west-2"
} }
data "aws_ami" "ubuntu" { data "aws_ami" "ubuntu" {
most_recent = true most_recent = true
filter { filter {
name = "name" name = "name"
values = ["ubuntu/images/ebs/ubuntu-trusty-14.04-amd64-server-*"] values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
} }
filter { filter {
name = "virtualization-type" name = "virtualization-type"
values = ["paravirtual"] values = ["hvm"]
} }
owners = ["099720109477"] # Canonical owners = ["099720109477"] # Canonical
} }
resource "aws_instance" "web" { resource "aws_instance" "web" {
ami = "${data.aws_ami.ubuntu.id}" ami = "${data.aws_ami.ubuntu.id}"
instance_type = "t1.micro" instance_type = "t2.micro"
tags { tags {
Name = "HelloWorld" Name = "HelloWorld"
} }

View File

@ -17,11 +17,11 @@ data "aws_ami" "ubuntu" {
most_recent = true most_recent = true
filter { filter {
name = "name" name = "name"
values = ["ubuntu/images/ebs/ubuntu-trusty-14.04-amd64-server-*"] values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
} }
filter { filter {
name = "virtualization-type" name = "virtualization-type"
values = ["paravirtual"] values = ["hvm"]
} }
owners = ["099720109477"] # Canonical owners = ["099720109477"] # Canonical
} }
@ -29,7 +29,7 @@ data "aws_ami" "ubuntu" {
resource "aws_launch_configuration" "as_conf" { resource "aws_launch_configuration" "as_conf" {
name = "web_config" name = "web_config"
image_id = "${data.aws_ami.ubuntu.id}" image_id = "${data.aws_ami.ubuntu.id}"
instance_type = "t1.micro" instance_type = "t2.micro"
} }
``` ```
@ -48,11 +48,11 @@ data "aws_ami" "ubuntu" {
most_recent = true most_recent = true
filter { filter {
name = "name" name = "name"
values = ["ubuntu/images/ebs/ubuntu-trusty-14.04-amd64-server-*"] values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
} }
filter { filter {
name = "virtualization-type" name = "virtualization-type"
values = ["paravirtual"] values = ["hvm"]
} }
owners = ["099720109477"] # Canonical owners = ["099720109477"] # Canonical
} }
@ -60,7 +60,7 @@ data "aws_ami" "ubuntu" {
resource "aws_launch_configuration" "as_conf" { resource "aws_launch_configuration" "as_conf" {
name_prefix = "terraform-lc-example-" name_prefix = "terraform-lc-example-"
image_id = "${data.aws_ami.ubuntu.id}" image_id = "${data.aws_ami.ubuntu.id}"
instance_type = "t1.micro" instance_type = "t2.micro"
lifecycle { lifecycle {
create_before_destroy = true create_before_destroy = true
@ -95,18 +95,18 @@ data "aws_ami" "ubuntu" {
most_recent = true most_recent = true
filter { filter {
name = "name" name = "name"
values = ["ubuntu/images/ebs/ubuntu-trusty-14.04-amd64-server-*"] values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
} }
filter { filter {
name = "virtualization-type" name = "virtualization-type"
values = ["paravirtual"] values = ["hvm"]
} }
owners = ["099720109477"] # Canonical owners = ["099720109477"] # Canonical
} }
resource "aws_launch_configuration" "as_conf" { resource "aws_launch_configuration" "as_conf" {
image_id = "${data.aws_ami.ubuntu.id}" image_id = "${data.aws_ami.ubuntu.id}"
instance_type = "t1.micro" instance_type = "m4.large"
spot_price = "0.001" spot_price = "0.001"
lifecycle { lifecycle {
create_before_destroy = true create_before_destroy = true
@ -221,4 +221,4 @@ Launch configurations can be imported using the `name`, e.g.
``` ```
$ terraform import aws_launch_configuration.as_conf terraform-lg-123456 $ terraform import aws_launch_configuration.as_conf terraform-lg-123456
``` ```