为什么 Chef Provisioning 不支持我的可用区?

Why is Chef Provisioning not honoring my availability zone?

出于某种原因,Chef Provisioning 未在本食谱中考虑我的可用区:

context = ChefDK::ProvisioningData.context

target_port = context.opts.port

require 'chef/provisioning'

machine 'amx01' do
    machine_options :bootstrap_options => {
                        :key_name => 'chef',
                        :flavor_id => 't2.small',
                        :vpc_id => 'vpc-4de3dy17',
                        :subnet_id => 'subnet-47721f1e',
                        :availability_zones => ["us-east-1c"],
                        :image_id => 'ami-06c4cb11', 
                        :security_group_ids => ["sg-c35170c0", "sg-e7r05162"],
                        :associate_public_ip_address => "true"
},
convergence_options: context.convergence_options
converge(true)
action(context.action)
end

这应该转到 us-east-1c,但它总是转到 us-east-1d。关于我遗漏的任何想法?

availability_zones 对于机器不存在。您需要设置 availability_zone(单数),并传入一个字符串,而不是一个数组,并且它需要嵌套在 placement 下,如记录 here.