aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::ElasticLoadBalancingV2::Target

Open
#230 8 comments 22 reactions 0 assignees View on GitHub
enhancement networking & content deliv
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

## 1. Title
#### AWS::ElasticLoadBalancingV2::Target

## 2. Scope of request
Currently it is possible to register targets during the creation of an AWS::ElasticLoadBalancingV2::TargetGroup using the Targets: property, unfortunately in the case of a Lambda with a SourceArn permission this creates a circular dependency since the target can't be registered until the permission is added, but the permission can't be added until the TargetGroup ARN is known (ie the TargetGroup has been created).

One option would be to have the TargetGroup resource add permissions automatically in the same way that the console does, which would be convenient, but I suspect that it would be more flexible to simply seperate the registration of a target to a target group into it's own resource, then the TargetGroup could be created without the target, allowing the permission to be added, after which the target could be registered to the existing group.

## 3. Expected behavior
It should be possible to create and register a Lambda function to a TargetGroup in without requiring that access to the function be granted open permissions (ie by not specifying a SourceArn in the permission)

It may make sense to allow the registration resource to accept a list of targets in the same was as the existing Targets property of the AWS::ElasticLoadBalancingv2::TargetGroup

## 4. Suggest specific test cases
Create and associate a Lambda function as an ALB request handler in a single CloudFormation stack.

## 5. Helpful Links to speed up research and evaluation
RegisterTargets API -https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RegisterTargets.html

## 6. Category (required) - Will help with tagging and be easier to find by other users to +1
1. Compute (EC2, ECS, EKS, Lambda...)
4. Networking & Content (VPC, Route53, API GW,...)
8. Security (IAM, KMS...)

Contributor guide

Open the contributing guide

Research direction

Start with the existing AWS::ElasticLoadBalancingV2::TargetGroup Targets property and the linked RegisterTargets API documentation. Define how a separate registration resource would support Lambda targets with a restricted SourceArn, including whether it accepts a target list; done means a single CloudFormation stack can create the function, permission, target group, and registration without a circular dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.