f5devcentral / terraform-provider-bigip-old

This Repo is Deprecated please refer to https://github.com/terraform-providers/terraform-provider-bigip Provider is Published !
Mozilla Public License 2.0
32 stars 15 forks source link

localhost links? #89

Closed magnusheino closed 6 years ago

magnusheino commented 6 years ago

I, as many others it seems, are getting provider.bigip: unexpected EOF

If I look at the debug log though, I see this:

2018/05/2018-05-28T16:05:51.798+0200 [DEBUG] plugin.terraform-provider-bigip: 2018/05/28 16:05:51 Authorization failed: user=https://localhost/mgmt/shared/authz/users/myusername resource=/mgmt/tm/net/self verb=GET uri:http://localhost:8100/mgmt/tm/net/self referrer:x.x.x.x sender:x.x.x.x

BIG_IP issue 449747 says that

All of the self links and reference links in iControl REST responses will contain localhost instead of an IP address or a hostname or an FQDN. This occurs when using iControl. iControl REST clients will need to substitute 'localhost' with the correct server name (or IP address or FQDN) when navigating links returned in responses .This is by design. Workaround: iControl REST clients will need to substitute 'localhost' with the correct server name (or IP address or FQDN) when navigating links returned in responses.

Is this not handled in the plugin (localhost replacement while traversion), and is that the error I am seeing, or is it something else?

If I change username/password to something thats NOT valid I get a Authentication required html-page back, so I dont think thats the problem.

dannyk81 commented 6 years ago

Hey @magnusheino, the "unexpected EOF" error is not related to what you see above, the uri reported with localhost is correct and it is not what is used by the go-bigip library to communicate with the BigIP device.

The issue was in the provider initialization code that was incorrectly reporting the error when testing the credentials.

This was since then fixed (here --> https://github.com/f5devcentral/terraform-provider-bigip/commit/e3cbfd2ca66f73bedd680bf99e2178d45dfe7adb)

dannyk81 commented 6 years ago

@scshitole I believe we can close this one.