This commit should fix the following acceptance test failures:
=== RUN TestAccAzureDnsServerBasic
--- FAIL: TestAccAzureDnsServerBasic (2.17s)
testing.go:172: Step 0 error: Error applying: 1 error(s) occurred:
* azure_dns_server.foo: Failed issuing update to network
configuration: Error response from Azure. Code: BadRequest,
Message: Multiple DNS servers specified with the same name
'terraform-dns-server'.
=== RUN TestAccAzureDnsServerUpdate
--- FAIL: TestAccAzureDnsServerUpdate (2.04s)
testing.go:172: Step 0 error: Error applying: 1 error(s) occurred:
* azure_dns_server.foo: Failed issuing update to network
configuration: Error response from Azure. Code: BadRequest,
Message: Multiple DNS servers specified with the same name
'terraform-dns-server'.
Change the `RetryFunc` from a plain `error` return type to a
specialized `RetryError` which must decide whether it is
retryable or not.
Add `RetryableError` / `NonRetryableError` factory functions that
callers are meant to use to build up these errors.
This makes it eminently clear whether or not a given error is
retryable from inside the client code.
Goal here is to _not_ change any behavior, simply reflect the
existing behavior with the new, clearer, API.
This should address the failures seen in Travis Build Run #8774. It is
likely there are others which also need addressing - they will be
addressed on a case-by-case basis as they come up.
Some resources can only be queried via the network configuration - if
the network configuration does not exist we were failing, however that
is a desirable state since without a network configuration for the
subscription the resources in question cannot exist.
vmutils.ConfigureDeploymentFromVMImage has been changed to
vmutils.ConfigureDeploymentFromPublishedVMImage in the upstream library
- this allows us to build.
vmImageClient.ListVirtualMachineImages takes a parameter as of
68d50cb53a73edfeb7f17f5e86cdc8eb359a9528 in Azure/azure-sdk-for-go .
Passing in a parameters object whose members are all empty strings seems
to restore the previous behavior.
Issues were:
* `settings_file` `ValidateFunc` needs to expand homedir just like the
`configure` does, otherwise ~-based paths fail validation
* `isFile` was being called before ~-expand so configure was failing as well
* `Config` was swallowing error so provider was ending up with `nil`,
resulting in crash
To fix:
* Consolidate settings_file path/contents handling into a single helper
called from both `validate` and `configure` funcs
* Return err from `Config`
To cover:
* Added test case to validate w/ tilde-path
* Added configure test w/ tilde-path