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

Parent resource name missing in the name property of exported resources #738

Open
Poekiee12 opened this issue Jan 13, 2023 · 4 comments
Open
Labels
bug Something isn't working resource-provider issue with resource schema for pulled resources

Comments

@Poekiee12
Copy link

Poekiee12 commented Jan 13, 2023

Describe the bug
When exporting a resource through AzOps, the template validation fails because the name of the parent resource is not included in the name property.

This bug applies to the following types:

"type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks",
"type": "Microsoft.Sql/servers/databases",
"type": "Microsoft.Cdn/profiles/endpoints",
"type": "Microsoft.Network/dnsResolvers/inboundEndpoints",

Wrong JSON

"type": "Microsoft.Sql/servers/databases",
"name": "databasename",

Correct JSON

"type": "Microsoft.Sql/servers/databases",
"name": "sqlservername/databasename",

Steps to reproduce

  1. Pull Azure environment with AzOps
  2. Validate pulled resource templates
  3. Error appears in the name property of the JSON file

Screenshots
image
image

@Poekiee12 Poekiee12 changed the title SQL database json file misses the sql server before the database name Parent resource name missing in the name property of exported resources Jan 13, 2023
@Poekiee12
Copy link
Author

Added multiple resource types we're facing issues with.

@daltondhcp
Copy link
Contributor

Thank you for reporting this!
We are striving to support all resource providers in pull, but also rely on that the RPs return all the correct schema.
We are currently working on improving this to enable higher quality, but for now, it is best effort.

Out of curiosity, in this particular case, do you always run a validate after pull, or is this after changing the resource through a PR?

@daltondhcp daltondhcp added bug Something isn't working resource-provider issue with resource schema for pulled resources and removed triage labels Jan 18, 2023
@Poekiee12
Copy link
Author

We always run a validate after a pull! This particular case was a first pull of an environment at which the validate fails. We are currently excluding the resource types to make sure it works.

@Gizzaaa
Copy link

Gizzaaa commented Feb 6, 2023

I got the same with 'Microsoft.Sql/managedInstances/databases'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-provider issue with resource schema for pulled resources
Projects
None yet
Development

No branches or pull requests

3 participants