mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Did a minor refactoring of the .tf files
This commit is contained in:
parent
9243e9b468
commit
7a2c5bb202
@ -1,3 +1,7 @@
|
||||
# Each AWS region has a different AMI name
|
||||
# even though the contents are the same.
|
||||
# This file has the mapping from region --> AMI name.
|
||||
#
|
||||
# These are all Ubuntu 14.04 LTS AMIs
|
||||
# with Arch = amd64, Instance Type = hvm:ebs-ssd
|
||||
# from https://cloud-images.ubuntu.com/locator/ec2/
|
||||
|
6
ntools/one-m/aws/outputs.tf
Normal file
6
ntools/one-m/aws/outputs.tf
Normal file
@ -0,0 +1,6 @@
|
||||
# You can get the value of "ip_address" after running terraform apply using:
|
||||
# $ terraform output ip_address
|
||||
# You could use that in a script, for example
|
||||
output "ip_address" {
|
||||
value = "${aws_eip.ip.public_ip}"
|
||||
}
|
6
ntools/one-m/aws/providers.tf
Normal file
6
ntools/one-m/aws/providers.tf
Normal file
@ -0,0 +1,6 @@
|
||||
provider "aws" {
|
||||
# An AWS access_key and secret_key are needed; Terraform looks
|
||||
# for an AWS credentials file in the default location.
|
||||
# See https://tinyurl.com/pu8gd9h
|
||||
region = "${var.aws_region}"
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
provider "aws" {
|
||||
# An AWS access_key and secret_key are needed; Terraform looks
|
||||
# for an AWS credentials file in the default location.
|
||||
# See https://tinyurl.com/pu8gd9h
|
||||
region = "${var.aws_region}"
|
||||
}
|
||||
|
||||
# One instance (virtual machine) on AWS:
|
||||
# https://www.terraform.io/docs/providers/aws/r/instance.html
|
||||
resource "aws_instance" "instance" {
|
||||
ami = "${lookup(var.amis, var.aws_region)}"
|
||||
@ -43,6 +37,7 @@ resource "aws_eip" "ip" {
|
||||
vpc = true
|
||||
}
|
||||
|
||||
# This attaches the instance to the EBS volume for RethinkDB storage
|
||||
# https://www.terraform.io/docs/providers/aws/r/volume_attachment.html
|
||||
resource "aws_volume_attachment" "ebs_att" {
|
||||
# Why /dev/sdp? See https://tinyurl.com/z2zqm6n
|
||||
@ -50,10 +45,3 @@ resource "aws_volume_attachment" "ebs_att" {
|
||||
volume_id = "${aws_ebs_volume.db_storage.id}"
|
||||
instance_id = "${aws_instance.instance.id}"
|
||||
}
|
||||
|
||||
# You can get the value of "ip_address" after running terraform apply using:
|
||||
# $ terraform output ip_address
|
||||
# You could use that in a script, for example
|
||||
output "ip_address" {
|
||||
value = "${aws_eip.ip.public_ip}"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user