pulumi / pulumi-azure-native

Azure Native Provider
Apache License 2.0
129 stars 35 forks source link

Multiple Azure-Native resources are missing examples in all languages #816

Open tusharshahrs opened 3 years ago

tusharshahrs commented 3 years ago

Problem description

Azure Native has multiple resources that are missing examples in ALL the languages.

Blob WebApp WebAppSlot WebAppFunction WorkspaceCollection Job AttestationProvider

Contrast this with SecurityRules which HAS examples in ALL languages.

Suggestions for a fix

Have examples generated for the missing ones.

mikhailshilkov commented 3 years ago

Hey @tusharshahrs

We get examples from the Azure Open API specs repo and convert them to Pulumi examples. Usually, a missing example in our docs means there is no example in the source repo. For example, I don't see any examples for WebApp here: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/web/resource-manager/Microsoft.Web/stable/2020-12-01/examples

Do you suggest us starting creating additional examples manually? Or maybe you know another source?

tusharshahrs commented 3 years ago

We can close this issue as we depend on Azure Open API specs and the examples don't exist there yet.

leezen commented 3 years ago

I think we should leave this issue open? At the end of the day, this impacts our end user experience. For example, could we open up issues upstream to suggest they include examples for proper usage of those underlying APIs? I could also imagine something along the lines of tracking each resource that's missing examples to see if community members feel like we need examples for those resources or hand-implementing the examples ourselves after some time if the upstream repo never includes them? @mikhailshilkov what do you think?

mikhailshilkov commented 3 years ago

could we open up issues upstream to suggest they include examples for proper usage of those underlying APIs?

We should chat with Azure folks about this. We can open the issues, of course, but I'd love to understand if they have any policies for this.

tracking each resource that's missing examples

We can generate this list from the schema. I'm not yet sure how to use it.

hand-implementing the examples ourselves

This would be fairly low on the impact/effort scale for us. I think we should rather search for more sources of examples. ARM Templates? Somehow get the grip of successful requests that our users are making (with some sort of consent)?

pierskarsenbarg commented 3 years ago

So I've gone through all the modules now and got a more concise list of resources without examples:

Module Resource URL
attestation AttestationProvider https://www.pulumi.com/registry/packages/azure-native/api-docs/attestation/attestationprovider
certificateregistration AppServiceCertificateOrder https://www.pulumi.com/registry/packages/azure-native/api-docs/certificateregistration/appservicecertificateorder
certificateregistration AppServiceCertificateOrderCertificate https://www.pulumi.com/registry/packages/azure-native/api-docs/certificateregistration/appservicecertificateordercertificate
compute VirtualMachineExtension https://www.pulumi.com/registry/packages/azure-native/api-docs/compute/virtualmachineextension
compute VirtualMachineScaleSetExtension https://www.pulumi.com/registry/packages/azure-native/api-docs/compute/virtualmachinescalesetextension
compute VirtualMachineScaleSetVM https://www.pulumi.com/registry/packages/azure-native/api-docs/compute/virtualmachinescalesetvm
costmanagement Report https://www.pulumi.com/registry/packages/azure-native/api-docs/costmanagement/report
costmanagement ReportByBillingAccount https://www.pulumi.com/registry/packages/azure-native/api-docs/costmanagement/reportbybillingaccount
costmanagement ReportByDepartment https://www.pulumi.com/registry/packages/azure-native/api-docs/costmanagement/reportbydepartment
costmanagement ReportByResourceGroupName https://www.pulumi.com/registry/packages/azure-native/api-docs/costmanagement/reportbyresourcegroupname
datafactory Pipeline https://www.pulumi.com/registry/packages/azure-native/api-docs/datafactory/pipeline
domainregistration Domain https://www.pulumi.com/registry/packages/azure-native/api-docs/domainregistration/domain
domainregistration DomainOwnershipIdentifier https://www.pulumi.com/registry/packages/azure-native/api-docs/domainregistration/domainownershipidentifier
intune AndroidMAMPolicyByName https://www.pulumi.com/registry/packages/azure-native/api-docs/intune/androidmampolicybyname
intune IoMAMPolicyByName https://www.pulumi.com/registry/packages/azure-native/api-docs/intune/iomampolicybyname
labservices Environment https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/environment
labservices EnvironmentSetting https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/environmentsetting
labservices GalleryImage https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/galleryimage
labservices Lab https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/lab
labservices LabAccount https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/labaccount
labservices LabPlan https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/labplan
labservices Schedule https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/schedule
labservices User https://www.pulumi.com/registry/packages/azure-native/api-docs/labservices/user
logic WorkflowAccessKey https://www.pulumi.com/registry/packages/azure-native/api-docs/logic/workflowaccesskey
machinelearning CommitmentPlan https://www.pulumi.com/registry/packages/azure-native/api-docs/machinelearning/commitmentplan
powerbi WorkspaceCollection https://www.pulumi.com/registry/packages/azure-native/api-docs/powerbi/workspacecollection
resources Resource https://www.pulumi.com/registry/packages/azure-native/api-docs/resources/resource
scheduler Job https://www.pulumi.com/registry/packages/azure-native/api-docs/scheduler/job
scheduler JobCollection https://www.pulumi.com/registry/packages/azure-native/api-docs/scheduler/jobcollection
solutions JitRequest https://www.pulumi.com/registry/packages/azure-native/api-docs/solutions/jitrequest
storage Blob https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/blob
storage StorageAccountStaticWebsite https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/storageaccountstaticwebsite
web AppServiceEnvironment https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceenvironment
web AppServiceEnvironmentPrivateEndpointConnection https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceenvironmentprivateendpointconnection
web AppServicePlanRouteForVnet https://www.pulumi.com/registry/packages/azure-native/api-docs/web/appserviceplanrouteforvnet
web ContainerApp https://www.pulumi.com/registry/packages/azure-native/api-docs/web/containerapp
web WebApp https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapp
web WebAppApplicationSettings https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappapplicationsettings
web WebAppApplicationSettingsSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappapplicationsettingsslot
web WebAppAuthSettings https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappauthsettings
web WebAppAuthSettingsSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappauthsettingsslot
web WebAppAuthSettingsV2 https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappauthsettingsv2
web WebAppAuthSettingsV2Slot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappauthsettingsv2slot
web WebAppAzureStorageAccounts https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappazurestorageaccounts
web WebAppAzureStorageAccountsSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappazurestorageaccountsslot
web WebAppBackupConfiguration https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappbackupconfiguration
web WebAppBackupConfigurationSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappbackupconfigurationslot
web WebAppConnectionStrings https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappconnectionstrings
web WebAppConnectionStringsSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappconnectionstringsslot
web WebAppDeployment https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappdeployment
web WebAppDeploymentSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappdeploymentslot
web WebAppDiagnosticLogsConfiguration https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappdiagnosticlogsconfiguration
web WebAppDomainOwnershipIdentifier https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappdomainownershipidentifier
web WebAppDomainOwnershipIdentifierSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappdomainownershipidentifierslot
web WebAppFunction https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappfunction
web WebAppHostNameBinding https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapphostnamebinding
web WebAppHostNameBindingSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapphostnamebindingslot
web WebAppHybridConnection https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapphybridconnection
web WebAppHybridConnectionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapphybridconnectionslot
web WebAppInstanceFunctionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappinstancefunctionslot
web WebAppMetadata https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappmetadata
web WebAppMetadataSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappmetadataslot
web WebAppPremierAddOn https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapppremieraddon
web WebAppPremierAddOnSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapppremieraddonslot
web WebAppPublicCertificate https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapppubliccertificate
web WebAppPublicCertificateSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapppubliccertificateslot
web WebAppRelayServiceConnection https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapprelayserviceconnection
web WebAppRelayServiceConnectionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webapprelayserviceconnectionslot
web WebAppSiteExtension https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsiteextension
web WebAppSiteExtensionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsiteextensionslot
web WebAppSitePushSettings https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsitepushsettings
web WebAppSitePushSettingsSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsitepushsettingsslot
web WebAppSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappslot
web WebAppSlotConfigurationNames https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappslotconfigurationnames
web WebAppSourceControl https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsourcecontrol
web WebAppSourceControlSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappsourcecontrolslot
web WebAppSwiftVirtualNetworkConnection https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappswiftvirtualnetworkconnection
web WebAppSwiftVirtualNetworkConnectionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappswiftvirtualnetworkconnectionslot
web WebAppVnetConnection https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappvnetconnection
web WebAppVnetConnectionSlot https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappvnetconnectionslot

Let me know if you want this in another format or the spreadsheet I've got this in

mikhailshilkov commented 3 years ago

Thank you for this work @pierskarsenbarg

It looks like web is the most problematic and highly used module. Also, we are missing examples for our own mixin resources in storage.