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

suggestion: Get resource existence #13406

Closed
WithHolm opened this issue Feb 22, 2024 · 1 comment
Closed

suggestion: Get resource existence #13406

WithHolm opened this issue Feb 22, 2024 · 1 comment
Labels
enhancement New feature or request Needs: Triage 🔍

Comments

@WithHolm
Copy link

Is your feature request related to a problem? Please describe.
There are some times you want to just check if a resource exists before going ahead and modifying your current environment, a good example here would be to try to deploy a sql server with Entra/AAD admin only enabled.
When Entra/AAD admin only is enabled, you cannot set password when deploying a server that already exists.
It would result in a error like:

Conflict: Azure Active Directory Only Authentication is enabled. Please contact your system administrator. (Code:AadOnlyAuthenticationIsEnabled)

Describe the solution you'd like
I'm thinking that this would be handled in the same way that parameters are handled currently:

resource myresource 'resource/path@version' existing? {
 name: myresourcename
}

this way you could expect either a null value or a actual resource. later on you could choose to either deploy or not deploy specific settings depending on of the presence of current resources.

At this time, the only real option to do this is with deployscript, but if you have network policies enabled (like brownfield) this gets very complex, very fast for essenitally "is it there? ok les do this other thing instead". Concidering this operation is already a part of the arm api , i would assume this would be somewhat easy to implement and would not require any additional api changes within the exising ARM system.

@WithHolm WithHolm added the enhancement New feature or request label Feb 22, 2024
@github-project-automation github-project-automation bot moved this to Todo in Bicep Feb 22, 2024
@StephenWeatherford StephenWeatherford changed the title suggestion: Get resource existance suggestion: Get resource existence Feb 22, 2024
@stephaniezyen
Copy link
Contributor

Closing as duplicate of #4023

@github-project-automation github-project-automation bot moved this from Todo to Done in Bicep Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs: Triage 🔍
Projects
Archived in project
Development

No branches or pull requests

2 participants