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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic Manager API Version in SDK isn't available #794

Closed
tombuildsstuff opened this Issue Oct 5, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@tombuildsstuff
Contributor

tombuildsstuff commented Oct 5, 2017

馃憢

I've spent the last couple of days trying to migrate us over to using v11 of the SDK - and have run into what I believe is a blocker with the Traffic Manager SDK. v11 switches over to using API version 2017-09-01-preview (from 2015-11-01) - which it appears isn't actually available in Azure yet:

trafficmanager.ProfilesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'global' and API version '2017-09-01-preview' for type 'trafficmanagerprofiles'. The supported api-versions are '2015-04-28-preview, 2015-11-01, 2017-03-01, 2017-05-01'. The supported locations are ', global'."

This means our acceptance tests are failing:

$ acctests azurerm TestAccAzureRMTrafficManagerProfile_priority
=== RUN   TestAccAzureRMTrafficManagerProfile_priority
--- FAIL: TestAccAzureRMTrafficManagerProfile_priority (53.12s)
	testing.go:459: Step 0 error: Error applying: 1 error(s) occurred:

		* azurerm_traffic_manager_profile.test: 1 error(s) occurred:

		* azurerm_traffic_manager_profile.test: trafficmanager.ProfilesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'global' and API version '2017-09-01-preview' for type 'trafficmanagerprofiles'. The supported api-versions are '2015-04-28-preview, 2015-11-01, 2017-03-01, 2017-05-01'. The supported locations are ', global'."
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-azurerm/azurerm	53.147s

However when switching out the API version used in V11 of the SDK to 2015-11-01 - the tests appear to pass fine:

 $ acctests azurerm TestAccAzureRMTrafficManagerProfile_priority
=== RUN   TestAccAzureRMTrafficManagerProfile_priority
--- PASS: TestAccAzureRMTrafficManagerProfile_priority (60.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	60.460s

I took a look in the Portal too - and it appears the "Automation Script" export functionality is suggesting using a newer API version 2017-05-01:

screen shot 2017-10-05 at 10 30 07

I've also tried updating the SDK to use this version - and this also looks good:

$ acctests azurerm TestAccAzureRMTrafficManagerProfile_priority
=== RUN   TestAccAzureRMTrafficManagerProfile_priority
--- PASS: TestAccAzureRMTrafficManagerProfile_priority (61.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	61.759s

As such would it be possible to downgrade to a previous API version until the new version is fully rolled out?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment