Azure / azure-libraries-for-java

Azure Management Libraries for Java
https://docs.microsoft.com/en-us/java/azure/
MIT License
94 stars 98 forks source link

[FEATURE REQ] Create domain with default dns zone #1203

Closed ChenTanyi closed 4 years ago

ChenTanyi commented 4 years ago

App service will no longer create dns zone with domain in default. We need to fix it in domain creation (default or existing).

ChenTanyi commented 4 years ago

Current workaround: https://github.com/Azure/azure-sdk-for-java/pull/11813

            DnsZone dnsZone = azure.dnsZones().define(domainName)
                .withExistingResourceGroup(rgName)
                .create();

            AppServiceDomain domain = azure.appServiceDomains().define(domainName)
                    .withExistingResourceGroup(rgName)
                    ...
                    .create();

            domain.inner().withDnsZoneId(dnsZone.id());
            domain.update().apply();