AZ-900 Microsoft Azure Fundamentals Exam
Start here! Get your feet wet with the Microsoft cloud and begin your journey to earning your Microsoft Certified: Azure Fundamentals certification!
Practice Test

Practice Test

Describe infrastructure as code (IaC)
Evaluate Security and Compliance in IaC
Infrastructure as Code (IaC) is a way to manage and set up your infrastructure using machine-readable files, instead of doing it manually. This approach has many advantages, but it also brings new security concerns. When thinking about security and compliance in IaC, it's important to know how to protect your infrastructure code and make sure it follows the rules set by your organization and any legal requirements.
Using IaC can create security risks if you're not careful. Code repositories that hold IaC templates can be targets for hackers. If these repositories aren't secure, attackers could get access to sensitive information, like passwords or configurations, and potentially harm your entire infrastructure. It's important to use access controls and encryption to protect these repositories.
There are several best practices to help secure your IaC. First, use version control for all your IaC templates. This lets you track changes, go back to previous versions if needed, and check who made what changes. Second, use tools to manage secrets so you don't have to put sensitive information directly into your code. Third, regularly scan your IaC templates for weaknesses and misconfigurations using automated tools.
IaC can also help you follow organizational and legal standards. By defining your infrastructure in code, you can make sure that everyone uses the same policies across your environment. This reduces the chance of human error and ensures that all resources are set up according to the rules. Also, IaC makes it easier to check your infrastructure, since all changes are tracked in the version control system.
Azure provides several tools to help secure your IaC. Azure Policy lets you set and enforce organizational standards and compliance rules. Azure Key Vault helps you manage secrets and encryption keys securely. Azure Security Center gives you advice on how to secure your infrastructure and find potential threats. By using these tools, you can improve the security and compliance of your IaC deployments.
Examine Azure Resource Manager (ARM) Templates
Azure Resource Manager (ARM) Templates are a key part of Infrastructure as Code (IaC) in Azure. They allow you to define and deploy your Azure infrastructure using a declarative method. Instead of manually creating resources through the Azure portal, you describe how you want your infrastructure to look in a JSON file, and ARM takes care of setting it up. This makes sure your deployments are consistent and repeatable.
ARM templates use a specific structure to define resources, parameters, and variables. The template includes sections for parameters, variables, resources, and outputs. Parameters let you customize deployments, while variables store values used throughout the template. The resources section is where you define the Azure resources you want to deploy, such as virtual machines, storage accounts, and networks.
Using ARM templates has several benefits. First, it enables automation, allowing you to deploy infrastructure quickly and consistently. Second, it ensures consistency by deploying the same configuration every time, reducing the risk of errors. Third, it promotes scalability by allowing you to easily replicate your infrastructure as needed. Finally, ARM templates can be stored in source control, enabling versioning and collaboration.
ARM templates can be deployed using various tools, including the Azure portal, Azure CLI, and PowerShell. When you deploy a template, ARM checks the template and then sets up the resources in the correct order. This process makes sure that all requirements are met and that the infrastructure is deployed correctly. ARM templates are a powerful tool for managing and deploying Azure resources in a consistent and repeatable way.
Understand the Concept of Infrastructure as Code (IaC)
Infrastructure as Code (IaC) is a key practice in modern cloud management, where you treat your infrastructure like software. Instead of manually setting up servers, networks, and other resources, you define them using code. This lets you automate the deployment and management of your infrastructure, ensuring consistency and repeatability. IaC is essential for achieving efficiency, scalability, and reliability in cloud environments.
One of the main benefits of IaC is automation. By using code to define your infrastructure, you can automate the entire deployment process. This reduces the chance of human error and speeds up the time it takes to set up or change your environment. Automation also lets you easily copy your infrastructure across different environments, like development, testing, and production, ensuring consistency.
IaC promotes consistency by making sure your infrastructure is always deployed the same way. This is because the code defines how your infrastructure should look, and any changes are made by changing the code. This prevents configuration drift, where manual changes can cause inconsistencies. Repeatability is another key benefit, as you can easily recreate your infrastructure from the code, which is important for disaster recovery and scaling.
With IaC, your infrastructure code can be stored in a version control system, like Git. This lets you track changes, go back to previous versions, and work with other team members. Version control provides a clear history of all changes, making it easier to fix problems and understand how your infrastructure has changed over time. This also allows teams to work together on infrastructure changes, improving collaboration and reducing the risk of conflicts.
Azure provides several tools and services that support IaC, such as Azure Resource Manager (ARM) templates and Bicep. These tools let you define your infrastructure using declarative code, which specifies how your resources should look. Azure also works with popular IaC tools like Terraform, allowing you to manage your Azure resources in different ways. By using these tools, you can effectively implement IaC in your Azure environment.
In summary, Infrastructure as Code is a critical practice for managing cloud resources effectively. It provides automation, consistency, repeatability, and version control, which are essential for modern cloud deployments. By using IaC tools and services, you can streamline your infrastructure management, reduce errors, and improve the overall reliability of your cloud environment.
Implement IaC with Azure DevOps
Infrastructure as Code (IaC) is a key practice for managing and setting up infrastructure using code, instead of manual steps. This approach allows for automation, consistency, and scalability in cloud resource management. Azure DevOps is very important in implementing IaC by providing tools and services that support the entire process of infrastructure deployment.
Azure DevOps works with IaC practices by allowing the use of pipelines for continuous integration and continuous deployment (CI/CD). These pipelines automate the process of building, testing, and deploying infrastructure changes. By using version control systems, like Git, infrastructure code can be managed, tracked, and worked on together, making sure that changes are controlled and can be checked.
CI/CD pipelines in Azure DevOps automate the deployment of infrastructure changes. When code is added to a repository, the pipeline can automatically start a build process, which checks the code and gets it ready for deployment. The deployment process then sets up or updates the infrastructure based on the code, making sure that the environment is always how it should be. This automation reduces the chance of human error and speeds up the deployment process.
Version control systems are essential for managing infrastructure code. They allow teams to track changes, go back to previous versions, and work together effectively. By storing infrastructure code in a repository, teams can make sure that all changes are documented and can be checked. This also allows teams to work on different parts of the infrastructure at the same time without conflicts.
Implementing IaC with Azure DevOps offers several benefits:
- Automation: Automates the deployment process, reducing manual work and the chance of errors.
- Consistency: Makes sure that infrastructure is deployed consistently across different environments.
- Scalability: Allows for easy scaling of infrastructure to meet changing needs.
- Collaboration: Enables teams to work together effectively on infrastructure changes.
- Version Control: Provides a history of changes, making it easier to track and go back to previous versions.
In summary, Azure DevOps provides a strong platform for implementing IaC, allowing teams to manage their infrastructure more efficiently and effectively. By using pipelines for CI/CD and version control systems, organizations can achieve greater automation, consistency, and scalability in their cloud resource management.
Utilize Azure Bicep for IaC
Azure Bicep is a domain-specific language (DSL) used for deploying Azure resources. It's designed to make it easier to create and manage infrastructure as code (IaC). Bicep offers a more user-friendly way of writing code compared to traditional ARM templates, making it easier to write, read, and maintain your infrastructure definitions.
Bicep is built on top of Azure Resource Manager (ARM) templates. This means that while you write your infrastructure definitions in Bicep, it's eventually converted into ARM templates for deployment. This lets you use the power of ARM while enjoying a simpler way of writing code. Bicep aims to reduce the complexity of ARM templates, making IaC easier for more people to use.
Key benefits of using Bicep include:
- Simplified Syntax: Bicep's syntax is cleaner and more concise than ARM templates, making it easier to learn.
- Modularity: Bicep lets you create reusable modules, promoting consistency and reducing code duplication.
- Type Safety: Bicep provides type checking, which helps catch errors early in the development process.
- Integration: Bicep works well with Azure DevOps and other CI/CD tools, enabling automated deployments.
Compared to ARM templates, Bicep offers a more intuitive and less complicated way to define your infrastructure. While ARM templates use JSON, which can be complex and hard to manage, Bicep uses a more declarative syntax that is easier to understand and maintain. This makes Bicep a preferred choice for many when implementing IaC in Azure.
In summary, Azure Bicep is a powerful tool for implementing IaC in Azure. It simplifies the process of defining and deploying resources, making it easier to manage your cloud infrastructure. By using Bicep, you can achieve greater consistency, reduce errors, and improve the overall efficiency of your cloud deployments.
Conclusion
In summary, the "Describe infrastructure as code (IaC)" section of the AZ-900 exam covers the essential concepts and tools for managing cloud infrastructure through code. We explored how IaC enhances security and compliance, the role of Azure Resource Manager (ARM) templates in defining infrastructure, and the fundamental principles of IaC for automation and consistency. We also examined how Azure DevOps integrates with IaC practices for continuous integration and deployment, and how Azure Bicep simplifies the authoring experience for IaC. Understanding these concepts is crucial for effectively managing and deploying resources in Azure, ensuring efficiency, scalability, and reliability.