diff --git a/examples/nlb-test/main.tf b/examples/nlb-test/main.tf new file mode 100644 index 00000000..a70a7300 --- /dev/null +++ b/examples/nlb-test/main.tf @@ -0,0 +1,77 @@ +provider "aws" { + region = "us-west-2" +} + +data "aws_availability_zones" "azs" { + state = "available" +} + +module "vpc" { + source = "fpco/foundation/aws//modules/vpc-scenario-1" + cidr = "10.0.0.0/16" + public_subnet_cidrs = ["10.0.0.0/24", "10.0.1.0/24", "10.0.2.0/24"] + region = "us-west-2" + azs = data.aws_availability_zones.azs.names + name_prefix = "nlb-poc" +} + +module "ubuntu" { + source = "fpco/foundation/aws//modules/ami-ubuntu" + release = "18.04" +} + +module "asg" { + source = "fpco/foundation/aws//modules/asg" + azs = [] + key_name = "shida-west-2" + subnet_ids = [module.vpc.public_subnet_ids[0], module.vpc.public_subnet_ids[2]] + name_prefix = "nlb-poc" + min_nodes = 2 + ami = module.ubuntu.id + max_nodes = 2 + security_group_ids = [aws_security_group.sg-asg.id] + alb_target_group_arns = module.nlb.target_group_arns + user_data = <