Azure / apim-landing-zone-accelerator

The Azure API Management landing zone accelerator provides an architectural approach and reference implementation to prepare landing zone subscriptions for a secure API Management infrastructure.
https://aka.ms/apim-lza
MIT License
150 stars 153 forks source link

bicep deploy cleanup. #96

Closed skyaddict closed 8 months ago

skyaddict commented 8 months ago

When deploying the APIM accelerator to an Azure subscription for evaluation, I ran into several issues that I am attempting to resolve here.

  1. VM Sku was unavailable and no parameter in main.bicep allowed for selecting a different one
  2. My Azure subscription has Microsoft-recommended policies requiring tags at the resource group level
  3. Using the example deployment command resulted in name collisions for storage accounts and web apps
  4. Azure Function was deployed as Framework 3 which is deprecated
  5. APIM is deployed using STV1 which is also slated for depreciation
  6. Linter warnings about not using parent parameters on some resources
  7. Linter warning about resource name not having a minimum number of chars

This PR resolves the above with the below

  1. Add a VM Sku parameter to the main.bicep file and set the default to match the createvmwindows.bicep file
  2. Add a resourceGroupTags parameter with a default of empty array this will allow others to provide tags at deployment time
  3. Added a unique string to some parameter names to ensure naming collisions won't happen
  4. Updated the Azure function resource to use ~4 framework
  5. Added parameter publicIpAddressId to apim.bicep passing the public IP for apim and allowing stv2 to be provisioned
  6. switched to using child resources
  7. cleaned up the warning by changing the order of some functions in the storage account name variable declaration
skyaddict commented 8 months ago

@microsoft-github-policy-service agree company="RD OFFUTT COMPANY"

briggsb9 commented 8 months ago

Thank you @skyaddict for your contribution here.

aarthiem commented 8 months ago

Thank you @skyaddict and @briggsb9 for the PR!!