Comments (7)
Looks to me like this could potentially be an issue with azure-cli or how cs-suite interfaces with azure-cli?
Azure Cloud shell fails to identify server. Throws error : Can not perform requested operation on nested resource. Parent resource not found
Fix:
The failure was because I have multiple subscriptions on Azure and my default subscription did not have the sql-server. I changed the subscription by using az account set --subscription and now the command to get firewall works
from cs-suite.
I discovered it was an issue with one of the DBs in my setup. I can run:
az sql db audit-policy show --resource-group REDACTED_RG --server REDACTED_SERVER_NAME --name REDACTED_DB_2 --query 'state' --output tsv
And it works. However when I run:
az sql db audit-policy show --resource-group REDACTED_RG --server REDACTED_SERVER_NAME --name REDACTED_DB_1 --query 'state' --output tsv
I get the error: Can not perform requested operation on nested resource. Parent resource 'REDACTED_SERVER_NAME/REQUESTED_DB_1' not found.
I have tested that I can see the DB with the command:
az sql db list --server REDACTED_SERVER_NAME --resource-group REDACTED_RG --query "[*].name" --output tsv
and I see the DB that is giving me trouble.
Does your team have a recommendation for working through this? I am assuming this issue is being caused because something from a different resource or subscription created the DB I am having issues with. I will attempt to confirm this theory
from cs-suite.
When looking at this server through the webui, the DB I am having issues with does not show up on the SQL server. Is it possible to just add some error handling and skip over this? The api and the webui are showing a different number of DBs
from cs-suite.
https://i.imgur.com/WdmEwo9.png
https://i.imgur.com/tPsK8Pf.png
from cs-suite.
yes @Electronickss
I think you're right, the azure-cli sometimes does not show the right output
and that's possibly the case, due to which it fails
I had commented on a issue on azure-cli on a different case, regarding the output it throws
Azure/azure-cli#5243
We will add error handling into this, but it might take us some time
thanks for raising this issue
and if you have further suggestions regarding the Azure checks, if we have missed any, please let us know, it'll be really helpful.
from cs-suite.
So I need this to work as soon as possible so I am looking at implementing error handling myself. As an example:
try:
email_policy = subprocess.check_output(['az sql db threat-policy show --resource-group %s --server %s --name %s --query \'emailAccountAdmins\' --output tsv' %(resource_group, name, database)], shell=True).strip()
except subprocess.CalledProcessError as e:
continue
I can fork/pr this if you like the solution
from cs-suite.
sure
can you just submit a PR, that will be great, I will verify once as well, it shouldn't break anything though.
from cs-suite.
Related Issues (20)
- Azure audit fails when Checking if expiry is enabled for vault secret HOT 2
- Check numbers null in AWS assessment result
- 2.x checking issue HOT 2
- UnboundLocalError: local variable 'j_res' referenced before assignment
- [Azure] Err in module "6.1: Checking if any network group allows public access to RDP"
- I want to contribute HOT 1
- Add support to AWS profiles
- Output results as XML
- modules not outputting to json HOT 2
- Python 2 -> 3 upgrade HOT 2
- How to run this in AWS Lambda?
- How can I run this without subscriptions? HOT 1
- Invalid format timestamp HOT 9
- AWS S3 bucket: region eu-west-3 outside of scope
- Azure's vm_agent() function has poorly written if-else blocks resulting in KeyError
- Curl: option -: is unknown HOT 2
- Possible Broken Dashboard HOT 7
- Update Scout2 HOT 1
- Can't find expired certificates listed in the report
- Unable to install CS-Suite with Pyton3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs-suite.