Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

h0nIg
Copy link

@h0nIg h0nIg commented Nov 25, 2019

fixed merge errors of #2901

joshuaspence and others added 2 commits April 9, 2019 18:08
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.
@h0nIg h0nIg requested a review from a team November 25, 2019 09:10
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/elbv2 Issues and PRs that pertain to the elbv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 25, 2019
@h0nIg h0nIg changed the title Privateip Add private_ips attribute to aws_lb resource Nov 25, 2019
@h0nIg
Copy link
Author

h0nIg commented Feb 2, 2020

@gdavison @bflad can you please take a look? this is extremly cumbersome, since this PR will bring so much value and nobody is taking a look at it.

@h0nIg
Copy link
Author

h0nIg commented Mar 6, 2020

can you please take a look? @bflad @radeksimko @Ninir @ryndaniels @stack72 @nywilken @gdavison @grubernaut @jen20 @catsby @aeschright @paddycarver @appilon @tombuildsstuff @apparentlymart @jbardin @abinashmeher999 @hendrik363

@ewbankkit
Copy link
Contributor

@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?

@h0nIg
Copy link
Author

h0nIg commented Mar 22, 2020

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

@maryelizbeth
Copy link
Contributor

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.

@ghost
Copy link

ghost commented May 22, 2020

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!

@ghost ghost locked and limited conversation to collaborators May 22, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/elbv2 Issues and PRs that pertain to the elbv2 service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants