Need to add NLB IP as a target in ALB using terraform. Both load balancers are in different VPCs

289 views Asked by At

I have a requirement to access public ALB where the target is private IP of NLB resides in different VPC. Already established a connectivity using transit gateway. My challenge here is while automating via terraform, i need to add this private IP manually after the NLB being created. As I have to resolve the DNS of the NLB inorder to add to the ALB's target as IP. Could this task be able to automate by involving shell script? Great if anyone can help me on this.

1

There are 1 answers

3
Marcin On BEST ANSWER

Could this task be able to automate by involving shell script?

Yes, you can develop your own custom data source provider as bash or python (or what ever you want) to resolve the dns for you and return the IPs to your TF script automatically.