update jdcloud statebag to use pointers for config, to bring in line with other implementations
This commit is contained in:
parent
5054b1becc
commit
09489da149
|
@ -46,7 +46,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
|
|||
state := new(multistep.BasicStateBag)
|
||||
state.Put("hook", hook)
|
||||
state.Put("ui", ui)
|
||||
state.Put("config", b.config)
|
||||
state.Put("config", &b.config)
|
||||
|
||||
steps := []multistep.Step{
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ func (s *stepCreateJDCloudInstance) Cleanup(state multistep.StateBag) {
|
|||
|
||||
func createElasticIp(state multistep.StateBag) (string, error) {
|
||||
|
||||
generalConfig := state.Get("config").(Config)
|
||||
generalConfig := state.Get("config").(*Config)
|
||||
regionId := generalConfig.RegionId
|
||||
credential := core.NewCredentials(generalConfig.AccessKey, generalConfig.SecretKey)
|
||||
vpcclient := vpcClient.NewVpcClient(credential)
|
||||
|
|
Loading…
Reference in New Issue