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

模版中 each 语法不生效 #735

Open
heimanba opened this issue Jan 7, 2024 · 0 comments
Open

模版中 each 语法不生效 #735

heimanba opened this issue Jan 7, 2024 · 0 comments
Assignees

Comments

@heimanba
Copy link
Member

heimanba commented Jan 7, 2024

期望通过模版语法实现部署到多个region的需求

vars:
  regions:
    - cn-hangzhou
    - cn-zhangjiakou
    - cn-beijing
  service:
    name: midway-test
resources:
  {{each $vars.regions}}
  midway-test-{{$value}}:
    component: fc3
    props:
      region: cn-hangzhou
      functionName: midway-test-{{$value}}
  {{/each}}

这个使用方式也是一种最佳实践可以沉淀到文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants