You are writing a Bicep file to deploy an Azure SQL Database. You need to ensure that the administrator password provided during deployment is not exposed in deployment logs or output files. Which Bicep decorator should you use on the parameter?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: @secure()

The @secure() decorator in Bicep (and ARM templates) tells the Azure Resource Manager deployment engine that the parameter value contains sensitive data. ARM will prevent the value...

๐Ÿ“‹Part of Microsoft Certified: DevOps Engineer Expert (AZ-400) ยท Azure Certification Practice
Real Exam ScenarioInfrastructure as Code

You are writing a Bicep file to deploy an Azure SQL Database. You need to ensure that the administrator password provided during deployment is not exposed in deployment logs or output files. Which Bicep decorator should you use on the parameter?

โœ“ Correct Answer & ExplanationInfrastructure as Code

Correct Answer

@secure()

Why This Answer Is Correct

The @secure() decorator in Bicep (and ARM templates) tells the Azure Resource Manager deployment engine that the parameter value contains sensitive data. ARM will prevent the value from being logged in the deployment history, printed to the console, or exposed in the portal.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Infrastructure as Code โ€” a core concept tested in Microsoft Certified: DevOps Engineer Expert (AZ-400). Understanding Infrastructure as Code is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.