Loading...
Loading...
Compare original and translation side by side
.tf.tf.tf.tfvars.tf.tfvars/api/render/elementsdiagramType: "cloud-architecture-diagram"/api/render/elementsdiagramType: "cloud-architecture-diagram"resourcemoduledatavariableoutputsubnet_id = aws_subnet.public.id[label: "VPC 10.0.0.0/16"]main-vpc [label: "VPC 10.0.0.0/16"] {
public-subnet [label: "Public Subnet 10.0.1.0/24"] {
web-server [icon: aws-ec2, label: "Web Server t3.micro"]
load-balancer [icon: aws-elb]
}
private-subnet [label: "Private Subnet"] {
database [icon: aws-rds]
}
}
load-balancer -> web-server
web-server -> 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.tfinfra/rds.tf## 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-integrationsresourcemoduledatavariableoutputsubnet_id = aws_subnet.public.id[label: "VPC 10.0.0.0/16"]main-vpc [label: "VPC 10.0.0.0/16"] {
public-subnet [label: "Public Subnet 10.0.1.0/24"] {
web-server [icon: aws-ec2, label: "Web Server t3.micro"]
load-balancer [icon: aws-elb]
}
private-subnet [label: "Private Subnet"] {
database [icon: aws-rds]
}
}
load-balancer -> web-server
web-server -> 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.tfinfra/rds.tf## 架构图
imageUrl## 在Eraser中打开
[在Eraser编辑器中编辑此架构图]({createEraserFileUrl})## 来源
- `path/to/file` - 提取的内容eraser## 架构图代码
```eraser
{DSL code here}undefined你可以在https://docs.eraser.io/docs/using-ai-agent-integrations了解更多关于Eraser的信息undefinedundefinedundefinedundefined# AWS Resources
aws-vpc [label: "AWS VPC 10.0.0.0/16"] {
aws-subnet [label: "Public Subnet 10.0.1.0/24"] {
web-server [icon: aws-ec2, label: "Web Server t3.micro"]
}
}
# Azure Resources
resource-group [label: "Resource Group rg-main"] {
azure-vnet [label: "Azure VNet 10.1.0.0/16"]
}
# Module
database-module [label: "Database Module"] {
rds-instance [icon: aws-rds]
}
aws-vpc -> database-module/api/render/elementsdiagramType: "cloud-architecture-diagram"# AWS Resources
aws-vpc [label: "AWS VPC 10.0.0.0/16"] {
aws-subnet [label: "Public Subnet 10.0.1.0/24"] {
web-server [icon: aws-ec2, label: "Web Server t3.micro"]
}
}
# Azure Resources
resource-group [label: "Resource Group rg-main"] {
azure-vnet [label: "Azure VNet 10.1.0.0/16"]
}
# Module
database-module [label: "Database Module"] {
rds-instance [icon: aws-rds]
}
aws-vpc -> database-module/api/render/elementsdiagramType: "cloud-architecture-diagram"