Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/spot_fleet_request: remove unused error param #13677

Merged
merged 2 commits into from
Jun 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -765,7 +765,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 @@ -839,7 +839,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 @@ -870,10 +870,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