diff --git a/terraform/aws/new-vpc/output.tf b/terraform/aws/new-vpc/output.tf new file mode 100644 index 0000000..e332695 --- /dev/null +++ b/terraform/aws/new-vpc/output.tf @@ -0,0 +1,3 @@ +output "instance_public_ip" { + value = "${aws_instance.coreos01.public_ip}" +} diff --git a/terraform/aws/new-vpc/provider.tf b/terraform/aws/new-vpc/provider.tf index 0c28776..d7c130e 100644 --- a/terraform/aws/new-vpc/provider.tf +++ b/terraform/aws/new-vpc/provider.tf @@ -1,3 +1,3 @@ provider "aws" { - region = "us-west-2" + region = "${var.user_region}" } diff --git a/terraform/aws/new-vpc/vars.tf b/terraform/aws/new-vpc/variables.tf similarity index 64% rename from terraform/aws/new-vpc/vars.tf rename to terraform/aws/new-vpc/variables.tf index a1984a6..128d6f5 100644 --- a/terraform/aws/new-vpc/vars.tf +++ b/terraform/aws/new-vpc/variables.tf @@ -1,11 +1,14 @@ +variable "user_region" { + type = "string" + description = "AWS region in which all resources will be created" +} + variable "keypair" { type = "string" description = "AWS SSH keypair to use to connect to instances" - default = "aws_rsa" } variable "flavor" { type = "string" description = "AWS type to use when creating instances" - default = "t2.micro" }