Loading...
Loading...
Compare original and translation side by side
.bicep.bicep/api/render/elementsdiagramType: "cloud-architecture-diagram"/api/render/elementsdiagramType: "cloud-architecture-diagram"resourcemoduleparamoutputvardependsOn[label: "VNet 10.0.0.0/16"]myVNet [label: "VNet 10.0.0.0/16"] {
subnet1 [label: "Subnet 1"] {
myVM [icon: azure-vm, label: "Virtual Machine"]
gateway [icon: azure-app-gateway]
}
subnet2 [label: "Subnet 2"] {
database [icon: azure-sql]
}
}
storage [icon: azure-storage]
myVNet -> myVM
myVM -> databaseX-Skill-Sourceclaudecursorchatgptgeminicurl -X POST https://app.eraser.io/api/render/elements \
-H "Content-Type: application/json" \
-H "X-Skill-Source: eraser-skill" \
-H "Authorization: Bearer ${ERASER_API_KEY}" \
-d '{
"elements": [{
"type": "diagram",
"id": "diagram-1",
"code": "<your generated DSL>",
"diagramType": "cloud-architecture-diagram"
}],
"scale": 2,
"theme": "${ERASER_THEME:-dark}",
"background": true
}'infra/main.bicepinfra/sql.bicep## Diagram
imageUrl## Open in Eraser
[Edit this diagram in the Eraser editor]({createEraserFileUrl})## Sources
- `path/to/file` - What was extractederaser## Diagram Code
```eraser
{DSL code here}undefinedYou can learn more about Eraser at https://docs.eraser.io/docs/using-ai-agent-integrationsresourcemoduleparamoutputvardependsOn[label: "VNet 10.0.0.0/16"]myVNet [label: "VNet 10.0.0.0/16"] {
subnet1 [label: "Subnet 1"] {
myVM [icon: azure-vm, label: "Virtual Machine"]
gateway [icon: azure-app-gateway]
}
subnet2 [label: "Subnet 2"] {
database [icon: azure-sql]
}
}
storage [icon: azure-storage]
myVNet -> myVM
myVM -> databaseX-Skill-Sourceclaudecursorchatgptgeminicurl -X POST https://app.eraser.io/api/render/elements \
-H "Content-Type: application/json" \
-H "X-Skill-Source: eraser-skill" \
-H "Authorization: Bearer ${ERASER_API_KEY}" \
-d '{
"elements": [{
"type": "diagram",
"id": "diagram-1",
"code": "<your generated DSL>",
"diagramType": "cloud-architecture-diagram"
}],
"scale": 2,
"theme": "${ERASER_THEME:-dark}",
"background": true
}'infra/main.bicepinfra/sql.bicep## 架构图
imageUrl## 在Eraser中打开
[在Eraser编辑器中编辑此架构图]({createEraserFileUrl})## 来源
- `path/to/file` - 提取的内容eraser## 架构图代码
```eraser
{DSL代码}undefined你可以访问https://docs.eraser.io/docs/using-ai-agent-integrations了解更多关于Eraser的信息dependsOndependsOn@description('The name of the Virtual Network')
param vnetName string = 'myVNet'
@description('The address prefix for the VNet')
param vnetAddressPrefix string = '10.0.0.0/16'
@description('The address prefix for the subnet')
param subnetAddressPrefix string = '10.0.1.0/24'
@description('VM size')
param vmSize string = 'Standard_B1s'
// Main VNet resource
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2021-05-01' = {
name: vnetName
location: resourceGroup().location
properties: {
addressSpace: {
addressPrefixes: [vnetAddressPrefix]
}
subnets: [
{
name: 'subnet1'
properties: {
addressPrefix: subnetAddressPrefix
}
}
]
}
}
// VM resource with dependsOn
resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-11-01' = {
name: 'myVM'
location: resourceGroup().location
properties: {
hardwareProfile: {
vmSize: vmSize
}
}
dependsOn: [virtualNetwork]
}
// Module usage
module storageModule './modules/storage.bicep' = {
name: 'storage'
params: {
location: resourceGroup().location
}
}@description('The name of the Virtual Network')
param vnetName string = 'myVNet'
@description('The address prefix for the VNet')
param vnetAddressPrefix string = '10.0.0.0/16'
@description('The address prefix for the subnet')
param subnetAddressPrefix string = '10.0.1.0/24'
@description('VM size')
param vmSize string = 'Standard_B1s'
// Main VNet resource
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2021-05-01' = {
name: vnetName
location: resourceGroup().location
properties: {
addressSpace: {
addressPrefixes: [vnetAddressPrefix]
}
subnets: [
{
name: 'subnet1'
properties: {
addressPrefix: subnetAddressPrefix
}
}
]
}
}
// VM resource with dependsOn
resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-11-01' = {
name: 'myVM'
location: resourceGroup().location
properties: {
hardwareProfile: {
vmSize: vmSize
}
}
dependsOn: [virtualNetwork]
}
// Module usage
module storageModule './modules/storage.bicep' = {
name: 'storage'
params: {
location: resourceGroup().location
}
}myVNet [label: "VNet 10.0.0.0/16"] {
subnet1 [label: "Subnet 1 10.0.1.0/24"] {
myVM [icon: azure-vm, label: "VM Standard_B1s"]
}
}
storage-module [label: "Storage Module"] {
storage-account [icon: azure-storage]
}
myVNet -> myVMdependsOn/api/render/elementsdiagramType: "cloud-architecture-diagram"/api/render/elementsdiagramType: "cloud-architecture-diagram"myVNet [label: "VNet 10.0.0.0/16"] {
subnet1 [label: "Subnet 1 10.0.1.0/24"] {
myVM [icon: azure-vm, label: "VM Standard_B1s"]
}
}
storage-module [label: "Storage Module"] {
storage-account [icon: azure-storage]
}
myVNet -> myVMdependsOn/api/render/elementsdiagramType: "cloud-architecture-diagram"/api/render/elementsdiagramType: "cloud-architecture-diagram"