Skip to content

Commit c9a383b

Browse files
saxonwwlbajolet-hashicorp
authored andcommitted
go fmt; replace warning with error
1 parent 206964f commit c9a383b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

builder/ebsvolume/builder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
162162
}
163163

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

0 commit comments

Comments
 (0)