Last active
December 9, 2015 20:19
-
-
Save phinze/30b33f860cebecb91dd8 to your computer and use it in GitHub Desktop.
Repro attempt for https://github.com/hashicorp/terraform/issues/4186
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
access_key = "foo" | |
secret_key = "bar" | |
region = "us-east-1" | |
} | |
module "vpc" { | |
source = "./tf_aws_vpc" | |
name = "keyprovidertest" | |
cidr = "10.0.0.0/16" | |
private_subnets = "10.0.1.0/24" | |
public_subnets = "10.0.101.0/24" | |
azs = "" | |
} | |
resource "aws_security_group" "test" { | |
vpc_id = "${module.vpc.vpc_id}" | |
ingress { | |
protocol = "-1" | |
from_port = 0 | |
to_port = 0 | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
egress { | |
protocol = "-1" | |
from_port = 0 | |
to_port = 0 | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
} | |
resource "aws_instance" "test" { | |
ami = "ami-0f8bce65" | |
instance_type = "t2.micro" | |
key_name = "terraform-testing" | |
subnet_id = "${module.vpc.public_subnets}" | |
vpc_security_group_ids = ["${aws_security_group.test.id}"] | |
provisioner "file" { | |
source = "script.sh" | |
destination = "/tmp/script.sh" | |
connection { | |
agent = false | |
user = "ubuntu" | |
key_file = "~/.ssh/terraform-testing.pem" | |
} | |
} | |
provisioner "remote-exec" { | |
inline = [ | |
"echo 1" | |
] | |
connection { | |
agent = false | |
user = "ubuntu" | |
key_file = "~/.ssh/terraform-testing.pem" | |
} | |
} | |
tags { | |
Name = "test_server" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment