123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- provider "aws" {
- region = var.region
- profile = var.profile
- }
- module "vpc" {
- source = "../tfmodule-aws-2tier-vpc"
- region = var.region
- profile = var.profile
- vpc-name = var.vpc-name
- vpc-cidr = var.vpc-cidr
- vpc-azs = var.vpc-azs
- enable-private = false
- common-tags = {
- "Owner" = "maguec"
- "Project" = "Visa-Backup-Restore-Test"
- "Gabe" = "Please-Leave-UP"
- }
- }
- module "nodes" {
- source = "../tfmodule-aws-redis-enterprise"
- region = var.region
- profile = var.profile
- open-nets = ["76.14.80.208/32"]
- data-node-count = 4
- re-volume-size = 1000
- re-instance-type = "m5.8xlarge"
- vpc-cidr = var.vpc-cidr
- vpc-azs = var.vpc-azs
- vpc-name = var.vpc-name
- vpc-id = module.vpc.vpc-id
- vpc-subnets = module.vpc.subnets-public
- enable-flash = true
- common-tags = {
- "Owner" = "maguec"
- "Project" = "Visa-Backup-Restore-Test"
- "Gabe" = "Please-Leave-UP"
- }
- }
- output "node-ips" {
- value = <<EOT
- %{ for ip in module.nodes.node-ips ~}
- ssh -i ~/.ssh/${var.vpc-name}.pem -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${ip}
- %{ endfor ~}
- EOT
- }
|