main.tf 643 B

1234567891011121314151617181920212223242526272829
  1. provider "aws" {
  2. region = var.region
  3. profile = var.profile
  4. }
  5. # Allow us to configure volumes
  6. locals {
  7. count_volumes = (var.enable-volumes == true ? var.data-node-count : 0)
  8. }
  9. # Allow us to enable flash devices
  10. locals {
  11. count_flash = (var.enable-flash == true ? var.data-node-count : 0)
  12. }
  13. locals {
  14. ssh_key_path = (var.ssh-key == "" ? "~/.ssh/${var.vpc-name}.pem" : "~/.ssh/${replace(var.ssh-key, ".pem", "")}.pem")
  15. }
  16. locals {
  17. ssh_key = (var.ssh-key == "" ? var.vpc-name : replace(var.ssh-key, ".pem", ""))
  18. }
  19. # if the tester-node-type is set add a tester node
  20. locals {
  21. tester_count = (var.tester-node-type == "" ? 0 : 1)
  22. }