Last active
October 2, 2018 16:12
-
-
Save skwp/05ec88591d6fc566a2eba487bc2fbea5 to your computer and use it in GitHub Desktop.
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
resource "aws_instance" "client" { | |
tags { | |
Name = "client" | |
bitcoind_flags = "${var.bitcoind_flags}" | |
dns_name = "client${count.index}.${var.network_name}.${var.domain}" | |
domain = "${var.domain}" | |
mining = "false" | |
network_name = "${var.network_name}" | |
node_name = "client${count.index}" | |
node_number = "${count.index}" | |
restore_backup = "${var.restore_backup}" | |
rpcuser="${var.rpcuser== "" ? random_string.rpcuser.result : var.rpcuser}" | |
rpcpassword="${var.rpcpassword== "" ? random_string.rpcpassword.result : var.rpcpassword}" | |
} | |
count = "${var.clients}" | |
ami = "${data.aws_ami.bloxroute-bitcoin-base.id}" | |
instance_type = "${var.client_instance_type}" | |
key_name = "test" | |
monitoring = true | |
subnet_id = "${data.aws_subnet.public-subnet.id}" | |
vpc_security_group_ids = [ | |
"${data.aws_security_group.full-egress.id}", | |
"${data.aws_security_group.open-ssh.id}", | |
"${data.aws_security_group.open-btc.id}" | |
] | |
user_data = "${file("${path.module}/bitcoin-boot.sh")}" | |
iam_instance_profile = "bitcoin-instance-role" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment