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

Staging #109

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions docs/content/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,3 @@ geekdocAnchor: true

This section lists important concepts Azure Bicep Language on.

Azure Bicep streamlines the deployment of Azure resources through its declarative syntax, which outlines the desired state of resources without specifying the step-by-step process to achieve it. Here's a breakdown of its main concepts with samples:

1. **Declarative Syntax**: Bicep simplifies Azure resource deployment with its clear and concise syntax. For example:

```bicep
resource myStorageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: 'mystorageaccount'
location: 'eastus'
sku: {
name: 'Standard_LRS'
}
}
```

2. **Resource Declaration**: Resources are defined using resource blocks, specifying type, name, and properties. Here's a sample:

```bicep
resource myAppService 'Microsoft.Web/sites@2021-01-01' = {
name: 'myappservice'
location: 'westus'
properties: {
serverFarmId: myAppServicePlan.id
}
}
```

3. **Expressions**: Bicep supports expressions for dynamic value generation. For example:

```bicep
var storageAccountName = 'mystorageaccount'
resource myStorageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: storageAccountName
// other properties
}
```

4. **Parameters and Variables**: Parameters allow runtime customization, while variables enable value reuse. Example:

```bicep
param location string = 'westus'
var resourceGroupName = 'myResourceGroup'
```

5. **Modules**: Modularization is achieved through modules, promoting code reuse. Sample usage:

```bicep
module mySubnet 'subnets.bicep' = {
name: 'subnetModule'
params: {
subnetName: 'mySubnet'
addressPrefix: '10.0.0.0/24'
}
}
```

6. **Output Declaration**: Outputs expose important values post-deployment. Example:

```bicep
output storageAccountConnectionString string = myStorageAccount.properties.primaryEndpoints.blob
```

7. **Conditions and Loops**: Bicep supports conditional logic and loops for dynamic deployments. Sample usage:

```bicep
for i in range(5) {
resource myVMs[i] 'Microsoft.Compute/virtualMachines@2021-04-01' = {
name: 'myVM-${i}'
// other properties
}
}
```

In summary, Azure Bicep offers a straightforward approach to deploying Azure resources through its intuitive syntax, expressions, parameters, modules, outputs, and support for conditions and loops, enhancing the manageability and scalability of infrastructure deployments.
83 changes: 83 additions & 0 deletions docs/content/concepts/fundamentals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: What, Why, How
geekdocNav: true
geekdocAlign: left
geekdocAnchor: true
---

{{< toc >}}


Azure Bicep streamlines the deployment of Azure resources through its declarative syntax, which outlines the desired state of resources without specifying the step-by-step process to achieve it. Here's a breakdown of its main concepts with samples:

1. **Declarative Syntax**: Bicep simplifies Azure resource deployment with its clear and concise syntax. For example:

```bicep
resource myStorageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: 'mystorageaccount'
location: 'eastus'
sku: {
name: 'Standard_LRS'
}
}
```

2. **Resource Declaration**: Resources are defined using resource blocks, specifying type, name, and properties. Here's a sample:

```bicep
resource myAppService 'Microsoft.Web/sites@2021-01-01' = {
name: 'myappservice'
location: 'westus'
properties: {
serverFarmId: myAppServicePlan.id
}
}
```

3. **Expressions**: Bicep supports expressions for dynamic value generation. For example:

```bicep
var storageAccountName = 'mystorageaccount'
resource myStorageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: storageAccountName
// other properties
}
```

4. **Parameters and Variables**: Parameters allow runtime customization, while variables enable value reuse. Example:

```bicep
param location string = 'westus'
var resourceGroupName = 'myResourceGroup'
```

5. **Modules**: Modularization is achieved through modules, promoting code reuse. Sample usage:

```bicep
module mySubnet 'subnets.bicep' = {
name: 'subnetModule'
params: {
subnetName: 'mySubnet'
addressPrefix: '10.0.0.0/24'
}
}
```

6. **Output Declaration**: Outputs expose important values post-deployment. Example:

```bicep
output storageAccountConnectionString string = myStorageAccount.properties.primaryEndpoints.blob
```

7. **Conditions and Loops**: Bicep supports conditional logic and loops for dynamic deployments. Sample usage:

```bicep
for i in range(5) {
resource myVMs[i] 'Microsoft.Compute/virtualMachines@2021-04-01' = {
name: 'myVM-${i}'
// other properties
}
}
```

In summary, Azure Bicep offers a straightforward approach to deploying Azure resources through its intuitive syntax, expressions, parameters, modules, outputs, and support for conditions and loops, enhancing the manageability and scalability of infrastructure deployments.
4 changes: 2 additions & 2 deletions docs/data/menu/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ main:
- name: "Home"
ref: "/"
- name: "Application Samples"
ref: "https://github.com/daveRendon/azinsider/application-workloads"
ref: "https://github.com/daveRendon/azinsider/application-workloads"
- name: "Concepts"
ref: "concepts"
sub:
- name: "Fundamentals"
ref: "concepts"
ref: "concepts/fundamentals"