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

provider/aws: Add validation of Health Check target to aws_elb. #8578

Conversation

kwilczynski
Copy link
Contributor

This commit adds a simple validation of the target in the Health Check block in
order to reduce the number of issues related to the type, port and path values,
especially when the TCP and SSL type was used.

Signed-off-by: Krzysztof Wilczynski krzysztof.wilczynski@linux.com

@kwilczynski
Copy link
Contributor Author

Resolves #8547.

@kwilczynski kwilczynski changed the title Add validation of Health Check target to aws_elb. provider/aws: Add validation of Health Check target to aws_elb. Aug 31, 2016
@kwilczynski
Copy link
Contributor Author

Tests are passing:

$  make test TEST=./builtin/providers/aws TESTARGS='-run=TestResourceAWSELB_ -v'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/31 14:57:05 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/aws -run=TestResourceAWSELB_ -v -timeout=30s -parallel=4
=== RUN   TestResourceAWSELB_validateElbNameCannotBeginWithHyphen
--- PASS: TestResourceAWSELB_validateElbNameCannotBeginWithHyphen (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotBeLongerThen32Characters
--- PASS: TestResourceAWSELB_validateElbNameCannotBeLongerThen32Characters (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotHaveSpecialCharacters
--- PASS: TestResourceAWSELB_validateElbNameCannotHaveSpecialCharacters (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotEndWithHyphen
--- PASS: TestResourceAWSELB_validateElbNameCannotEndWithHyphen (0.00s)
=== RUN   TestResourceAWSELB_validateHealthCheckTarget
--- PASS: TestResourceAWSELB_validateHealthCheckTarget (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    0.016s

@kwilczynski
Copy link
Contributor Author

As per @stack72, I will add more validation here to cover more cases.

@kwilczynski kwilczynski changed the title provider/aws: Add validation of Health Check target to aws_elb. [WIP] provider/aws: Add validation of Health Check target to aws_elb. Aug 31, 2016
@kwilczynski kwilczynski force-pushed the feature/health-check-target-validation-aws_elb branch 4 times, most recently from 4a281d6 to c697f2f Compare September 2, 2016 10:41
@kwilczynski
Copy link
Contributor Author

Tests (more) passing:

 make test TEST=./builtin/providers/aws TESTARGS='-run=TestResourceAWSELB_validate -v'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/02 11:43:07 Generated command/internal_plugin_list.go
TF_ACC= go test ./builtin/providers/aws -run=TestResourceAWSELB_validate -v -timeout=30s -parallel=4
=== RUN   TestResourceAWSELB_validateElbNameCannotBeginWithHyphen
--- PASS: TestResourceAWSELB_validateElbNameCannotBeginWithHyphen (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotBeLongerThen32Characters
--- PASS: TestResourceAWSELB_validateElbNameCannotBeLongerThen32Characters (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotHaveSpecialCharacters
--- PASS: TestResourceAWSELB_validateElbNameCannotHaveSpecialCharacters (0.00s)
=== RUN   TestResourceAWSELB_validateElbNameCannotEndWithHyphen
--- PASS: TestResourceAWSELB_validateElbNameCannotEndWithHyphen (0.00s)
=== RUN   TestResourceAWSELB_validateAccessLogsInterval
--- PASS: TestResourceAWSELB_validateAccessLogsInterval (0.00s)
=== RUN   TestResourceAWSELB_validateListenerProtocol
--- PASS: TestResourceAWSELB_validateListenerProtocol (0.00s)
=== RUN   TestResourceAWSELB_validateHealthCheckTarget
--- PASS: TestResourceAWSELB_validateHealthCheckTarget (0.00s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    0.016s

@kwilczynski kwilczynski changed the title [WIP] provider/aws: Add validation of Health Check target to aws_elb. provider/aws: Add validation of Health Check target to aws_elb. Sep 2, 2016
This commit adds a simple validation of the target in the Health Check block in
order to reduce the number of issues related to the type, port and path values,
especially when the TCP and SSL type was used.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@kwilczynski kwilczynski force-pushed the feature/health-check-target-validation-aws_elb branch from c697f2f to bcaac02 Compare September 3, 2016 12:49
@stack72
Copy link
Contributor

stack72 commented Sep 3, 2016

Hi @kwilczynski

This LGTM! Tests are green :)

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSELB_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/04 00:03:07 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSELB_ -timeout 120m
=== RUN   TestAccAWSELB_importBasic
--- PASS: TestAccAWSELB_importBasic (34.15s)
=== RUN   TestAccAWSELB_basic
--- PASS: TestAccAWSELB_basic (33.02s)
=== RUN   TestAccAWSELB_fullCharacterRange
--- PASS: TestAccAWSELB_fullCharacterRange (32.23s)
=== RUN   TestAccAWSELB_AccessLogs
--- PASS: TestAccAWSELB_AccessLogs (103.40s)
=== RUN   TestAccAWSELB_generatedName
--- PASS: TestAccAWSELB_generatedName (29.56s)
=== RUN   TestAccAWSELB_availabilityZones
--- PASS: TestAccAWSELB_availabilityZones (55.03s)
=== RUN   TestAccAWSELB_tags
--- PASS: TestAccAWSELB_tags (58.03s)
=== RUN   TestAccAWSELB_iam_server_cert
--- PASS: TestAccAWSELB_iam_server_cert (45.02s)
=== RUN   TestAccAWSELB_InstanceAttaching
--- PASS: TestAccAWSELB_InstanceAttaching (177.16s)
=== RUN   TestAccAWSELB_HealthCheck
--- PASS: TestAccAWSELB_HealthCheck (49.07s)
=== RUN   TestAccAWSELB_Timeout
--- PASS: TestAccAWSELB_Timeout (32.71s)
=== RUN   TestAccAWSELB_ConnectionDraining
--- PASS: TestAccAWSELB_ConnectionDraining (29.71s)
=== RUN   TestAccAWSELB_SecurityGroups
--- PASS: TestAccAWSELB_SecurityGroups (65.13s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    744.231s

@ghost
Copy link

ghost commented Apr 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants