Skip to content

Commit

Permalink
Merge pull request #13677 from terraform-providers/ap_unparam_linting…
Browse files Browse the repository at this point in the history
…_spot_fleet_request

resource/spot_fleet_request: remove unused error param
  • Loading branch information
anGie44 authored Jun 12, 2020
2 parents 25287a2 + 386dd2e commit bc11c3b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aws/resource_aws_spot_fleet_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ func buildAwsSpotFleetLaunchSpecifications(
return specs, nil
}

func buildLaunchTemplateConfigs(d *schema.ResourceData) ([]*ec2.LaunchTemplateConfig, error) {
func buildLaunchTemplateConfigs(d *schema.ResourceData) []*ec2.LaunchTemplateConfig {
launchTemplateConfigs := d.Get("launch_template_config").(*schema.Set)
configs := make([]*ec2.LaunchTemplateConfig, 0)

Expand Down Expand Up @@ -840,7 +840,7 @@ func buildLaunchTemplateConfigs(d *schema.ResourceData) ([]*ec2.LaunchTemplateCo
configs = append(configs, ltc)
}

return configs, nil
return configs
}

func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) error {
Expand Down Expand Up @@ -871,10 +871,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{})
}

if launchTemplateConfigsOk {
launchTemplates, err := buildLaunchTemplateConfigs(d)
if err != nil {
return err
}
launchTemplates := buildLaunchTemplateConfigs(d)
spotFleetConfig.LaunchTemplateConfigs = launchTemplates
}

Expand Down

0 comments on commit bc11c3b

Please sign in to comment.