yes. what I want to achieve is a control so that if some one remove infra code then at least a test will fail and say. Whooops... Was this change intentional? if yes, remove the test too.
So what I'm testing atm is just the input for the different resources.
ex one test that check that application Insights is set and the input is correct.
But I'm also using the IaC code as a smarter Automation so I actually get secret values from one keyvault and put it to the one for the service. And in this case I need to call the secretclient from Microsoft so get the value from one secret store to set the config with IaC in the other.
In this case there is a bit tricky to mock this client, I haven't found a way to mock dependencies. So in that case the test become an hybird of unit test and integration test, and that I do not like. I need to run the stack mock the calls to even check the if the resources was set. And when run the stack this is when SecretClient also gets called.