Question 410
A Bicep file hardcodes a storage name and conflicts across environments. Which administrative action most directly meets the requirement?
Explanation
Correct Answer
Azure Storage account names must be globally unique and obey naming rules. A Bicep prefix parameter lets each deployment supply its environment value, while uniqueString on stable scope inputs creates a reproducible suffix; hardcoding one account name would collide across deployments.
Incorrect Answers
A shared tags object centralizes resource labels but cannot substitute for the deployment logic, type constraint or scoped reference this case needs.
A Bicep `@allowed` decorator or string-literal union constrains what values a parameter may accept. It doesn't stop a storage account's globally unique name from colliding across deployments. Make the account name depend on appropriate deployment-specific values and check the storage naming rules; restricting unrelated environment labels does not create uniqueness.
A resource loop generates multiple declarations; it does not by itself establish the parameter, conditional or scoped behavior required here.