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

Fixed issue with location on create of container service #276

Conversation

nicholasjackson
Copy link
Contributor

The location element needs to be normalised or the API will fail the validation for locations such as "West US 2". There was no test for the Create function so I have not modified any of the tests.

I have tested this using my local branch and I can now successfully create resources.

Error message previous to fix:

2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: HTTP/1.1 400 Bad Request
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Content-Length: 659
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Cache-Control: no-cache
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Content-Type: application/json
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Date: Sat, 26 Aug 2017 14:45:06 GMT
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Expires: -1
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Pragma: no-cache
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: Strict-Transport-Security: max-age=31536000; includeSubDomains
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: X-Ms-Correlation-Request-Id: 867749d4-d078-439c-95cf-95969a6281d1
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: X-Ms-Ratelimit-Remaining-Subscription-Writes: 1196
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: X-Ms-Request-Id: 5441ca2a-55a7-4d54-9e2c-bc0209975fd2
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: X-Ms-Routing-Request-Id: UKWEST:20170826T144506Z:867749d4-d078-439c-95cf-95969a6281d1
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4:
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4: {
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4:   "code": "BadRequest",
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4:   "message": "An error has occurred in subscription c0a607b2-6372-4ef3-abdb-dbe52a7b56ba, resourceGroup: quaketerraform request: Provisioning of resource(s) for container service quakekube in resource group quaketerraform failed. Message: {\n  \"code\": \"InternalOperationError\",\n  \"message\": \"Unexpected request error. (Details: resources.GroupsClient#CheckExistence: Invalid input: autorest/validation: validation failed: parameter=resourceGroupName constraint=Pattern value=\\\"quaketerraform_quakekube_West US 2\\\" details: value doesn't match pattern ^[-\\\\w\\\\._\\\\(\\\\)]+$)\"\n }. Details: \u003cno value\u003e."
2017-08-26T15:45:06.231+0100 [DEBUG] plugin.terraform-provider-azurerm_v0.1.5_x4:  }

@nicholasjackson nicholasjackson force-pushed the nic/container-service-location-bug branch from 23b6005 to 3604040 Compare August 30, 2017 18:08
@nicholasjackson
Copy link
Contributor Author

In addition to the location fix, there is a fix which improves the Diffs for the container service, previously a plan on unchanged code would report changes when none had taken place. I have refactored the schema to change to List which seems to fix this.

@nicholasjackson nicholasjackson force-pushed the nic/container-service-location-bug branch from 4b589e3 to f45bf14 Compare August 31, 2017 09:16
@tombuildsstuff tombuildsstuff self-assigned this Sep 20, 2017
@katbyte
Copy link
Collaborator

katbyte commented May 11, 2018

Hi @nicholasjackson,

The location normalization should be fixed by #1074 so am going to close in favour of it.

Thanks!

@katbyte katbyte closed this May 11, 2018
@ghost
Copy link

ghost commented Mar 31, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 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.

3 participants