Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 8bafd0b

Browse files
Mike McGirrketzacoatl
Mike McGirr
authored andcommittedApr 15, 2020
Pass the alb_target_group_arns to the ASG in the SNASG module
1 parent b2032c1 commit 8bafd0b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎modules/single-node-asg/main.tf

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module "server" {
6262
# The IAM Instance Profile w/ attach_ebs role
6363
iam_profile = module.instance_profile.iam_profile_id
6464
instance_type = var.instance_type
65-
# 1 EC2 instance <> 1 EBS volume
65+
# 1 EC2 instance <> 1 EBS volume
6666
max_nodes = 1
6767
min_nodes = 1
6868
placement_group = var.placement_group
@@ -77,6 +77,8 @@ module "server" {
7777
security_group_ids = var.security_group_ids
7878
subnet_ids = [var.subnet_id]
7979

80+
alb_target_group_arns = var.alb_target_group_arns
81+
8082
user_data = <<END_INIT
8183
#!/bin/bash
8284
# exec > /tmp/init.log

‎modules/single-node-asg/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ variable "name_suffix" {
2929
type = string
3030
}
3131

32+
variable "alb_target_group_arns" {
33+
default = []
34+
description = "list of target_group for application load balancer to associate with the ASG (by ARN)"
35+
type = list(string)
36+
}
37+
3238
variable "root_volume_type" {
3339
default = "gp2"
3440
description = "Type of EBS volume to use for the root block device"

0 commit comments

Comments
 (0)
This repository has been archived.