Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Ip; zones are removed on AzOpsPull command #701

Closed
woutermation opened this issue Nov 10, 2022 · 2 comments · Fixed by #748
Closed

Public Ip; zones are removed on AzOpsPull command #701

woutermation opened this issue Nov 10, 2022 · 2 comments · Fixed by #748
Labels
area/powershell bug Something isn't working resource-provider issue with resource schema for pulled resources

Comments

@woutermation
Copy link

Describe the bug

During an AzOpsPull cmd the Public IP settings for Zones are removed.

  ~ Microsoft.Network/publicIPAddresses/zone-1-pip [2022-07-01]
    - zones: [
        0: "1"
      ]

Push will then fail with the following ARM error as the Zone settings are no long present in the json:

New-AzResourceGroupDeployment: 13:48:12 - The deployment
'AzOps-microsoft.network_publicipaddresses-zone-1-pip-16FA' failed with
error(s). Showing 1 out of 1 error(s). Status Message: Resource
/subscriptions/XXXXXX/resourceGroups/zdk-we-p-rg-a
dds-2/providers/Microsoft.Network/publicIPAddresses/zone-1-pip has an existing
availability zone constraint 1 and the request has availability zone constraint
NoZone, which do not match. Zones cannot be added/updated/removed once the
resource is created. The resource cannot be updated from regional to zonal or
vice-versa. (Code: ResourceAvailabilityZonesCannotBeModified)   CorrelationId:
XXXXXXX

When re-adding the zone settings to the json a validate and push are working correctly, actions taken:

  1. Create new branch
  2. Re-apply zone settings in the pip json
  3. Create PR
  4. Validate will run successful
  5. Merge
  6. Push will run successful

Steps to reproduce

  1. Create a public ip or use an existing
  2. Start AzOpsPull

Screenshots

image

@daltondhcp daltondhcp added bug Something isn't working area/powershell labels Nov 10, 2022
@daltondhcp
Copy link
Contributor

Thank you for raising this!
This unfortunately a known limitation of the resources API we take a dependency on to export the resources.
We are looking for ways to solve this (and also improve overall pull performance), but currently no workarounds other than deploying these resources with custom templates.

@buysoft
Copy link

buysoft commented Nov 11, 2022

@daltondhcp, Thanks for answering this issue. Good to know, we will keep this in mind untill a solution is found.

@daltondhcp daltondhcp added the resource-provider issue with resource schema for pulled resources label Jan 18, 2023
@daltondhcp daltondhcp mentioned this issue Feb 17, 2023
5 tasks
@daltondhcp daltondhcp linked a pull request Feb 17, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/powershell bug Something isn't working resource-provider issue with resource schema for pulled resources
Projects
None yet
3 participants