-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add private_ips
attribute to aws_lb
resource
#11000
Conversation
Network load balancers don't have security groups, which makes it difficult to configure security group rules for the backends, which is required for health check to function correctly. According to the [documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html), the way to configure security group rules for health checks involves the following steps: 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. 2. In the navigation pane, choose "Network Interfaces". 3. In the search field, type the name of your Network Load Balancer. There is one network interface per load balancer subnet. 4. On the Details tab for each network interface, copy the address from Primary private IPv4 IP. Obviously, this manual process doesn't play well with Terraform. This issue has also been raised on the [AWS discussion forums](https://forums.aws.amazon.com/thread.jspa?threadID=263245). This pull request adds a `private_ips` attribute to the `aws_lb` resource to workaround what seems to be an oversight on the part of AWS.
can you please take a look? @bflad @radeksimko @Ninir @ryndaniels @stack72 @nywilken @gdavison @grubernaut @jen20 @catsby @aeschright @paddycarver @appilon @tombuildsstuff @apparentlymart @jbardin @abinashmeher999 @hendrik363 |
@h0nIg Thanks for this. Validated acceptance test: $ AWS_DEFAULT_REGION=us-east-2 make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSLB_ALB_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSLB_ALB_basic -timeout 120m
=== RUN TestAccAWSLB_ALB_basic
=== PAUSE TestAccAWSLB_ALB_basic
=== CONT TestAccAWSLB_ALB_basic
--- PASS: TestAccAWSLB_ALB_basic (188.85s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 188.894s Will this interact correctly with the ability to specify a private IP address per-subnet: #12331? |
i just checked the other PR, with it you will get the ability to specify an IP address. This PR just scans for the network interfaces associated to the loadbalancer, which will get used to determine the attached ip address to that network interface. Therefore it does not care about if the IP address was specified manually or allocated automatically. @ewbankkit therefore good to get merged |
Hi Y’all, Per the conversation on #2901, we’ll work with the author of #11404 to address any changes that may be needed to merge the PR and will merge it once the work is complete. As a result, we will close this PR in order to focus conversation on #11404. If you feel that #11404 does not adequately address your workflow, please open a new GitHub Issue describing the gap. If you have concerns regarding the design of the upstream API, please reach out to AWS. We apologize for letting this linger without response and will work to merge #11404 in an upcoming release. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
fixed merge errors of #2901