Skip to content

[App Service] Update API is Broken #1697

Closed

Description

👋

I've been trying to add support for App Services to Terraform - during which time I've encountered some bugs with the App Services/Web Apps API:

When using this request:

PUT /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tharvey-dev/providers/Microsoft.Web/sites/tharvey-appservice?api-version=2016-08-01&forceDnsRegistration=false&skipCustomDomainVerification=true&skipDnsRegistration=true&ttlInSeconds=60 HTTP/1.1
Host: management.azure.com
User-Agent: HashiCorp-Terraform-v0.10.0-dev
Content-Length: 249
Authorization: Bearer replaced-with-this-random-string---never-gonna-give-you-up---never-gonna-let-you-down
Content-Type: application/json
Accept-Encoding: gzip

{
	"location": "westeurope",
	"tags": {},
	"properties": {
		"enabled": true,
		"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tharvey-dev/providers/Microsoft.Web/serverfarms/tharvey-appserviceplan",
		"clientAffinityEnabled": true
	}
}

The following response is returned:

HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 451
Content-Type: application/json; charset=utf-8
Expires: -1
Strict-Transport-Security: max-age=31536000; includeSubDomains
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1192
x-ms-request-id: 8a3a5d83-e2bc-401b-9ee2-5bcd1d0e7ab6
x-ms-correlation-request-id: 8a3a5d83-e2bc-401b-9ee2-5bcd1d0e7ab6
x-ms-routing-request-id: UKWEST:20170911T115952Z:8a3a5d83-e2bc-401b-9ee2-5bcd1d0e7ab6
Date: Mon, 11 Sep 2017 11:59:51 GMT

{
	"Code": "BadRequest",
	"Message": "ttlInSeconds object is not present in the request body.",
	"Target": null,
	"Details": [{
		"Message": "ttlInSeconds object is not present in the request body."
	}, {
		"Code": "BadRequest"
	}, {
		"ErrorEntity": {
			"ExtendedCode": "01008",
			"MessageTemplate": "{0} object is not present in the request body.",
			"Parameters": ["ttlInSeconds"],
			"Code": "BadRequest",
			"Message": "ttlInSeconds object is not present in the request body."
		}
	}],
	"Innererror": null
}

However - even when submitting the ttlInSeconds field in the request object (either, in the top level or within Parameters) - this response is returned.

This is in contrast to initially Creating an App Service / Web App - when this argument is parsed from the URL (as is specified in the Swagger). I'm submitting this with the Go SDK - however this appears to be a Service Issue rather than a Swagger issue, so I'm filing it here.

Would it be possible for someone to take a look into this?

Thanks!

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

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions