alibaba / packer-provider

Apache License 2.0
92 stars 26 forks source link

eip brandwith setting does not work #36

Closed willmao closed 6 years ago

willmao commented 6 years ago

@zhuzhih2017

"internet_charge_type": "PayByTraffic",
"internet_max_bandwidth_out": 100,

set the two fields above in packer config JSON file, and run packer build, the brand width of the EIP allocated by packer was set to 5Mbps。

reason: packer does not pass BrandWidth param when allocate EIP and the EIP use the default brand width which is 5Mbps.

    if b.chooseNetworkType() == VpcNet {
        steps = append(steps, &setpConfigAlicloudEIP{
            AssociatePublicIpAddress: b.config.AssociatePublicIpAddress,
            RegionId:                 b.config.AlicloudRegion,
            InternetChargeType:       b.config.InternetChargeType,
        })
    } else {
        steps = append(steps, &stepConfigAlicloudPublicIP{
            RegionId: b.config.AlicloudRegion,
        })
    }

This should be a bug and need to be fixed.

willmao commented 6 years ago

fixed on the packer official repo.