1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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" = "example_terraform"
- }
- }
- module "nodes" {
- source = "../tfmodule-aws-redis-enterprise"
- region = var.region
- profile = var.profile
- open-nets = ["76.14.80.208/32"]
- data-node-count = 3
- re-volume-size = 250
- re-instance-type = "m5.4xlarge"
- 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" = "example_terraform"
- }
- }
- output "node-ips" {
- value = formatlist("ssh -i ~/.ssh/${var.vpc-name}.pem -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@%s", module.nodes.node-ips)
- }
|