Skip to content

Commit

Permalink
go fmt; replace warning with error
Browse files Browse the repository at this point in the history
  • Loading branch information
saxonww authored and lbajolet-hashicorp committed Apr 16, 2024
1 parent 206964f commit c9a383b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder/ebsvolume/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
}

for _, configVolumeMapping := range b.config.VolumeMappings {
if configVolumeMapping.SnapshotDescription != "" && configVolumeMapping.SnapshotVolume != true {
warns = append(warns, "snapshot_description is ignored when "+
"snapshot_volume is not set to true.")
if configVolumeMapping.SnapshotDescription != "" && !configVolumeMapping.SnapshotVolume {
errs = packersdk.MultiErrorAppend(errs,
fmt.Errorf("All `ebs_volumes` blocks setting `snapshot_description` must also set `snapshot_volume`."))
}
}

Expand Down

0 comments on commit c9a383b

Please sign in to comment.