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 aws_alb_target_group data source (#764) #1037

Merged
merged 3 commits into from
Jul 6, 2017
Merged

Add aws_alb_target_group data source (#764) #1037

merged 3 commits into from
Jul 6, 2017

Conversation

aharin
Copy link
Contributor

@aharin aharin commented Jul 2, 2017

This PR adds aws_alb_target_group data source as requested in issue #764

@aharin
Copy link
Contributor Author

aharin commented Jul 2, 2017

$ make testacc TEST=./aws TESTARGS='-run=TestAcc.+AWSALBTargetGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAcc.+AWSALBTargetGroup -timeout 120m
=== RUN   TestAccDataSourceAWSALBTargetGroup_basic
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (288.49s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	288.521s
Alexanders-MacBook-Pro:terraform-provider-aws aharin_wrisk$ make testacc TEST=./aws TESTARGS='-run=TestAcc.*AWSALBTargetGroup'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAcc.*AWSALBTargetGroup -timeout 120m
=== RUN   TestAccDataSourceAWSALBTargetGroup_basic
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (257.30s)
=== RUN   TestAccAWSALBTargetGroupAttachment_basic
--- PASS: TestAccAWSALBTargetGroupAttachment_basic (147.34s)
=== RUN   TestAccAWSALBTargetGroupAttachment_withoutPort
--- PASS: TestAccAWSALBTargetGroupAttachment_withoutPort (160.51s)
=== RUN   TestAccAWSALBTargetGroup_basic
--- PASS: TestAccAWSALBTargetGroup_basic (53.86s)
=== RUN   TestAccAWSALBTargetGroup_namePrefix
--- PASS: TestAccAWSALBTargetGroup_namePrefix (54.10s)
=== RUN   TestAccAWSALBTargetGroup_generatedName
--- PASS: TestAccAWSALBTargetGroup_generatedName (53.55s)
=== RUN   TestAccAWSALBTargetGroup_changeNameForceNew
--- PASS: TestAccAWSALBTargetGroup_changeNameForceNew (95.05s)
=== RUN   TestAccAWSALBTargetGroup_changeProtocolForceNew
--- PASS: TestAccAWSALBTargetGroup_changeProtocolForceNew (99.32s)
=== RUN   TestAccAWSALBTargetGroup_changePortForceNew
--- PASS: TestAccAWSALBTargetGroup_changePortForceNew (96.15s)
=== RUN   TestAccAWSALBTargetGroup_changeVpcForceNew
--- PASS: TestAccAWSALBTargetGroup_changeVpcForceNew (85.20s)
=== RUN   TestAccAWSALBTargetGroup_tags
--- PASS: TestAccAWSALBTargetGroup_tags (95.63s)
=== RUN   TestAccAWSALBTargetGroup_updateHealthCheck
--- PASS: TestAccAWSALBTargetGroup_updateHealthCheck (95.97s)
=== RUN   TestAccAWSALBTargetGroup_updateSticknessEnabled
--- PASS: TestAccAWSALBTargetGroup_updateSticknessEnabled (127.47s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1421.482s

@radeksimko radeksimko added the new-data-source Introduces a new data source. label Jul 3, 2017
@stack72
Copy link
Contributor

stack72 commented Jul 5, 2017

Hi @aharin

thanks for the work here - from your code, it seems like we should be setting arn OR name - is this correct? If so, then we should really check for this in the code

Thoughts?

Paul

@stack72 stack72 added the waiting-response Maintainers are waiting on response from community or contributor. label Jul 5, 2017
@aharin
Copy link
Contributor Author

aharin commented Jul 5, 2017

Hi @stack72

Indeed if arn is set, then it will be used, otherwise name is used. This is exactly the same behaviour as in dataSourceAwsAlb(). In fact I copied the code from there. Extra validation could be useful but then it should be done across the board in dataSourceAwsAlb() and other datasources that use the same logic. Perhaps as a separate issue?

@stack72
Copy link
Contributor

stack72 commented Jul 6, 2017

Hi @aharin

Ok, that makes sense - this LGTM! Tests pass as expected:

% make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAWSALBTargetGroup'                                                 1 ↵
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccDataSourceAWSALBTargetGroup -timeout 120m
=== RUN   TestAccDataSourceAWSALBTargetGroup_basic
--- PASS: TestAccDataSourceAWSALBTargetGroup_basic (243.92s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	243.946s

Thanks for the work here

Paul

@stack72 stack72 merged commit 6da2f0b into hashicorp:master Jul 6, 2017
@ghost
Copy link

ghost commented Apr 11, 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 Apr 11, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-data-source Introduces a new data source.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants