【发布时间】:2018-07-07 04:48:10
【问题描述】:
有没有办法在测试厨房中使用 ec2 驱动程序设置 aws 标签和实例名称?
【问题讨论】:
标签: chef-infra chef-recipe test-kitchen
有没有办法在测试厨房中使用 ec2 驱动程序设置 aws 标签和实例名称?
【问题讨论】:
标签: chef-infra chef-recipe test-kitchen
是的,甚至是documented in the README。使用驱动配置密钥tags。
【讨论】:
因为文档并没有让 Chef/Ruby 的新用户过于清楚。这是我的 .kitchen.yml 文件中的 YAML 示例。
driver:
name: ec2
instance_type: t2.medium
region: us-east-1
security_group_ids:
- sg-1234567abcd
subnet_id: subnet-12345677
tags:
Name: 'test-kitchen WinCustomAMI'
Environment: 'test'
SN Project: 'Custom AMI'
SN Platform: 'Windows 2012R2'
SN Owner: 'Some Team'
【讨论】:
我在文档中也找不到这种 JSON 方式。
driver:
name: ec2
tags: {"Name": "my-first-ec2", "Contact": "me@mycompany.com"}
【讨论】: