需要使用 terraform 在 ALB 中添加 NLB IP 作为目标。两个负载均衡器位于不同的 VPC 中
Need to add NLB IP as a target in ALB using terraform. Both load balancers are in different VPCs
我需要访问 public ALB,目标是位于不同 VPC 中的 NLB 的私有 IP。已使用中转网关建立连接。我的挑战是在通过 Terraform 实现自动化时,我需要在创建 NLB 后手动添加此私有 IP。因为我必须解析 NLB 的 DNS,以便作为 IP 添加到 ALB 的目标。这个任务可以通过涉及 shell 脚本来自动化吗?如果有人可以帮助我,那就太好了。
Could this task be able to automate by involving shell script?
是的,您可以开发自己的 custom data source provider 作为 bash 或 python(或任何您想要的)来为您解析 dns 和 return IP自动添加到您的 TF 脚本。
我需要访问 public ALB,目标是位于不同 VPC 中的 NLB 的私有 IP。已使用中转网关建立连接。我的挑战是在通过 Terraform 实现自动化时,我需要在创建 NLB 后手动添加此私有 IP。因为我必须解析 NLB 的 DNS,以便作为 IP 添加到 ALB 的目标。这个任务可以通过涉及 shell 脚本来自动化吗?如果有人可以帮助我,那就太好了。
Could this task be able to automate by involving shell script?
是的,您可以开发自己的 custom data source provider 作为 bash 或 python(或任何您想要的)来为您解析 dns 和 return IP自动添加到您的 TF 脚本。