RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Fix VS and Node Read functions #131

Open RavinderReddyF5 opened 4 years ago

RavinderReddyF5 commented 4 years ago

Issue by dannyk81 Wednesday May 01, 2019 at 16:06 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/pull/100


This PR fixes a couple of problem with Read function for VS and Node resources.

1) Virtual Server port attribute was incorrectly retrieved from SourcePort parameter, which is unrelated. The service port is returned by the API in the destination parameter.

2) Node state attribute was not refreshed as part of Read, I also changed it to Computed: true instead of hard coding a default.

/cc @scshitole


dannyk81 included the following code: https://github.com/terraform-providers/terraform-provider-bigip/pull/100/commits

RavinderReddyF5 commented 4 years ago

Comment by scshitole Wednesday May 01, 2019 at 20:56 GMT


@dannyk81 node-test broken, should be easy to fix

PASS: TestAccBigipLtmMonitor_import (3.26s)
=== RUN   TestAccBigipLtmNode_create
--- FAIL: TestAccBigipLtmNode_create (3.23s)
    testing.go:538: Step 0 error: Check failed: Check 8/8 error: bigip_ltm_node.test-node: Attribute 'state' expected "user-up", got "unchecked"
    testing.go:538: Step 0 error: Check failed: Check 8/9 error: bigip_ltm_node.test-fqdn-node: Attribute 'state' expected "user-up", got "fqdn-checking"
=== RUN   TestAccBigipLtmNode_import
--- PASS: TestAccBigipLtmNode_import (5.66s)
=== RUN   TestAccBigipLtmNodeInvalid
RavinderReddyF5 commented 4 years ago

Comment by dannyk81 Wednesday May 01, 2019 at 23:20 GMT


yeah, we were forcing state user-up but the actual default states are different.

I see you already pushed a fix for the tests :+1: