Skip to content

Commit

Permalink
Merge pull request #8518 from hashicorp/update_jdcloud_config_pointer
Browse files Browse the repository at this point in the history
update jdcloud statebag to use pointers for config, to bring in line …
  • Loading branch information
nywilken authored Dec 19, 2019
2 parents 0ded726 + 09489da commit f45d315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builder/jdcloud/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{

Expand Down
2 changes: 1 addition & 1 deletion builder/jdcloud/step_create_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f45d315

Please sign in to comment.