Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.61k stars 5.01k forks source link

500 error when trying to create Domain Registration #8641

Open jackofallops opened 4 years ago

jackofallops commented 4 years ago

Hi,

I'm adding support for Domain Registrations to Terraform and I'm getting a 500 response to the PUT request for Create as follows:

Request:

:authority: management.azure.com
:method: PUT
:path: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-domain-200309085601550068/providers/Microsoft.DomainRegistration/domains/[REDACTED]?api-version=2019-08-01
:scheme: https
content-type: application/json; charset=utf-8
user-agent: Go/go1.13.5 (amd64-darwin) go-autorest/v13.3.0 Azure-SDK-For-Go/v38.1.0 web/2019-08-01 HashiCorp Terraform/0.12.7-sdk (+https://www.terraform.io) Terraform Plugin SDK/1.6.0 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: [REDACTED]
x-ms-correlation-request-id: 720bf502-d109-660e-4fd0-93b602bf5108
content-length: 1559
accept-encoding: gzip

{"location":"global","properties":{"contactAdmin":{"addressMailing":{"address1":"1 Test Avenue","city":"TestCity1","country":"USA","postalCode":"90210","state":"CA"},"email":"[REDACTED]”,”nameFirst":"Admin","nameLast":"Contact","phone":"555-555-5555"},"contactBilling":{"addressMailing":{"address1":"2 Test Avenue","city":"TestCity2","country":"USA","postalCode":"90210","state":"CA"},"email":"[REDACTED]","jobTitle":"Financial Controller","nameFirst":"Bill","nameLast":"Contact","nameMiddle":"Ing","phone":"555-555-5555"},"contactRegistrant":{"addressMailing":{"address1":"3 Test Avenue","address2":"Test Address 3","city":"TestCity3","country":"USA","postalCode":"90210","state":"CA"},"email":"[REDACTED]","jobTitle":"Director","nameFirst":"Reg","nameLast":"Contact","nameMiddle":"Istrant","phone":"555-555-5555"},"contactTech":{"addressMailing":{"address1":"4 Test Avenue","city":"TestCity4","country":"USA","postalCode":"90210","state":"CA"},"email":"[REDACTED]","nameFirst":"Tech","nameLast":"Contact","phone":"555-555-5555"},"privacy":true,"autoRenew":false,"consent":{"agreementKeys":["DNRA","DNPA"],"agreedBy":"[REDACTED]","agreedAt":"2020-03-09T09:38:05.093444Z"},"dnsType":"AzureDNS","dnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestrg-domain-200309085601550068/providers/Microsoft.Network/dnszones/[REDACTED]"},"tags":{}}

Response:

:status: 500
cache-control: private
content-length: 3420
content-type: text/html; charset=utf-8
x-ms-failure-cause: service
server: Microsoft-IIS/10.0
x-aspnet-version: 4.0.30319
x-powered-by: ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1197
x-ms-request-id: fd8d0b22-1bae-40be-aca7-3c4d9d374dee
x-ms-correlation-request-id: 720bf502-d109-660e-4fd0-93b602bf5108
x-ms-routing-request-id: UKWEST:20200309T094055Z:fd8d0b22-1bae-40be-aca7-3c4d9d374dee
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
date: Mon, 09 Mar 2020 09:40:54 GMT

<!DOCTYPE html>
<html>
    <head>
        <title>Runtime Error</title>
        <meta name="viewport" content="width=device-width" />
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
         @media screen and (max-width: 639px) {
          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
         }
         @media screen and (max-width: 479px) {
          pre { width: 280px; }
         }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>Runtime Error</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
            <br><br>

            <b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a &lt;customErrors&gt; tag within a &quot;web.config&quot; configuration file located in the root directory of the current web application. This &lt;customErrors&gt; tag should then have its &quot;mode&quot; attribute set to &quot;Off&quot;.<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;customErrors mode=&quot;Off&quot;/&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the &quot;defaultRedirect&quot; attribute of the application&#39;s &lt;customErrors&gt; configuration tag to point to a custom error page URL.<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

                  </td>
               </tr>
            </table>

            <br>

    </body>
</html>

There isn't much supporting documentation I can find on this API and it's usage, but I believe I have satisfied the requirements for the request correctly. A DNS zone is created in Azure DNS (and is resolvable for SOA and NS) at the point the request above is made.

akning-ms commented 4 years ago

@jackofallops Can I know which RP is this issue for? it is new RP? it is domainservices?

jackofallops commented 4 years ago

Hi @akning-ms - It's a new TF resource for App Service Domain Registrations.

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.

nevaistic commented 3 years ago

Can we have an update on this? I keep trying with different approaches but all return the same.

Thank you!