variable "aws_access_key" {}variable "aws_secret_key" {}variable "key_path" {}variable "key_name" {}variable "aws_region" { default = "ap-southeast-2"}
variable "aws_amis" { default = { "ap-southeast-2": "ami-ff3751c5" }}
provider "aws" { access_key = "${var.aws_access_key}" secret_key = "${var.aws_secret_key}" region = "${var.aws_region}"}
# Our default security group to access# the instances over SSH and HTTPresource "aws_security_group" "default" { name = "terraform_http_and_ssh" description = "Terraform HTTP plus SSH" vpc_id = "vpc-6d01e208"
# SSH access from anywhere ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] }
# HTTP access from anywhere ingress { from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] }}
# ELB for it resource "aws_elb" "phabricator" { name = "terraform-basic-elb"
# The same availability zone as our instance availability_zones = ["${aws_instance.phabricator.availability_zone}"]
listener { instance_port = 80 instance_protocol = "http" lb_port = 80 lb_protocol = "http" }
# The instance is registered automatically instances = ["${aws_instance.phabricator.id}"]}
# AWS instancesresource "aws_instance" "phabricator" { connection { # The default username for our AMI user = "ubuntu"
# The path to your keyfile key_file = "${var.key_path}" } instance_type = "t2.micro" ami = "${lookup(var.aws_amis, var.aws_region)}" subnet_id = "subnet-8d6b9de8" security_groups = ["${aws_security_group.default.id}"]
provisioner "remote-exec" { inline = [ "sudo apt-get -y update", "sudo apt-get -y install nginx", "sudo service nginx start", ] }}
output "address" { value = "${aws_elb.phabricator.dns_name}"}
* ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/2129f059-cf82-49c0-b065-f73af12805a5%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To post to this group, send email to terrafo...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To post to this group, send email to terrafo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/fa5d6850-c111-4e82-b391-500327d254e3%40googlegroups.com.