Amazon cloudformation AWS云形成输出模板

Amazon cloudformation AWS云形成输出模板,amazon-cloudformation,Amazon Cloudformation,我创建了一个CFT模板,每次执行云形成时,我都会在输出中收到5个不同的用户名 范例 Output 1st attempt - test-drive-01@example.com 2nd attempt - test-drive-02@example.com upto 5 attempts - test-derive05@example.com Again on 6th attempt it should go back to test-drive-01@example.com "Outpu

我创建了一个CFT模板,每次执行云形成时,我都会在输出中收到5个不同的用户名

范例

Output

1st attempt - test-drive-01@example.com
2nd attempt - test-drive-02@example.com
upto 5 attempts - test-derive05@example.com

Again on 6th attempt it should go back to test-drive-01@example.com

"Outputs" : {
      "Username" : {
       "Description" : "Appcito Cafe UserName",
       "Value" :  { "Fn::Join" : [ "", [ "testdrive-[dynamic(01-05)]@example.com"]]}
      },    

任何人都可以帮助完成示例模板输出。

我不知道CloudFormation内置了任何东西来支持基于现有值的循环值。您有几个选择来解决此问题:

  • 在每次通话中,将电子邮件地址(或只是前缀)作为参数传入
  • 创建包含此逻辑的自定义资源。可以使用Lambda函数,该函数可以根据模板的当前值轻松循环这些值。您应该能够将模板中的现有值传递到此函数中,以使其迭代到下一个值并传回
  • “执行云形成”在这里是什么意思?