|
@@ -1,14 +1,14 @@
|
|
|
#-------------------------------
|
|
|
# Create Nuxeo Ubuntu Instance
|
|
|
#-------------------------------
|
|
|
-# Create a new EC2 instance
|
|
|
+# Create a new EC2 instance
|
|
|
|
|
|
variable "stack_name" {
|
|
|
type = "string"
|
|
|
description = "Name of the Stack/Env that this instance will used for"
|
|
|
}
|
|
|
|
|
|
-variable "ubuntu_releases" {
|
|
|
+variable "ubuntu_releases" {
|
|
|
default = {
|
|
|
trusty = "trusty-14.04"
|
|
|
xenial = "xenial-16.04"
|
|
@@ -56,17 +56,16 @@ variable "public_key_path" {
|
|
|
}
|
|
|
|
|
|
#---------------------
|
|
|
-# Deployer SSH keys
|
|
|
+# Deployer SSH keys
|
|
|
#--------------------
|
|
|
resource "aws_key_pair" "deployer" {
|
|
|
- key_name = "deployer-key"
|
|
|
+ key_name = "deployer-key"
|
|
|
public_key = "${file(var.public_key_path)}"
|
|
|
}
|
|
|
|
|
|
#---------------------
|
|
|
# EC2 Instance
|
|
|
#--------------------
|
|
|
-
|
|
|
resource "aws_instance" "ec2" {
|
|
|
ami = "${data.aws_ami.ubuntu.id}"
|
|
|
instance_type = "${var.instance_type}"
|
|
@@ -80,6 +79,3 @@ resource "aws_instance" "ec2" {
|
|
|
managed_by="terraform"
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|