update jdcloud statebag to use pointers for config, to bring in line with other implementations

This commit is contained in:
Megan Marsh 2019-12-19 11:17:04 -08:00
parent 5054b1becc
commit 09489da149
2 changed files with 2 additions and 2 deletions

View File

@ -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{

View File

@ -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)